Documentation
¶
Index ¶
- Variables
- func Roles() []string
- type Grant
- type Grants
- func (t Grants) AsStringList() []string
- func (t Grants) Has(role Role, scope string) bool
- func (t Grants) HasGrant(grants ...Grant) bool
- func (t Grants) HasRole(roles ...Role) bool
- func (t Grants) HasRoleOn(scope string, roles ...Role) bool
- func (t Grants) Namespaces(roles ...Role) []string
- func (t Grants) String() string
- type Role
Constants ¶
This section is empty.
Variables ¶
View Source
var ( GrantRoot = NewGrant("root", "") GrantSquatter = NewGrant("squatter", "") GrantHeartbeat = NewGrant("heartbeat", "") GrantBlacklistAdmin = NewGrant("blacklistadmin", "") GrantJoin = NewGrant("join", "") GrantLeave = NewGrant("leave", "") GrantPrioritizer = NewGrant("prioritizer", "") )
Functions ¶
Types ¶
type Grants ¶
type Grants []Grant
Grants is a list of Grant
func (Grants) AsStringList ¶
func (Grants) HasRoleOn ¶
HasRoleOn checks if any of the specified roles with the given scope exist in the Grants.
func (Grants) Namespaces ¶
type Role ¶
type Role string
const ( RoleUndef Role = "" RoleRoot Role = "root" RoleAdmin Role = "admin" RoleOperator Role = "operator" RolePrioritizer Role = "prioritizer" RoleGuest Role = "guest" RoleSquatter Role = "squatter" RoleBlacklistAdmin Role = "blacklistadmin" RoleHeartbeat Role = "heartbeat" RoleJoin Role = "join" RoleLeave Role = "leave" )
func SplitGrant ¶
SplitGrant extract role and scope from a grant
Click to show internal directories.
Click to hide internal directories.