path

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JSONPathPrefix string = "jsonpath::"
)

Variables

View Source
var (
	ErrInvalidJSONPath = fmt.Errorf("invalid JSONPath")
)

Functions

func NewJSONPathFromString

func NewJSONPathFromString(path string) (string, error)

Types

type IntOrPath

type IntOrPath struct {
	Int  int64
	Path *Path
}

func (*IntOrPath) IsInt

func (r *IntOrPath) IsInt() bool

func (*IntOrPath) UnmarshalJSON

func (r *IntOrPath) UnmarshalJSON(bytes []byte) error

type Path

type Path struct {
	// contains filtered or unexported fields
}

func New

func New(expr string) (*Path, error)

func NewOrPanic

func NewOrPanic(expr string) *Path

func (*Path) Expr

func (p *Path) Expr() string

func (*Path) Find

func (p *Path) Find(vm *k6tv1.VirtualMachine) (Results, error)

func (*Path) MarshalJSON

func (p *Path) MarshalJSON() ([]byte, error)

func (*Path) UnmarshalJSON

func (p *Path) UnmarshalJSON(bytes []byte) error

type Results

type Results [][]reflect.Value

func (*Results) AsInt64

func (r *Results) AsInt64() ([]int64, error)

func (*Results) AsString

func (r *Results) AsString() ([]string, error)

func (*Results) Len

func (r *Results) Len() int

type StringOrPath

type StringOrPath struct {
	Str  string
	Path *Path
}

func (*StringOrPath) IsString

func (r *StringOrPath) IsString() bool

func (*StringOrPath) UnmarshalJSON

func (r *StringOrPath) UnmarshalJSON(bytes []byte) error

Jump to

Keyboard shortcuts

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