Documentation
¶
Overview ¶
Package filter applies filters (`count`, `jsonpath`, `toInt`, …) to the value of a query.
Index ¶
- func Apply(items []*syntax.FilterItem, v value.Value, env *template.Env, inAssert bool) (value.Value, error)
- func Eval(f *syntax.Filter, v value.Value, env *template.Env, inAssert bool) (value.Value, error)
- func EvalJSONPath(doc value.Value, expr *syntax.Template, env *template.Env) (value.Value, error)
- func EvalXPath(doc *xpath.Document, expr *syntax.Template, env *template.Env) (value.Value, error)
- func FirstGroup(re *regexp.Regexp, s string) (string, bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Apply ¶
func Apply(items []*syntax.FilterItem, v value.Value, env *template.Env, inAssert bool) (value.Value, error)
Apply applies filters in order to v. A nil result means the last filter produced no value; a filter that receives no value fails. inAssert marks errors raised while evaluating an assert.
func EvalJSONPath ¶
EvalJSONPath evaluates a JSONPath template on a document. No match gives nil, one match its value, several matches a list.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.