Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type Service ¶
type Service interface { // 获取已经选择的PermID PermissionSelected(ctx context.Context, id int64) (ids []int64, err error) // 角色详情 Detail(ctx context.Context, id int64) (role *types.Role, err error) // 创建角色 Post(ctx context.Context, name, desc string, level int) error // 更新角色信息 Update(ctx context.Context, id int64, name, desc string, level int) error // 取得所有角色 All(ctx context.Context) ([]*types.Role, error) // 删除角色 Delete(ctx context.Context, id int64) error // 给角色分配权限 RolePermission(ctx context.Context, id int64, permIds []int64) error }
func NewService ¶
func NewService(logger log.Logger, casbin casbin.Casbin, repository repository.Repository) Service
Click to show internal directories.
Click to hide internal directories.