Documentation ¶
Index ¶
- func AllowAll(action, target string) (bool, error)
- type MatchMode
- type Matcher
- type Permission
- type RBAC
- func (r *RBAC) AddRole(roleName string, role *Role) error
- func (r *RBAC) Can(roleName string, action, target string) (ok bool, err error)
- func (r *RBAC) ForEachRole(fn func(key string, value *Role) bool)
- func (r *RBAC) Merge(rd *RBAC) error
- func (r *RBAC) MergerRole(roleName string, role *Role) error
- func (r *RBAC) RemoveRole(roleName string) error
- type Role
- func (r *Role) AddGlobPermission(priority int, action, target string, deny ...bool)
- func (r *Role) AddPermission(priority int, p Permission) *Role
- func (r *Role) AddRegexPermission(priority int, action, target string, deny ...bool)
- func (r *Role) AddRole(role *Role) *Role
- func (r *Role) Can(action, target string) (ok bool, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RBAC ¶
type RBAC struct {
// contains filtered or unexported fields
}
func (*RBAC) RemoveRole ¶
type Role ¶
type Role struct {
// contains filtered or unexported fields
}
func (*Role) AddGlobPermission ¶
func (*Role) AddPermission ¶
func (r *Role) AddPermission(priority int, p Permission) *Role
func (*Role) AddRegexPermission ¶
Click to show internal directories.
Click to hide internal directories.