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
func MustParseMapping ¶ added in v1.0.0
MustParseMapping attempts to parse a bloblang mapping and panics on error
func ToStructured ¶ added in v1.0.0
func ToStructured(msg protoreflect.Message) (any, error)
ToStructured marshals a proto message into a map[string]any value
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
Click to show internal directories.
Click to hide internal directories.