Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrEvaluationFailed indicates that the evaluation of the expression // failed with an error. ErrEvaluationFailed = errors.New("jmespath: evaluation failed") // ErrInvalidArity indicates that the expression called a function with an // incorrect number of arguments. ErrInvalidArity = errors.New("jmespath: invalid arity") // ErrInvalidType indicates that a field was used in a context where its // type wasn't valid. ErrInvalidType = errors.New("jmespath: invalid type") // ErrInvalidValue indicates that a field was used in a context where its // value wasn't valid. ErrInvalidValue = errors.New("jmespath: invalid value") // ErrNotANumber indicates that the an operation produced an infinity or // not-a-number result. ErrNotANumber = errors.New("jmespath: not a number") // ErrSyntax indicates that the expression contains a syntax error. ErrSyntax = errors.New("jmespath: syntax error") // ErrUndefinedVariable indicates that the expression attempted to access a // variable that hadn't been defined. ErrUndefinedVariable = errors.New("jmespath: undefined variable") // ErrUnknownFunction indicates that the expression attempted to invoke a // function that hasn't been defined. ErrUnknownFunction = errors.New("jmespath: unknown function") )
Functions ¶
Types ¶
type Expression ¶
type Expression struct {
// contains filtered or unexported fields
}
Expression represents a compiled expression.
func Compile ¶
func Compile(expression string) (*Expression, error)
Compile compiles expression and, if successful, returns an Expression that can be used evaluate it against data.
func MustCompile ¶
func MustCompile(expression string) *Expression
MustCompile is like Compile but panics if the expression cannot be compiled.
Click to show internal directories.
Click to hide internal directories.