cel

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	Data map[string]interface{}
	// contains filtered or unexported fields
}

Context makes it easy to execute CEL expressions on JSON body.

func New

func New(repoURL string, commit interface{}) (*Context, error)

New creates and returns a Context for evaluating expressions.

func (*Context) Evaluate

func (c *Context) Evaluate(expr string) (ref.Val, error)

Evaluate evaluates the provided expression and returns the result.

func (*Context) EvaluateToParamValue

func (c *Context) EvaluateToParamValue(expr string) (*pipelinev1beta1.ArrayOrString, error)

EvaluateToParamValue evaluates the provided expression, and converts it to a pipeline ArrayOrString value for a PipelineRun parameter.

Jump to

Keyboard shortcuts

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