Documentation
¶
Index ¶
- Constants
- func APIGroupMatches(rule *PolicyRule, requestedAPIGroup string) bool
- func NonResourceURLMatches(rule *PolicyRule, requestedURL string) bool
- func ResourceMatches(rule *PolicyRule, combinedRequestedResource, requestedSubresource string) bool
- func RuleAllow(attribute auth.Attributes, rule *PolicyRule) bool
- func ScopeMatches(rule *PolicyRule, requestScope string) bool
- func VerbMatches(rule *PolicyRule, requestedVerb string) bool
- type PolicyRule
- type Role
Constants ¶
View Source
const ( APIGroupAll = "*" ResourceAll = "*" VerbAll = "*" ScopeAll = "*" NonResourceAll = "*" )
attention: rbac is refers to the kubernetes rbac copy core struct and logics from the kubernetes code and do same modify
Variables ¶
This section is empty.
Functions ¶
func APIGroupMatches ¶
func APIGroupMatches(rule *PolicyRule, requestedAPIGroup string) bool
func NonResourceURLMatches ¶
func NonResourceURLMatches(rule *PolicyRule, requestedURL string) bool
func ResourceMatches ¶
func ResourceMatches(rule *PolicyRule, combinedRequestedResource, requestedSubresource string) bool
func RuleAllow ¶
func RuleAllow(attribute auth.Attributes, rule *PolicyRule) bool
func ScopeMatches ¶
func ScopeMatches(rule *PolicyRule, requestScope string) bool
func VerbMatches ¶
func VerbMatches(rule *PolicyRule, requestedVerb string) bool
Types ¶
type PolicyRule ¶
type Role ¶
type Role struct { Name string `yaml:"name" json:"name"` Desc string `yaml:"desc" json:"desc"` PolicyRules []PolicyRule `yaml:"rules" json:"rules"` }
Click to show internal directories.
Click to hide internal directories.