Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasUploaderRole ¶ added in v0.0.23
HasUploaderRole returns true if the user has uploader role.
Types ¶
type BlockedUsers ¶ added in v0.0.21
type BlockedUsers map[string]struct{}
BlockedUsers is a set containing all the blocked users.
func NewBlockedUsersSet ¶ added in v0.0.21
func NewBlockedUsersSet(users []string) BlockedUsers
NewBlockedUsersSet creates a new set of blocked users from a list.
func (BlockedUsers) IsBlocked ¶ added in v0.0.21
func (b BlockedUsers) IsBlocked(user string) bool
IsBlocked returns true if the user is blocked.
type Manager ¶
type Manager interface { // 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) }
Manager is the interface to implement to manipulate users.
Click to show internal directories.
Click to hide internal directories.