Documentation ¶
Index ¶
- Variables
- func CancelRole(ctx context.Context, role string, subID int64)
- func CreatePermIfNotExists(name string) string
- func DelPerm(ctx context.Context, name string)
- func DelRole(ctx context.Context, name string)
- func GetAllBasedRoleIDs(ctx context.Context, roleID int64) map[int64]struct{}
- func GetPermIDByName(ctx context.Context, name string) (int64, error)
- func GetRoleIDByName(ctx context.Context, name string) (int64, error)
- func GrantRole(ctx context.Context, role string, subID int64)
- func MustGetPermIDByName(ctx context.Context, name string) int64
- func MustGetRoleIDByName(ctx context.Context, name string) int64
- func NewPerm(ctx context.Context, name, desc string)
- func NewRole(ctx context.Context, name, desc string)
- func Perms(ctx context.Context) []*model.Permission
- func RoleAddPerm(ctx context.Context, role, perm string)
- func RoleByName(ctx context.Context, name string) *model.Role
- func RoleDelPerm(ctx context.Context, role, perm string)
- func RoleGetBasedByID(ctx context.Context, roleID int64) []int64
- func RoleInheritFrom(ctx context.Context, role, base string) error
- func RolePermIDs(ctx context.Context, roleID int64) []int64
- func RolePerms(ctx context.Context, roleID int64) []*model.Permission
- func RoleUninheritFrom(ctx context.Context, role, base string)
- func Roles(ctx context.Context) []*model.Role
- func SubjectRoles(ctx context.Context, subject auth.Subject) []int64
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCircularReference = errors.New("sha.rbac: circular reference")
View Source
var LogReadOperation bool
Functions ¶
func CreatePermIfNotExists ¶
func GetAllBasedRoleIDs ¶
func RoleAddPerm ¶
func RoleDelPerm ¶
func RoleUninheritFrom ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.