Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrGroupNameDup = errors.ConflictError(nil).WithMessage("duplicated user group name")
ErrGroupNameDup ...
Functions ¶
This section is empty.
Types ¶
type DAO ¶
type DAO interface { // Add add user group Add(ctx context.Context, userGroup model.UserGroup) (int, error) // Count query user group count Count(ctx context.Context, query *q.Query) (int64, error) // Query query user group Query(ctx context.Context, query *q.Query) ([]*model.UserGroup, error) // Get get user group by id Get(ctx context.Context, id int) (*model.UserGroup, error) // Delete delete user group by id Delete(ctx context.Context, id int) error // UpdateName update user group name UpdateName(ctx context.Context, id int, groupName string) error // ReadOrCreate create a user group or read existing one from db ReadOrCreate(ctx context.Context, g *model.UserGroup, keyAttribute string, combinedKeyAttributes ...string) (bool, int64, error) }
DAO the dao for user group
Click to show internal directories.
Click to hide internal directories.