Documentation
¶
Index ¶
- type AppLike
- type RoleService
- func (rs *RoleService) Authorize(c fs.Context) error
- func (rs *RoleService) Create(c fs.Context, _ *fs.Role) (*fs.Role, error)
- func (rs *RoleService) Delete(c fs.Context, _ any) (any, error)
- func (rs *RoleService) Detail(c fs.Context, _ any) (*fs.Role, error)
- func (rs *RoleService) GetPermission(roleID uint64, action string) *fs.Permission
- func (rs *RoleService) GetRolesFromIDs(ids []uint64) []*fs.Role
- func (rs *RoleService) List(c fs.Context, _ any) ([]*fs.Role, error)
- func (rs *RoleService) ParseUser(c fs.Context) error
- func (rs *RoleService) ResourcesList(c fs.Context, _ any) ([]*fs.Resource, error)
- func (rs *RoleService) Update(c fs.Context, _ any) (_ *fs.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() db.Client
Roles func() []*fs.Role
AppKey func() string
UpdateCache func(context.Context) error
Resources func() *fs.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) *fs.Permission
func (*RoleService) GetRolesFromIDs ¶ added in v0.0.5
func (rs *RoleService) GetRolesFromIDs(ids []uint64) []*fs.Role
func (*RoleService) ResourcesList ¶ added in v0.0.5
Click to show internal directories.
Click to hide internal directories.