Documentation ¶
Overview ¶
Utility functions for extracting and validating inputs to functions and plugins.
Index ¶
- func ExtractArgs(scope types.Scope, args *ordereddict.Dict, target interface{}) error
- func ExtractArgsWithContext(ctx context.Context, scope types.Scope, args *ordereddict.Dict, ...) error
- func GetStringArg(ctx context.Context, scope types.Scope, args *ordereddict.Dict, field string) string
- func RegisterParser(exemplar types.Any, parser ParserDipatcher)
- func ToLazyExpr(scope types.Scope, arg types.Any) types.LazyExpr
- func ToStoredQuery(ctx context.Context, arg types.Any) types.StoredQuery
- type FieldParser
- type LazyExpressionWrapper
- type Parser
- type ParserDipatcher
- type StoredQueryWrapperLazyExpression
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractArgs ¶
func ExtractArgs(scope types.Scope, args *ordereddict.Dict, target interface{}) error
Deprecate this in favor of ExtractArgsWithContext
func ExtractArgsWithContext ¶
func GetStringArg ¶
func RegisterParser ¶
func RegisterParser(exemplar types.Any, parser ParserDipatcher)
func ToLazyExpr ¶
Wrap an arg in a LazyExpr for plugins that want to receive a LazyExpr.
func ToStoredQuery ¶
Convert a type to a stored query
Types ¶
type FieldParser ¶
type FieldParser struct { Field string FieldIdx int Required bool Parser ParserDipatcher }
type LazyExpressionWrapper ¶
type LazyExpressionWrapper struct {
// contains filtered or unexported fields
}
func (*LazyExpressionWrapper) Delegate ¶
func (self *LazyExpressionWrapper) Delegate() types.Any
func (*LazyExpressionWrapper) Reduce ¶
func (self *LazyExpressionWrapper) Reduce(ctx context.Context) types.Any
func (*LazyExpressionWrapper) ReduceWithScope ¶
type Parser ¶
type Parser struct {
Fields []*FieldParser
}
func BuildParser ¶
Builds a cacheable parser that can parse into
type ParserDipatcher ¶
type StoredQueryWrapperLazyExpression ¶
type StoredQueryWrapperLazyExpression struct {
// contains filtered or unexported fields
}
Wrap a Stored Query with a LazyExpr interface. Callers will receive the Stored Query when reducing us.
func (*StoredQueryWrapperLazyExpression) Delegate ¶
func (self *StoredQueryWrapperLazyExpression) Delegate() types.StoredQuery
func (*StoredQueryWrapperLazyExpression) Reduce ¶
func (self *StoredQueryWrapperLazyExpression) Reduce(ctx context.Context) types.Any
func (*StoredQueryWrapperLazyExpression) ReduceWithScope ¶
Click to show internal directories.
Click to hide internal directories.