path

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArrayMatch

type ArrayMatch struct {
	Matcher
}

func (*ArrayMatch) Build

func (a *ArrayMatch) Build(pattern string) ComputedMatcher

func (*ArrayMatch) RawMatch

func (a *ArrayMatch) RawMatch(pattern string) bool

type AttributeMatch

type AttributeMatch struct {
	Matcher
}

func (*AttributeMatch) Build

func (a *AttributeMatch) Build(pattern string) ComputedMatcher

func (*AttributeMatch) RawMatch

func (a *AttributeMatch) RawMatch(pattern string) bool

type ComputedArrayMatch

type ComputedArrayMatch struct {
	ComputedMatcher
	// contains filtered or unexported fields
}

func (*ComputedArrayMatch) StrictMatch

func (c *ComputedArrayMatch) StrictMatch(node *xml.Element, _ string) Elements

func (*ComputedArrayMatch) TrailingMatch

func (c *ComputedArrayMatch) TrailingMatch() Elements

type ComputedAttributeMatch

type ComputedAttributeMatch struct {
	ComputedMatcher
	// contains filtered or unexported fields
}

func (*ComputedAttributeMatch) StrictMatch

func (c *ComputedAttributeMatch) StrictMatch(node *xml.Element, _ string) Elements

func (*ComputedAttributeMatch) TrailingMatch

func (c *ComputedAttributeMatch) TrailingMatch() Elements

type ComputedListMatch

type ComputedListMatch struct {
	ComputedMatcher
	// contains filtered or unexported fields
}

func (*ComputedListMatch) StrictMatch

func (c *ComputedListMatch) StrictMatch(node *xml.Element, _ string) Elements

func (*ComputedListMatch) TrailingMatch

func (c *ComputedListMatch) TrailingMatch() Elements

type ComputedMatcher

type ComputedMatcher interface {
	StrictMatch(node *xml.Element, input string) Elements
	TrailingMatch() Elements
}

type ComputedWildcardMatcher

type ComputedWildcardMatcher struct {
	ComputedMatcher
	// contains filtered or unexported fields
}

func (*ComputedWildcardMatcher) StrictMatch

func (w *ComputedWildcardMatcher) StrictMatch(node *xml.Element, _ string) Elements

func (*ComputedWildcardMatcher) TrailingMatch

func (w *ComputedWildcardMatcher) TrailingMatch() Elements

type DefaultMatcher

type DefaultMatcher = StringMatch

type Elements

type Elements []*xml.Element

func FindWithPath

func FindWithPath(pattern string, root *xml.Element) Elements

type ListMatch

type ListMatch struct {
	Matcher
}

func (*ListMatch) Build

func (l *ListMatch) Build(pattern string) ComputedMatcher

func (*ListMatch) RawMatch

func (l *ListMatch) RawMatch(pattern string) bool

type Matcher

type Matcher interface {
	Build(pattern string) ComputedMatcher
	RawMatch(pattern string) bool
}

type Path

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

Path is a path to a node in the XML tree.

func NewPathing

func NewPathing(rawPattern string) *Path

func (*Path) Find

func (p *Path) Find(root *xml.Element) Elements

type StringMatch

type StringMatch struct {
}

func (*StringMatch) Build

func (s *StringMatch) Build(_ string) ComputedMatcher

func (*StringMatch) RawMatch

func (s *StringMatch) RawMatch(_ string) bool

func (*StringMatch) StrictMatch

func (s *StringMatch) StrictMatch(node *xml.Element, input string) Elements

func (*StringMatch) TrailingMatch

func (s *StringMatch) TrailingMatch() Elements

type WildcardMatch

type WildcardMatch struct {
	Matcher
}

func (*WildcardMatch) Build

func (w *WildcardMatch) Build(pattern string) ComputedMatcher

func (*WildcardMatch) RawMatch

func (w *WildcardMatch) RawMatch(pattern string) bool

Jump to

Keyboard shortcuts

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