path

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrExpressionNotSupported = errors.New("expression not supported")

Functions

This section is empty.

Types

type Part

type Part interface {
	Kind() PartKind
	// contains filtered or unexported methods
}

type PartKind

type PartKind int
const (
	RootKind PartKind = iota
	MapKind
	SeqKind
)

type Path

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

func Parse

func Parse(expression string) (Path, error)

func Root

func Root() Path

func (Path) AppendMapPart

func (p Path) AppendMapPart(key string) Path

func (Path) AppendSeqPart

func (p Path) AppendSeqPart(index int) Path

func (Path) Last

func (p Path) Last() Part

func (Path) Len

func (p Path) Len() int

func (Path) Matches

func (p Path) Matches(testSubject Path) bool

func (Path) String

func (p Path) String() string

Jump to

Keyboard shortcuts

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