cel

package
v0.1.0-debug.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Int

func Int(i int) string

func Str

func Str(s string) string

Types

type CELParser

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

func NewCELParser

func NewCELParser() *CELParser

func (*CELParser) CheckStepRunOutAgainstKnown

func (p *CELParser) CheckStepRunOutAgainstKnown(out *StepRunOut, knownType dbsqlc.StepExpressionKind) error

func (*CELParser) CheckStepRunOutAgainstKnownV1

func (p *CELParser) CheckStepRunOutAgainstKnownV1(out *StepRunOut, knownType sqlcv1.StepExpressionKind) error

func (*CELParser) ParseAndEvalStepRun

func (p *CELParser) ParseAndEvalStepRun(stepRunExpr string, in Input) (*StepRunOut, error)

func (*CELParser) ParseAndEvalWorkflowString

func (p *CELParser) ParseAndEvalWorkflowString(workflowExp string, in Input) (string, error)

func (*CELParser) ParseStepRun

func (p *CELParser) ParseStepRun(stepRunExpr string) (cel.Program, error)

func (*CELParser) ParseWorkflowString

func (p *CELParser) ParseWorkflowString(workflowExp string) (cel.Program, error)

type Input

type Input map[string]interface{}

func NewInput

func NewInput(opts ...InputOpts) Input

type InputOpts

type InputOpts func(Input)

func WithAdditionalMetadata

func WithAdditionalMetadata(metadata map[string]interface{}) InputOpts

func WithInput

func WithInput(input map[string]interface{}) InputOpts

func WithParents

func WithParents(parents any) InputOpts

func WithWorkflowRunID

func WithWorkflowRunID(workflowRunID string) InputOpts

type StepRunOut

type StepRunOut struct {
	String *string
	Int    *int
	Type   StepRunOutType
}

type StepRunOutType

type StepRunOutType string
const (
	StepRunOutTypeString StepRunOutType = "string"
	StepRunOutTypeInt    StepRunOutType = "int"
)

Jump to

Keyboard shortcuts

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