cel

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2022 License: BSD-3-Clause Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Evaluate

func Evaluate(env *cel.Env, expression string, params map[string]interface{}) (ref.Val, error)

执行表达式

func NewEnv

func NewEnv(c *CustomLib) (*cel.Env, error)

func UrlTypeToString

func UrlTypeToString(u *structs.UrlType) string

Types

type CustomLib

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

自定义Lib库,包含变量和函数

func NewEnvOption

func NewEnvOption() CustomLib

func (*CustomLib) CompileOptions

func (c *CustomLib) CompileOptions() []cel.EnvOption

声明环境中的变量类型和函数

func (*CustomLib) ProgramOptions

func (c *CustomLib) ProgramOptions() []cel.ProgramOption

func (*CustomLib) UpdateCompileOptions

func (c *CustomLib) UpdateCompileOptions(args map[string]string)

Jump to

Keyboard shortcuts

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