usergroup

package
v0.0.0-...-e417875 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL