rbac

package
v0.3.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter struct {
	K8sClient client.Client
	// contains filtered or unexported fields
}

func NewAdapter

func NewAdapter(opts ...NewAdapterOption) *Adapter

func (*Adapter) AddPolicy

func (ada *Adapter) AddPolicy(sec string, ptype string, rule []string) error

AddPolicy adds a policy rule to the storage. This is part of the Auto-Save feature.

func (*Adapter) AddRole

func (ada *Adapter) AddRole(groupName, roleName, projectName string) error

func (*Adapter) DeleteRole

func (ada *Adapter) DeleteRole(name string) error

func (*Adapter) ExportPolicies

func (ada *Adapter) ExportPolicies() string

func (*Adapter) GetClient

func (ada *Adapter) GetClient() client.Client

func (*Adapter) LoadPolicy

func (ada *Adapter) LoadPolicy(model model.Model) error

func (*Adapter) LoadPolicyFromCluster

func (ada *Adapter) LoadPolicyFromCluster(key types.NamespacedName) error

func (*Adapter) LoadPolicyFromString

func (ada *Adapter) LoadPolicyFromString(policies string) error

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

func (ada *Adapter) RemovePolicy(sec string, ptype string, rule []string) error

RemovePolicy removes a policy rule from the storage. This is part of the Auto-Save feature.

func (*Adapter) SavePolicy

func (ada *Adapter) SavePolicy(model model.Model) error

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL