Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Role ¶
type Role struct {
// contains filtered or unexported fields
}
Role is the data structure for a role in RBAC.
type RoleManager ¶
type RoleManager struct {
// contains filtered or unexported fields
}
RoleManager is the interface to manage the roles in RBAC.
func (*RoleManager) AddLink ¶
func (rm *RoleManager) AddLink(name1 string, name2 string)
Add the inheritance link between role: name1 and role: name2. aka role: name1 inherits role: name2.
func (*RoleManager) DeleteLink ¶
func (rm *RoleManager) DeleteLink(name1 string, name2 string)
Delete the inheritance link between role: name1 and role: name2. aka role: name1 does not inherit role: name2 any more.
func (*RoleManager) GetRoles ¶
func (rm *RoleManager) GetRoles(name string) []string
Get the roles that a subject inherits.
Click to show internal directories.
Click to hide internal directories.