cel

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ObjectVariable      = "object"
	MaxExpressionLength = 4096
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CompiledExpression

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

func (*CompiledExpression) EvaluateBoolean

func (c *CompiledExpression) EvaluateBoolean(
	ctx context.Context,
	object unstructured.Unstructured,
) (bool, error)

func (*CompiledExpression) EvaluateQuantity

func (c *CompiledExpression) EvaluateQuantity(
	ctx context.Context,
	object unstructured.Unstructured,
) (resource.Quantity, error)

func (*CompiledExpression) Expression

func (c *CompiledExpression) Expression() string

type Compiler

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

func NewCompiler

func NewCompiler() (*Compiler, error)

func (*Compiler) CompileBoolean

func (c *Compiler) CompileBoolean(expression string, mode environment.Type) (*CompiledExpression, error)

func (*Compiler) CompileQuantity

func (c *Compiler) CompileQuantity(expression string, mode environment.Type) (*CompiledExpression, error)

type ResultType

type ResultType string
const (
	ResultTypeBoolean  ResultType = "boolean"
	ResultTypeQuantity ResultType = "quantity"
)

Jump to

Keyboard shortcuts

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