expression

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EvalExpression

func EvalExpression(expr *Expression, msg protoreflect.Message) (string, error)

EvalExpression evaluates an expression against a proto message

Types

type Expression

type Expression struct {
	Fragments []*Fragment `parser:"@@*"`
}

Declare simple grammer for bloblang expressions

func MustParseExpression

func MustParseExpression(input string) *Expression

MustParseExpression attempts to parse an Expression and panics on error

func ParseExpression

func ParseExpression(input string) (*Expression, error)

ParseExpression parses an Expression value from the provided string

type Fragment

type Fragment struct {
	Ident string `parser:"( @String"`
	Expr  *Query `parser:"  | '${!' @@ '}' )"`
}

Declare simple grammer for bloblang expressions

type Query

type Query struct {
	Mapping string `parser:"@Mapping"`
	// contains filtered or unexported fields
}

Declare simple grammer for bloblang expressions

Jump to

Keyboard shortcuts

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