Documentation ¶
Index ¶
- type AppLike
- type RoleService
- func (rs *RoleService) Authorize(c app.Context) error
- func (rs *RoleService) Create(c app.Context, _ *any) (*app.Role, error)
- func (rs *RoleService) Delete(c app.Context, _ *any) (any, error)
- func (rs *RoleService) Detail(c app.Context, _ *any) (*schema.Entity, error)
- func (rs *RoleService) GetPermission(roleID uint64, action string) *app.Permission
- func (rs *RoleService) GetRolesFromIDs(ids []uint64) []*app.Role
- func (rs *RoleService) List(c app.Context, _ *any) ([]*schema.Entity, error)
- func (rs *RoleService) ParseUser(c app.Context) error
- func (rs *RoleService) ResourcesList(c app.Context, _ *any) ([]*app.Resource, error)
- func (rs *RoleService) Update(c app.Context, _ *any) (_ *app.Role, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RoleService ¶
type RoleService struct { DB func() app.DBClient Roles func() []*app.Role AppKey func() string UpdateCache func() error Resources func() *app.ResourcesManager }
func New ¶ added in v0.0.5
func New(app AppLike) *RoleService
func (*RoleService) GetPermission ¶ added in v0.0.5
func (rs *RoleService) GetPermission(roleID uint64, action string) *app.Permission
func (*RoleService) GetRolesFromIDs ¶ added in v0.0.5
func (rs *RoleService) GetRolesFromIDs(ids []uint64) []*app.Role
func (*RoleService) ResourcesList ¶ added in v0.0.5
Click to show internal directories.
Click to hide internal directories.