Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BackendForDB = backend.BackendForDB
View Source
var Register = backend.RegisterForDriver
Functions ¶
func FilterGroupPermissions ¶
func FilterGroupPermissions(rows []*UserGroupsRow) (Group, []*Permission)
Types ¶
type DeleteQuerier ¶
type GroupPermission ¶
type InsertQuerier ¶
type InsertQuerier interface { InsertGroup(ctx context.Context, name string, description string) (int64, error) InsertGroupPermission(ctx context.Context, groupID uint64, permissionID uint64) (int64, error) InsertPermission(ctx context.Context, name string, description string) (int64, error) InsertUserGroup(ctx context.Context, userID uint64, groupID uint64) (int64, error) }
type Permission ¶
type Querier ¶
type Querier interface { InsertQuerier DeleteQuerier UpdateQuerier WithTx(*sql.Tx) Querier Close() error AllGroups(ctx context.Context, limit int32, offset int32) ([]*Group, error) AllPermissions(ctx context.Context, limit int32, offset int32) ([]*Permission, error) GetGroupByID(ctx context.Context, id uint64) (*Group, error) GetPermissionByID(ctx context.Context, id uint64) (*Permission, error) PermissionsForUser(ctx context.Context, userID uint64) ([]*Permission, error) UserGroups(ctx context.Context, id uint64) (g Group, p []*Permission, err error) UserHasPermission(ctx context.Context, userID uint64, permissionName string) (int64, error) }
type UpdateQuerier ¶
type UserGroupsRow ¶
type UserGroupsRow struct { Group Group `json:"group"` Permission Permission `json:"permission"` }
Click to show internal directories.
Click to hide internal directories.