Documentation
¶
Index ¶
- Variables
- func IsLastPolicy(err error) bool
- func IsSafestPolicy(err error) bool
- type PolicyStore
- func (ps *PolicyStore) GetDefaultPolicy() (*v1alpha1.Policy, error)
- func (ps *PolicyStore) GetNextPolicyByName(name string) (*v1alpha1.Policy, error)
- func (ps *PolicyStore) GetPolicyByName(name string) (*v1alpha1.Policy, error)
- func (ps *PolicyStore) GetPreviousPolicyByName(name string) (*v1alpha1.Policy, error)
- func (ps *PolicyStore) GetSafestPolicy() (*v1alpha1.Policy, error)
- func (ps *PolicyStore) GetSortedPolicies() (*v1alpha1.PolicyList, error)
- type Store
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 IsSafestPolicy ¶
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) }
Click to show internal directories.
Click to hide internal directories.