xpath

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Overview

Basic XPath parser and evaluator. YANG does use a limited subset of XPath for describing some relationships and notification filters

Index

Constants

View Source
const (
	ParseEnd = 0
	ParseErr
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AbsolutePath

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

func (*AbsolutePath) Append

func (self *AbsolutePath) Append(p Path)

func (*AbsolutePath) Next

func (self *AbsolutePath) Next() Path

func (*AbsolutePath) Parent

func (self *AbsolutePath) Parent() Path

func (*AbsolutePath) SetParent

func (self *AbsolutePath) SetParent(parent Path)

func (*AbsolutePath) String

func (self *AbsolutePath) String() string

type Expression

type Expression interface {
	String() string
}

type Operator

type Operator struct {
	Oper string
	Lhs  interface{}
}

func (*Operator) String

func (self *Operator) String() string

type Path

type Path interface {
	SetParent(Path)
	Parent() Path
	String() string
	Append(Path)
	Next() Path
}

func Parse

func Parse(pstr string) (Path, error)

type Segment

type Segment struct {
	Ident string
	Expr  Expression
	// contains filtered or unexported fields
}

func (*Segment) Append

func (self *Segment) Append(next Path)

func (*Segment) Next

func (self *Segment) Next() Path

func (*Segment) Parent

func (self *Segment) Parent() Path

func (*Segment) SetParent

func (self *Segment) SetParent(parent Path)

func (*Segment) String

func (self *Segment) String() string

type Token

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

Jump to

Keyboard shortcuts

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