# Functions
ClosureFunction allows you to define a Function using closures, this is a convenient constructor for function implementations that don't manage complex state.
ErrFrom wraps an error with the annotation of a function.
ExecToBytes returns a byte slice from a function execution.
ExecToString returns a string from a function execution.
FunctionDocs returns a slice of specs, one for each function.
InitFunctionHelper attempts to initialise a function by its name and a list of arguments, this is convenient for writing tests.
InitMethodHelper attempts to initialise a method by its name, target function and arguments, this is convenient for writing tests.
MethodDocs returns a slice of specs, one for each method.
NewArithmeticExpression creates a single query function from a list of child functions and the arithmetic operator types that chain them together.
NewArrayLiteral creates an array literal from a slice of values.
NewDeprecatedFunctionSpec creates a new function spec that is deprecated.
NewDeprecatedMethodSpec creates a new method spec that is deprecated.
NewExampleSpec creates a new example spec.
NewFieldFunction creates a query function that returns a field from the current context.
NewFunctionSet creates a function set without any functions in it.
NewFunctionSpec creates a new function spec.
NewGetMethod creates a new get method.
NewHiddenFunctionSpec creates a new function spec that is hidden from the docs.
NewHiddenMethodSpec creates a new method spec that is hidden from docs.
NewIfFunction creates a logical if expression from a query which should return a boolean value.
NewLiteralFunction creates a query function that returns a static, literal value.
NewMapLiteral creates a map literal from a slice of key/value pairs.
NewMapMethod attempts to create a map method.
NewMatchCase creates a single match case of a match expression, where a case query is checked and, if true, the underlying query is executed and returned.
NewMatchFunction takes a contextual mapping and a list of MatchCases, when the function is executed.
NewMetaFunction creates a new function for obtaining a metadata value.
NewMethodSet creates a method set without any methods in it.
NewMethodSpec creates a new method spec.
NewNamedContextFieldFunction creates a query function that attempts to return a field from a named context.
NewNamedContextFunction wraps a function and ensures that when the function is executed with a new context the context is captured under a new name, with the "main" context left intact.
NewNotTestedExampleSpec creates a new not tested example spec.
NewParams creates a new empty parameters definition.
NewRootFieldFunction creates a query function that returns a field from the root context.
NewTargetPath constructs a new target path from a type and zero or more path segments.
NewTypeMismatch creates a new type mismatch error.
NewVarFunction creates a new variable function.
Not returns a logical NOT of a child function.
ParamAny creates a new parameter that can be any type (excluding query).
ParamArray creates a new array typed parameter.
ParamBool creates a new bool typed parameter.
ParamFloat creates a new float typed parameter.
ParamInt64 creates a new integer typed parameter.
ParamObject creates a new object typed parameter.
ParamQuery creates a new query typed parameter.
ParamString creates a new string typed parameter.
ParamTimestamp creates a new timestamp typed parameter.
SliceToDotPath returns a valid dot path from a slice of path segments.
VariadicParams creates a new empty parameters definition where any number of nameless arguments are considered valid.
# Constants
All arithmetic operators.
All arithmetic operators.
All arithmetic operators.
All arithmetic operators.
All arithmetic operators.
All arithmetic operators.
All arithmetic operators.
All arithmetic operators.
All arithmetic operators.
All arithmetic operators.
All arithmetic operators.
All arithmetic operators.
All arithmetic operators.
All arithmetic operators.
TargetTypes.
TargetTypes.
TargetTypes.
TargetTypes.
# Variables
AllFunctions is a set containing every single function declared by this package, and any globally declared plugin methods.
AllMethods is a set containing every single method declared by this package, and any globally declared plugin methods.
ErrDivideByZero occurs when an arithmetic operator is prevented from dividing a value by zero.
Function categories.
Function categories.
Function categories.
Function categories.
Function categories.
Function categories.
Method categories.
Method categories.
Method categories.
Method categories.
Method categories.
Method categories.
Method categories.
Method categories.
Method categories.
Method categories.
Method categories.
Method categories.
Component statuses.
Component statuses.
Component statuses.
Component statuses.
Component statuses.
# Structs
ElseIf represents an else-if block in an if expression.
ErrNoContext is a common query error where a query attempts to reference a structured field when there is no context.
ExampleSpec provides a mapping example and some input/output results to display.
FunctionContext provides access to a range of query targets for functions to reference.
FunctionSet contains an explicit set of functions to be available in a Bloblang query.
FunctionSpec describes a Bloblang function.
Literal wraps a static value and returns it for each invocation of the function.
MatchCase represents a single match case of a match expression, where a case query is checked and, if true, the underlying query is executed and returned.
MethodCatSpec describes how a method behaves in the context of a given category.
MethodSet contains an explicit set of methods to be available in a Bloblang query.
MethodSpec describes a Bloblang method.
NamedContextFunction wraps a query function in a mechanism that captures the current context under an alias.
ParamDefinition describes a single parameter for a function or method.
Params defines the expected arguments of a function or method.
ParsedParams is a reference to the arguments of a method or function instantiation.
TargetPath represents a target type and segmented path that a query function references.
TargetsContext describes the current Bloblang execution environment from the perspective of a particular query function in a way that allows it to determine which values it is targeting and the origins of those values.
TypeMismatch represents an error where two values should be a comparable type but are not.
# Interfaces
Function takes a set of contextual arguments and returns the result of the query.
Iterable is an interface implemented by Bloblang functions that are able to expose their results as an interator, allowing for more efficient chaining of array based methods.
Iterator allows traversal of a Bloblang function result in iterations.
MessageBatch is an interface type to be given to a query function, it allows the function to resolve fields and metadata from a Benthos message batch.
MetaMsg provides access to the metadata of a message.
# Type aliases
ArithmeticOperator represents an arithmetic operation that combines the results of two query functions.
FunctionCtor constructs a new function from input arguments.
MethodCtor constructs a new method from a target function and input args.
Status of a function or method.
TargetType represents a query target type, which is a source of information that a query might require, such as metadata, structured message contents, the context, etc.