Documentation ¶
Index ¶
- Variables
- func Matches(str string, allowed []string) bool
- type Binding
- type DefaultBinding
- type DefaultRule
- func (r *DefaultRule) GetAPIGroups() []string
- func (r *DefaultRule) GetNamespaces() []string
- func (r *DefaultRule) GetPaths() []string
- func (r *DefaultRule) GetResourceNames() []string
- func (r *DefaultRule) GetResources() []string
- func (r *DefaultRule) GetSubResources() []string
- func (r *DefaultRule) GetVerbs() []string
- func (r *DefaultRule) Matches(attr authorizer.Attributes) bool
- type Rule
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type Binding ¶
type Binding interface { MatchesUser(user user.Info) bool GetUsers() sets.Set[string] GetGroups() sets.Set[string] GetRules() []Rule GetID() string }
func ForNamespaceBinding ¶
ForNamespaceBinding will augment to existing rule to only match the specified namespace. If the passed in rule does not allow all namespace or the specified namespace, the augmented rule will fail to match any attributes.
type DefaultBinding ¶
type DefaultBinding struct { Name string Users sets.Set[string] Groups sets.Set[string] Rules []Rule }
func (*DefaultBinding) GetID ¶
func (b *DefaultBinding) GetID() string
func (*DefaultBinding) GetRules ¶
func (b *DefaultBinding) GetRules() []Rule
func (*DefaultBinding) MatchesUser ¶
func (b *DefaultBinding) MatchesUser(user user.Info) bool
type DefaultRule ¶
type DefaultRule struct { Namespaces []string APIGroups []string Resources []string SubResources []string ResourceNames []string Verbs []string Paths []string }
func (*DefaultRule) GetAPIGroups ¶
func (r *DefaultRule) GetAPIGroups() []string
func (*DefaultRule) GetNamespaces ¶
func (r *DefaultRule) GetNamespaces() []string
func (*DefaultRule) GetPaths ¶
func (r *DefaultRule) GetPaths() []string
func (*DefaultRule) GetResourceNames ¶
func (r *DefaultRule) GetResourceNames() []string
func (*DefaultRule) GetResources ¶
func (r *DefaultRule) GetResources() []string
func (*DefaultRule) GetSubResources ¶
func (r *DefaultRule) GetSubResources() []string
func (*DefaultRule) GetVerbs ¶
func (r *DefaultRule) GetVerbs() []string
func (*DefaultRule) Matches ¶
func (r *DefaultRule) Matches(attr authorizer.Attributes) bool
type Rule ¶
type Rule interface { Matches(attr authorizer.Attributes) bool GetNamespaces() []string GetAPIGroups() []string GetResources() []string GetSubResources() []string GetResourceNames() []string GetVerbs() []string GetPaths() []string }
func ForNamespace ¶
ForNamespace will augment to existing rule to only match the specified namespace. If the passed in rule does not allow all namespace or the specified namespace, the augmented rule will fail to match any attributes.
Click to show internal directories.
Click to hide internal directories.