policy

package
v0.0.0-...-2dbac4b Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoNextPolicyFoundErr = errors.New("no next policy found")
View Source
var NoPolicyFoundErr = errors.New("no policy found")
View Source
var NoPrevPolicyFoundErr = errors.New("no previous policy found")

Functions

func IsLastPolicy

func IsLastPolicy(err error) bool

func IsSafestPolicy

func IsSafestPolicy(err error) bool

Types

type PolicyStore

type PolicyStore struct {
	// contains filtered or unexported fields
}

func NewPolicyStore

func NewPolicyStore(k8sClient client.Client) *PolicyStore

func (*PolicyStore) GetDefaultPolicy

func (ps *PolicyStore) GetDefaultPolicy() (*v1alpha1.Policy, error)

func (*PolicyStore) GetNextPolicyByName

func (ps *PolicyStore) GetNextPolicyByName(name string) (*v1alpha1.Policy, error)

func (*PolicyStore) GetPolicyByName

func (ps *PolicyStore) GetPolicyByName(name string) (*v1alpha1.Policy, error)

func (*PolicyStore) GetPreviousPolicyByName

func (ps *PolicyStore) GetPreviousPolicyByName(name string) (*v1alpha1.Policy, error)

func (*PolicyStore) GetSafestPolicy

func (ps *PolicyStore) GetSafestPolicy() (*v1alpha1.Policy, error)

func (*PolicyStore) GetSortedPolicies

func (ps *PolicyStore) GetSortedPolicies() (*v1alpha1.PolicyList, error)

type Store

type Store interface {
	GetSafestPolicy() (*v1alpha1.Policy, error)
	GetDefaultPolicy() (*v1alpha1.Policy, error)
	GetNextPolicyByName(name string) (*v1alpha1.Policy, error)
	GetPreviousPolicyByName(name string) (*v1alpha1.Policy, error)
	GetPolicyByName(name string) (*v1alpha1.Policy, error)
	GetSortedPolicies() (*v1alpha1.PolicyList, error)
}

Jump to

Keyboard shortcuts

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