Documentation ¶
Index ¶
- Variables
- func GetRoleDB(ctx context.Context, defDB *gorm.DB) *gorm.DB
- func GetRoleMenuDB(ctx context.Context, defDB *gorm.DB) *gorm.DB
- type Role
- type RoleMenu
- type RoleMenuRepo
- func (a *RoleMenuRepo) Create(ctx context.Context, item schema.RoleMenu) error
- func (a *RoleMenuRepo) Delete(ctx context.Context, id uint64) error
- func (a *RoleMenuRepo) DeleteByRoleID(ctx context.Context, roleID uint64) error
- func (a *RoleMenuRepo) DeleteByRoleIDs(ctx context.Context, roleIDs []uint64) error
- func (a *RoleMenuRepo) Get(ctx context.Context, id uint64, opts ...schema.RoleMenuQueryOptions) (*schema.RoleMenu, error)
- func (a *RoleMenuRepo) Query(ctx context.Context, params schema.RoleMenuQueryParam, ...) (*schema.RoleMenuQueryResult, error)
- func (a *RoleMenuRepo) Update(ctx context.Context, id uint64, item schema.RoleMenu) error
- type RoleMenus
- type RoleRepo
- func (a *RoleRepo) Create(ctx context.Context, item schema.Role) error
- func (a *RoleRepo) Delete(ctx context.Context, id uint64) error
- func (a *RoleRepo) DeleteByDomainID(ctx context.Context, domainID uint64) error
- func (a *RoleRepo) Get(ctx context.Context, id uint64, opts ...schema.RoleQueryOptions) (*schema.Role, error)
- func (a *RoleRepo) Query(ctx context.Context, params schema.RoleQueryParam, ...) (*schema.RoleQueryResult, error)
- func (a *RoleRepo) Update(ctx context.Context, id uint64, item schema.Role) error
- func (a *RoleRepo) UpdateStatus(ctx context.Context, id uint64, status int) error
- type Roles
- type SchemaRole
- type SchemaRoleMenu
Constants ¶
This section is empty.
Variables ¶
View Source
var RoleMenuSet = wire.NewSet(wire.Struct(new(RoleMenuRepo), "*"))
Functions ¶
Types ¶
type Role ¶
type Role struct { util.Model Name string `gorm:"size:100;index;default:'';not null;"` // 角色名称 Sequence int `gorm:"index;default:0;"` // 排序值 Memo *string `gorm:"size:1024;"` // 备注 Status int `gorm:"index;"` // 状态(1:启用 0:禁用) Creator uint64 `gorm:""` // 创建者 DomainID uint64 `gorm:"index;column:domain_id;"` // domain id }
func (Role) ToSchemaRole ¶
type RoleMenu ¶
type RoleMenu struct { util.Model RoleID uint64 `gorm:"index;not null;"` // 角色ID MenuID uint64 `gorm:"index;not null;"` // 菜单ID ActionID uint64 `gorm:"index;not null;"` // 动作ID }
func (RoleMenu) ToSchemaRoleMenu ¶
type RoleMenuRepo ¶
func (*RoleMenuRepo) DeleteByRoleID ¶
func (a *RoleMenuRepo) DeleteByRoleID(ctx context.Context, roleID uint64) error
func (*RoleMenuRepo) DeleteByRoleIDs ¶
func (a *RoleMenuRepo) DeleteByRoleIDs(ctx context.Context, roleIDs []uint64) error
func (*RoleMenuRepo) Get ¶
func (a *RoleMenuRepo) Get(ctx context.Context, id uint64, opts ...schema.RoleMenuQueryOptions) (*schema.RoleMenu, error)
func (*RoleMenuRepo) Query ¶
func (a *RoleMenuRepo) Query(ctx context.Context, params schema.RoleMenuQueryParam, opts ...schema.RoleMenuQueryOptions) (*schema.RoleMenuQueryResult, error)
type RoleRepo ¶
func (*RoleRepo) DeleteByDomainID ¶
func (*RoleRepo) Query ¶
func (a *RoleRepo) Query(ctx context.Context, params schema.RoleQueryParam, opts ...schema.RoleQueryOptions) (*schema.RoleQueryResult, error)
type SchemaRole ¶
func (SchemaRole) ToRole ¶
func (a SchemaRole) ToRole() *Role
type SchemaRoleMenu ¶
func (SchemaRoleMenu) ToRoleMenu ¶
func (a SchemaRoleMenu) ToRoleMenu() *RoleMenu
Click to show internal directories.
Click to hide internal directories.