cel

package
v0.0.52 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CELExpr

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

func NewCELExpr

func NewCELExpr(expr string) (*CELExpr, error)

func (CELExpr) AlwaysTrue

func (e CELExpr) AlwaysTrue() bool

func (CELExpr) AsBool

func (e CELExpr) AsBool(inputsMap map[string]interface{}) (bool, error)

func (CELExpr) Evaluate

func (e CELExpr) Evaluate(inputsMap map[string]interface{}) (interface{}, error)

func (CELExpr) InlineJSONSchema

func (e CELExpr) InlineJSONSchema()

func (CELExpr) IsZero

func (e CELExpr) IsZero() bool

IsZero enables correct `omitempty` behavior for YAML/JSON encoders. CELExpr stores its value in unexported fields, so reflection-based zero checks may incorrectly treat non-empty expressions as empty.

func (CELExpr) JSONSchema

func (CELExpr) JSONSchema() (jsg.Schema, error)

func (CELExpr) JSONSchemaExtend

func (e CELExpr) JSONSchemaExtend(schema *jsonschema.Schema)

func (CELExpr) MarshalJSON

func (e CELExpr) MarshalJSON() ([]byte, error)

func (CELExpr) MarshalYAML

func (e CELExpr) MarshalYAML() (interface{}, error)

MarshalYAML converts Duration to a YAML string

func (CELExpr) String

func (e CELExpr) String() string

func (*CELExpr) UnmarshalJSON

func (e *CELExpr) UnmarshalJSON(data []byte) error

func (*CELExpr) UnmarshalYAML

func (e *CELExpr) UnmarshalYAML(unmarshal func(interface{}) error) error

type DynamicMapValue

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

func (*DynamicMapValue) Contains

func (d *DynamicMapValue) Contains(key ref.Val) ref.Val

Contains checks if key exists (used by 'has' function)

func (*DynamicMapValue) ConvertToNative

func (d *DynamicMapValue) ConvertToNative(typeDesc reflect.Type) (interface{}, error)

ConvertToNative converts to native Go type

func (*DynamicMapValue) ConvertToType

func (d *DynamicMapValue) ConvertToType(typeVal ref.Type) ref.Val

ConvertToType handles type conversions

func (*DynamicMapValue) Equal

func (d *DynamicMapValue) Equal(other ref.Val) ref.Val

Equal checks equality

func (*DynamicMapValue) Get

func (d *DynamicMapValue) Get(key ref.Val) ref.Val

Get implements the critical property access - this is called for dot notation

func (*DynamicMapValue) Iterator

func (d *DynamicMapValue) Iterator() traits.Iterator

Iterator for map traversal

func (*DynamicMapValue) Size

func (d *DynamicMapValue) Size() ref.Val

Size returns map size

func (*DynamicMapValue) Type

func (d *DynamicMapValue) Type() ref.Type

Type returns the CEL type - we use DynType since it's dynamic

func (*DynamicMapValue) Value

func (d *DynamicMapValue) Value() interface{}

Value returns the underlying Go value

Jump to

Keyboard shortcuts

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