api

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2023 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Search(expression string, data interface{}, funcs ...functions.FunctionEntry) (interface{}, error)

Search evaluates a JMESPath expression against input data and returns the result.

Types

type JMESPath

type JMESPath interface {
	Search(interface{}) (interface{}, error)
}

JMESPath is the representation of a compiled JMES path query. A JMESPath is safe for concurrent use by multiple goroutines.

func Compile

func Compile(expression string, funcs ...functions.FunctionEntry) (JMESPath, error)

Compile parses a JMESPath expression and returns, if successful, a JMESPath object that can be used to match against data.

func MustCompile

func MustCompile(expression string, funcs ...functions.FunctionEntry) JMESPath

MustCompile is like Compile but panics if the expression cannot be parsed. It simplifies safe initialization of global variables holding compiled JMESPaths.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL