operator

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllConditionOperators added in v1.12.0

func GetAllConditionOperators() []string

func GetAllDeprecatedOperators added in v1.12.0

func GetAllDeprecatedOperators() []string

func GetDeprecatedOperatorAlternative added in v1.12.0

func GetDeprecatedOperatorAlternative(op string) []string

func IsOperatorDeprecated added in v1.12.0

func IsOperatorDeprecated(operator kyvernov1.ConditionOperator) bool

func IsOperatorValid added in v1.12.0

func IsOperatorValid(operator kyvernov1.ConditionOperator) bool

Types

type AllInHandler added in v1.6.0

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

AllInHandler provides implementation to handle AllIn Operator

func (AllInHandler) Evaluate added in v1.6.0

func (allin AllInHandler) Evaluate(key, value interface{}) bool

Evaluate evaluates expression with AllIn Operator

type AllNotInHandler added in v1.6.0

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

AllNotInHandler provides implementation to handle AllNotIn Operator

func (AllNotInHandler) Evaluate added in v1.6.0

func (allnin AllNotInHandler) Evaluate(key, value interface{}) bool

Evaluate evaluates expression with AllNotIn Operator

type AnyInHandler added in v1.6.0

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

AnyInHandler provides implementation to handle AnyIn Operator

func (AnyInHandler) Evaluate added in v1.6.0

func (anyin AnyInHandler) Evaluate(key, value interface{}) bool

Evaluate evaluates expression with AnyIn Operator

type AnyNotInHandler added in v1.6.0

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

AnyNotInHandler provides implementation to handle AnyNotIn Operator

func (AnyNotInHandler) Evaluate added in v1.6.0

func (anynin AnyNotInHandler) Evaluate(key, value interface{}) bool

Evaluate evaluates expression with AnyNotIn Operator

type DurationOperatorHandler added in v1.4.2

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

DurationOperatorHandler provides implementation to handle Duration Operations associated with policies

func (DurationOperatorHandler) Evaluate added in v1.4.2

func (doh DurationOperatorHandler) Evaluate(key, value interface{}) bool

type EqualHandler

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

EqualHandler provides implementation to handle NotEqual Operator

func (EqualHandler) Evaluate

func (eh EqualHandler) Evaluate(key, value interface{}) bool

Evaluate evaluates expression with Equal Operator

type InHandler added in v1.2.0

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

InHandler provides implementation to handle In Operator

func (InHandler) Evaluate added in v1.2.0

func (in InHandler) Evaluate(key, value interface{}) bool

Evaluate evaluates expression with In Operator

type NotEqualHandler

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

NotEqualHandler provides implementation to handle NotEqual Operator

func (NotEqualHandler) Evaluate

func (neh NotEqualHandler) Evaluate(key, value interface{}) bool

Evaluate evaluates expression with NotEqual Operator

type NotInHandler added in v1.2.0

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

NotInHandler provides implementation to handle NotIn Operator

func (NotInHandler) Evaluate added in v1.2.0

func (nin NotInHandler) Evaluate(key, value interface{}) bool

Evaluate evaluates expression with NotIn Operator

type NumericOperatorHandler added in v1.3.2

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

NumericOperatorHandler provides implementation to handle Numeric Operations associated with policies

func (NumericOperatorHandler) Evaluate added in v1.3.2

func (noh NumericOperatorHandler) Evaluate(key, value interface{}) bool

type OperatorHandler

type OperatorHandler interface {
	Evaluate(key, value interface{}) bool
	// contains filtered or unexported methods
}

OperatorHandler provides interface to manage types

func CreateOperatorHandler

func CreateOperatorHandler(log logr.Logger, ctx context.EvalInterface, op kyvernov1.ConditionOperator) OperatorHandler

CreateOperatorHandler returns the operator handler based on the operator used in condition

func NewAllInHandler added in v1.6.0

func NewAllInHandler(log logr.Logger, ctx context.EvalInterface) OperatorHandler

NewAllInHandler returns handler to manage AllIn operations

func NewAllNotInHandler added in v1.6.0

func NewAllNotInHandler(log logr.Logger, ctx context.EvalInterface) OperatorHandler

NewAllNotInHandler returns handler to manage AllNotIn operations

func NewAnyInHandler added in v1.6.0

func NewAnyInHandler(log logr.Logger, ctx context.EvalInterface) OperatorHandler

NewAnyInHandler returns handler to manage AnyIn operations

func NewAnyNotInHandler added in v1.6.0

func NewAnyNotInHandler(log logr.Logger, ctx context.EvalInterface) OperatorHandler

NewAnyNotInHandler returns handler to manage AnyNotIn operations

func NewDurationOperatorHandler added in v1.4.2

func NewDurationOperatorHandler(log logr.Logger, ctx context.EvalInterface, op kyvernov1.ConditionOperator) OperatorHandler

NewDurationOperatorHandler returns handler to manage the provided duration operations (>, >=, <=, <)

func NewEqualHandler

func NewEqualHandler(log logr.Logger, ctx context.EvalInterface) OperatorHandler

NewEqualHandler returns handler to manage Equal operations

func NewInHandler deprecated added in v1.2.0

func NewInHandler(log logr.Logger, ctx context.EvalInterface) OperatorHandler

NewInHandler returns handler to manage In operations

Deprecated: Use `NewAllInHandler` or `NewAnyInHandler` instead

func NewNotEqualHandler

func NewNotEqualHandler(log logr.Logger, ctx context.EvalInterface) OperatorHandler

NewNotEqualHandler returns handler to manage NotEqual operations

func NewNotInHandler deprecated added in v1.2.0

func NewNotInHandler(log logr.Logger, ctx context.EvalInterface) OperatorHandler

NewNotInHandler returns handler to manage NotIn operations

Deprecated: Use `NewAllNotInHandler` or `NewAnyNotInHandler` instead

func NewNumericOperatorHandler added in v1.3.2

func NewNumericOperatorHandler(log logr.Logger, ctx context.EvalInterface, op kyvernov1.ConditionOperator) OperatorHandler

NewNumericOperatorHandler returns handler to manage the provided numeric operations (>, >=, <=, <)

type VariableSubstitutionHandler

type VariableSubstitutionHandler = func(log logr.Logger, ctx context.EvalInterface, pattern interface{}) (interface{}, error)

VariableSubstitutionHandler defines the handler function for variable substitution

Jump to

Keyboard shortcuts

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