diff --git a/pkg/user/user.go b/pkg/user/user.go index 16e7bf57a6a..15e952959be 100644 --- a/pkg/user/user.go +++ b/pkg/user/user.go @@ -28,8 +28,14 @@ import ( // Manager is the interface to implement to manipulate users. type Manager interface { plugin.Plugin + // GetUser returns the user metadata identified by a uid. + // The groups of the user are omitted if specified, as these might not be required for certain operations + // and might involve computational overhead. GetUser(ctx context.Context, uid *userpb.UserId, skipFetchingGroups bool) (*userpb.User, error) + // GetUserByClaim returns the user identified by a specific value for a given claim. GetUserByClaim(ctx context.Context, claim, value string, skipFetchingGroups bool) (*userpb.User, error) + // GetUserGroups returns the groups a user identified by a uid belongs to. GetUserGroups(ctx context.Context, uid *userpb.UserId) ([]string, error) + // FindUsers returns all the user objects which match a query parameter. FindUsers(ctx context.Context, query string, skipFetchingGroups bool) ([]*userpb.User, error) }