Documentation ¶
Index ¶
- type Adapter
- func (ada *Adapter) AddPolicy(sec string, ptype string, rule []string) error
- func (ada *Adapter) AddRole(groupName, roleName, projectName string) error
- func (ada *Adapter) DeleteRole(name string) error
- func (ada *Adapter) ExportPolicies() string
- func (ada *Adapter) GetClient() client.Client
- func (ada *Adapter) LoadPolicy(model model.Model) error
- func (ada *Adapter) LoadPolicyFromCluster(key types.NamespacedName) error
- func (ada *Adapter) LoadPolicyFromString(policies string) error
- func (ada *Adapter) RemoveFilteredPolicy(sec string, ptype string, fieldIndex int, fieldValues ...string) error
- func (ada *Adapter) RemovePolicy(sec string, ptype string, rule []string) error
- func (ada *Adapter) SavePolicy(model model.Model) error
- func (ada *Adapter) SavePolicyToCluster(key types.NamespacedName) error
- type NewAdapterOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
func NewAdapter ¶
func NewAdapter(opts ...NewAdapterOption) *Adapter
func (*Adapter) AddPolicy ¶
AddPolicy adds a policy rule to the storage. This is part of the Auto-Save feature.
func (*Adapter) DeleteRole ¶
func (*Adapter) ExportPolicies ¶
func (*Adapter) LoadPolicyFromCluster ¶
func (ada *Adapter) LoadPolicyFromCluster(key types.NamespacedName) error
func (*Adapter) LoadPolicyFromString ¶
func (*Adapter) RemoveFilteredPolicy ¶
func (ada *Adapter) RemoveFilteredPolicy(sec string, ptype string, fieldIndex int, fieldValues ...string) error
RemoveFilteredPolicy removes policy rules that match the filter from the storage. This is part of the Auto-Save feature.
func (*Adapter) RemovePolicy ¶
RemovePolicy removes a policy rule from the storage. This is part of the Auto-Save feature.
func (*Adapter) SavePolicy ¶
SavePolicy saves all policy rules to the storage.
func (*Adapter) SavePolicyToCluster ¶
func (ada *Adapter) SavePolicyToCluster(key types.NamespacedName) error
type NewAdapterOption ¶
type NewAdapterOption func(*Adapter)
Click to show internal directories.
Click to hide internal directories.