Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivePolicies ¶
type ActivePolicies struct {
// contains filtered or unexported fields
}
ActivePolicies implements PolicyManager interface.
func (*ActivePolicies) AddPolicy ¶
func (p *ActivePolicies) AddPolicy(scope, policyName string, policy policyprovider.PolicyProvider)
AddPolicy fulfills the PolicyManager interface. It adds the given policy under the given scope.
func (*ActivePolicies) DeletePolicy ¶
func (p *ActivePolicies) DeletePolicy(scope, policyName string)
DeletePolicy fulfills the PolicyManager interface. It deletes the policy from the given scope.
func (*ActivePolicies) GetPolicy ¶
func (p *ActivePolicies) GetPolicy(scope string) policyprovider.PolicyProvider
GetPolicy fulfills the PolicyManager interface. It returns the policy for the given scope. If no policy is found for the given scope, it returns cluster-wide policy.
type PolicyManager ¶
type PolicyManager interface { // GetPolicy returns the policy for the given scope. GetPolicy(scope string) policyprovider.PolicyProvider // AddPolicy adds the given policy under the given scope. AddPolicy(scope, policyName string, policy policyprovider.PolicyProvider) // DeletePolicy deletes the policy from the given scope. DeletePolicy(scope, policyName string) }
PolicyManager is an interface that defines the methods for managing policies across different scopes.
func NewActivePolicies ¶
func NewActivePolicies() PolicyManager
type PolicyWrapper ¶
type PolicyWrapper struct { Name string Policy policyprovider.PolicyProvider }
PolicyWrapper wraps policy provider with its policy name.
Click to show internal directories.
Click to hide internal directories.