Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Mgr default user group manager Mgr = newManager() // ErrDupUserGroup duplicate user group error ErrDupUserGroup = errors.New("duplicated user group name found") )
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager interface { // Create create user group Create(ctx context.Context, userGroup model.UserGroup) (int, error) // List list user group List(ctx context.Context, query *q.Query) ([]*model.UserGroup, error) // Count get user group count Count(ctx context.Context, query *q.Query) (int64, error) // Get get user group by id Get(ctx context.Context, id int) (*model.UserGroup, error) // Populate populate user group from external auth server to Harbor and return the group id Populate(ctx context.Context, userGroups []model.UserGroup) ([]int, error) // Delete delete user group by id Delete(ctx context.Context, id int) error // UpdateName update user group's name UpdateName(ctx context.Context, id int, groupName string) error // Onboard sync the user group from external auth server to Harbor Onboard(ctx context.Context, g *model.UserGroup) error }
Manager interface provide the management functions for user group
Click to show internal directories.
Click to hide internal directories.