operator

package
v1.1.12 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateStringPattern added in v1.1.7

func ValidateStringPattern(key string, value interface{}) (invalidType bool, keyExists bool)

Types

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.1.7

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

InHandler provides implementation to handle In Operator

func (InHandler) Evaluate added in v1.1.7

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.1.7

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

NotInHandler provides implementation to handle NotIn Operator

func (NotInHandler) Evaluate added in v1.1.7

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

Evaluate evaluates expression with NotIn Operator

type OperatorHandler

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

OperatorHandler provides interface to manage types

func CreateOperatorHandler

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

func NewEqualHandler

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

NewEqualHandler returns handler to manage Equal operations

func NewInHandler added in v1.1.7

NewInHandler returns handler to manage In operations

func NewNotEqualHandler

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

NewNotEqualHandler returns handler to manage NotEqual operations

func NewNotInHandler added in v1.1.7

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

NewNotInHandler returns handler to manage NotIn 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