kubernetes/vendor/github.com/google/cel-go/interpreter/activation.go

type Activation

// EmptyActivation returns a variable-free activation.
func EmptyActivation() Activation {}

type emptyActivation

func (emptyActivation) ResolveName(string) (any, bool) {}

func (emptyActivation) Parent() Activation             {}

// NewActivation returns an activation based on a map-based binding where the map keys are
// expected to be qualified names used with ResolveName calls.
//
// The input `bindings` may either be of type `Activation` or `map[string]any`.
//
// Lazy bindings may be supplied within the map-based input in either of the following forms:
// - func() any
// - func() ref.Val
//
// The output of the lazy binding will overwrite the variable reference in the internal map.
//
// Values which are not represented as ref.Val types on input may be adapted to a ref.Val using
// the types.Adapter configured in the environment.
func NewActivation(bindings any) (Activation, error) {}

type mapActivation

// Parent implements the Activation interface method.
func (a *mapActivation) Parent() Activation {}

// ResolveName implements the Activation interface method.
func (a *mapActivation) ResolveName(name string) (any, bool) {}

type hierarchicalActivation

// Parent implements the Activation interface method.
func (a *hierarchicalActivation) Parent() Activation {}

// ResolveName implements the Activation interface method.
func (a *hierarchicalActivation) ResolveName(name string) (any, bool) {}

// NewHierarchicalActivation takes two activations and produces a new one which prioritizes
// resolution in the child first and parent(s) second.
func NewHierarchicalActivation(parent Activation, child Activation) Activation {}

// NewPartialActivation returns an Activation which contains a list of AttributePattern values
// representing field and index operations that should result in a 'types.Unknown' result.
//
// The `bindings` value may be any value type supported by the interpreter.NewActivation call,
// but is typically either an existing Activation or map[string]any.
func NewPartialActivation(bindings any,
	unknowns ...*AttributePattern) (PartialActivation, error) {}

type PartialActivation

type partActivation

// UnknownAttributePatterns implements the PartialActivation interface method.
func (a *partActivation) UnknownAttributePatterns() []*AttributePattern {}

type varActivation

// Parent implements the Activation interface method.
func (v *varActivation) Parent() Activation {}

// ResolveName implements the Activation interface method.
func (v *varActivation) ResolveName(name string) (any, bool) {}

var varActivationPool