cel

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const RootAuthBinding = "auth"
View Source
const RootDestinationBinding = "destination"
View Source
const RootMetadataBinding = "metadata"
View Source
const RootRequestBinding = "request"
View Source
const RootSourceBinding = "source"

Variables

This section is empty.

Functions

func AuthJsonToCel

func AuthJsonToCel(json string) (map[string]interface{}, error)

todo this should eventually be sourced as proper proto from the pipeline

func Compile

func Compile(expression string, expectedType *cel.Type, opts ...cel.EnvOption) (cel.Program, error)

func ValueToJSON

func ValueToJSON(val ref.Val) (string, error)

Types

type Expression

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

func NewExpression

func NewExpression(source string) (*Expression, error)

func (*Expression) Evaluate

func (e *Expression) Evaluate(json string) (ref.Val, *cel.EvalDetails, error)

func (*Expression) ResolveFor

func (e *Expression) ResolveFor(json string) (interface{}, error)

type Predicate

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

func NewPredicate

func NewPredicate(source string) (*Predicate, error)

func (*Predicate) Matches

func (p *Predicate) Matches(json string) (bool, error)

type StringExpression

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

Jump to

Keyboard shortcuts

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