cel

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExpressionBuilder

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

ExpressionBuilder creates a CEL interpreter from an attribute manifest.

func NewExpressionBuilder

func NewExpressionBuilder(attributes map[string]attribute.Kind, mode LanguageMode) *ExpressionBuilder

NewExpressionBuilder returns a new ExpressionBuilder

func (*ExpressionBuilder) Compile

Compile the given text and return a pre-compiled expression object.

func (*ExpressionBuilder) EvalType

func (e *ExpressionBuilder) EvalType(text string) (attribute.Kind, error)

EvalType returns the type of an expression

type LanguageMode

type LanguageMode int

LanguageMode controls parsing and evaluation properties of the expression builder

const (
	// CEL mode uses CEL syntax and runtime
	CEL LanguageMode = iota

	// CompatCEXL uses CEXL syntax and CEL runtime
	CompatCEXL
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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