Documentation ¶
Index ¶
- Variables
- type Array
- type Attribute
- type AttributeDataStore
- type DataStore
- type Duration
- type Environment
- type Executor
- func (e Executor) Expression(expression string) (value.Value, error)
- func (e Executor) GetParsedStatement(statement string) (Statement, error)
- func (e Executor) ResolveExpression(expr *Expr) (value.Value, error)
- func (e Executor) ResolveStatement(statement string) (string, error)
- func (e Executor) Statement(statement string) (string, string, error)
- type Expr
- type ExpressionOperation
- type Filter
- type FunctionCall
- type InvalidSyntaxError
- type MetaAttributesDataStore
- type OpTerm
- type OperationRegistry
- type ResolutionError
- type Statement
- type Str
- type Term
- type TermType
- type Token
- type Variable
- type VariableDataStore
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrExpressionResolution error = errors.New("resolution error")
View Source
var ErrInvalidSyntax error = errors.New("invalid syntax")
View Source
var ErrNoMatch error = errors.New("no match")
Functions ¶
This section is empty.
Types ¶
type Attribute ¶
type Attribute struct {
// contains filtered or unexported fields
}
func NewAttribute ¶
type AttributeDataStore ¶
func (AttributeDataStore) Source ¶
func (ds AttributeDataStore) Source() string
type Environment ¶
type Environment struct {
// contains filtered or unexported fields
}
func (*Environment) Capture ¶
func (e *Environment) Capture(in []string) error
func (*Environment) Name ¶
func (e *Environment) Name() string
type Executor ¶
func NewExecutor ¶
func (Executor) GetParsedStatement ¶
func (Executor) ResolveExpression ¶
func (Executor) ResolveStatement ¶
type ExpressionOperation ¶
type ExpressionOperation func(types.TypedValue, types.TypedValue) (types.TypedValue, error)
type FunctionCall ¶
type InvalidSyntaxError ¶
type InvalidSyntaxError struct {
// contains filtered or unexported fields
}
func (*InvalidSyntaxError) Error ¶
func (e *InvalidSyntaxError) Error() string
func (*InvalidSyntaxError) Is ¶
func (e *InvalidSyntaxError) Is(target error) bool
func (*InvalidSyntaxError) Unwrap ¶
func (e *InvalidSyntaxError) Unwrap() error
type MetaAttributesDataStore ¶
func (MetaAttributesDataStore) Get ¶
func (ds MetaAttributesDataStore) Get(name string) (string, error)
func (MetaAttributesDataStore) Source ¶
func (ds MetaAttributesDataStore) Source() string
type OperationRegistry ¶
type OperationRegistry struct {
// contains filtered or unexported fields
}
func (*OperationRegistry) Add ¶
func (r *OperationRegistry) Add(name string, operation ExpressionOperation)
func (*OperationRegistry) Get ¶
func (r *OperationRegistry) Get(name string) (ExpressionOperation, error)
type ResolutionError ¶
type ResolutionError struct {
// contains filtered or unexported fields
}
func (*ResolutionError) Error ¶
func (e *ResolutionError) Error() string
func (*ResolutionError) Is ¶
func (e *ResolutionError) Is(target error) bool
func (*ResolutionError) Unwrap ¶
func (e *ResolutionError) Unwrap() error
type Statement ¶
func ParseStatement ¶
type Term ¶
type Term struct { FunctionCall *FunctionCall `( @@` Array *Array `| @@` Duration *Duration `| @Duration ` Number *string `| @Number ` Attribute *Attribute `| @Attribute ` Environment *Environment `| @Environment ` Variable *Variable `| @Variable ` Str *Str `| @(QuotedString|SingleQuotedString) )` }
type Token ¶
func GetTokensFromExpression ¶
type Variable ¶
type Variable struct {
// contains filtered or unexported fields
}
func NewEnvironment ¶
func NewVariable ¶
type VariableDataStore ¶
type VariableDataStore struct {
Values []variableset.VariableSetValue
}
func (VariableDataStore) Source ¶
func (ds VariableDataStore) Source() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.