node

package
v0.124.1 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFailedToMarshal = errors.New("failed to marshal to YAML")

Functions

func ReversePath added in v0.31.1

func ReversePath(path []int) []int

Types

type ListValue

type ListValue struct{}

type MapValue

type MapValue struct{}

type Node

type Node struct {
	Name     string
	Value    interface{}
	Parent   *Node
	Children []*Node

	Line   int
	Column int
}

func NewFromNodeWithMergeExemptions added in v0.113.0

func NewFromNodeWithMergeExemptions(yamlNode yaml.Node, mergeExemptions []nameable.Nameable) (*Node, error)

func NewFromText added in v0.32.0

func NewFromText(text string) (*Node, error)

func NewFromTextWithMergeExemptions added in v0.73.0

func NewFromTextWithMergeExemptions(text string, mergeExemptions []nameable.Nameable) (*Node, error)

func (*Node) CopyWithParent added in v0.27.1

func (node *Node) CopyWithParent(parent *Node) *Node

func (*Node) Deduplicate added in v0.23.1

func (node *Node) Deduplicate()

func (*Node) DeepCopy added in v0.31.1

func (node *Node) DeepCopy() *Node

func (*Node) DeepCopyWithReplacements added in v0.31.1

func (node *Node) DeepCopyWithReplacements(target *Node, replacements []*Node) *Node

func (*Node) DeepFindChild

func (node *Node) DeepFindChild(name string) *Node

DeepFindChild recursively traverses node's children and returns the first node found named name.

func (*Node) DeepFindCollectible added in v0.23.1

func (node *Node) DeepFindCollectible(name string) *Node

func (*Node) FindChild added in v0.15.0

func (node *Node) FindChild(name string) *Node

func (*Node) FindParent added in v0.31.1

func (node *Node) FindParent(predicate Predicate) *Node

func (*Node) FlattenedValue added in v0.32.0

func (node *Node) FlattenedValue() (string, error)

func (*Node) GetBoolValue added in v0.9.0

func (node *Node) GetBoolValue(env map[string]string, boolevator *boolevator.Boolevator) (bool, error)

func (*Node) GetCredentials added in v0.81.0

func (node *Node) GetCredentials(env map[string]string) (string, error)

func (*Node) GetExpandedStringValue

func (node *Node) GetExpandedStringValue(env map[string]string) (string, error)

func (*Node) GetFloat64Mapping added in v0.79.0

func (node *Node) GetFloat64Mapping(env map[string]string) (map[string]float64, error)

func (*Node) GetMapOrListOfMaps added in v0.36.0

func (node *Node) GetMapOrListOfMaps() (map[string]string, error)

func (*Node) GetMapOrListOfMapsWithExpansion added in v0.66.4

func (node *Node) GetMapOrListOfMapsWithExpansion(env map[string]string) (map[string]string, error)

func (*Node) GetPath added in v0.31.1

func (node *Node) GetPath(path []int) *Node

func (*Node) GetScript added in v0.10.0

func (node *Node) GetScript() ([]string, error)

func (*Node) GetSliceOfExpandedStrings added in v0.9.0

func (node *Node) GetSliceOfExpandedStrings(env map[string]string) ([]string, error)

func (*Node) GetSliceOfNonEmptyStrings

func (node *Node) GetSliceOfNonEmptyStrings() ([]string, error)

func (*Node) GetSliceOfStrings added in v0.9.0

func (node *Node) GetSliceOfStrings() ([]string, error)

func (*Node) GetStringMapping

func (node *Node) GetStringMapping() (map[string]string, error)

func (*Node) GetStringValue

func (node *Node) GetStringValue() (string, error)

func (*Node) HasChild

func (node *Node) HasChild(name string) bool

func (*Node) IsMap added in v0.71.2

func (node *Node) IsMap() bool

func (*Node) MarshalYAML added in v0.31.1

func (node *Node) MarshalYAML() (*yaml.Node, error)

func (*Node) MergeFrom added in v0.23.1

func (node *Node) MergeFrom(other *Node)

func (*Node) MergeFromMap added in v0.71.5

func (node *Node) MergeFromMap(with *Node, mergeExemptions []nameable.Nameable)

func (*Node) MergeListOfMapsToSingleMap added in v0.28.1

func (node *Node) MergeListOfMapsToSingleMap()

func (*Node) OverwriteWith added in v0.71.5

func (node *Node) OverwriteWith(with *Node)

func (*Node) ParserError added in v0.33.0

func (node *Node) ParserError(format string, args ...interface{}) error

func (*Node) PathUpwardsUpto added in v0.31.1

func (node *Node) PathUpwardsUpto(upto *Node) []int

func (*Node) ReplaceWith added in v0.31.1

func (node *Node) ReplaceWith(with []*Node)

func (*Node) String added in v0.27.1

func (node *Node) String() string

func (*Node) ToInterface added in v0.81.0

func (node *Node) ToInterface() (interface{}, error)

func (*Node) ValueIsEmpty added in v0.66.4

func (node *Node) ValueIsEmpty() bool

func (*Node) ValueTypeAsString added in v0.66.4

func (node *Node) ValueTypeAsString() string

type Predicate added in v0.31.1

type Predicate func(nodeName string) bool

type ScalarValue

type ScalarValue struct {
	Value string
}

Jump to

Keyboard shortcuts

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