Skip to content

Commit

Permalink
Add comments for the user manager interface methods
Browse files Browse the repository at this point in the history
  • Loading branch information
ishank011 committed Feb 2, 2022
1 parent 215db00 commit dccc5a4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/user/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit dccc5a4

Please sign in to comment.