yamled

package
v2.26.2 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Document

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

func Load

func Load(r io.Reader) (*Document, error)

func NewDocumentFromNode added in v2.21.0

func NewDocumentFromNode(m *yaml.Node) (*Document, error)

func (*Document) Append

func (d *Document) Append(path Path, newValue interface{}) bool

func (*Document) DecodeAtPath added in v2.21.0

func (d *Document) DecodeAtPath(path Path, dst interface{}) error

func (*Document) Equal added in v2.17.0

func (d *Document) Equal(other *Document) bool

func (*Document) Fill

func (d *Document) Fill(path Path, newValue interface{}) bool

Fill will set the value at the path to the newValue, but keeps any existing sub values intact.

func (*Document) GetArray

func (d *Document) GetArray(path Path) ([]interface{}, bool)

func (*Document) GetBool

func (d *Document) GetBool(path Path) (bool, bool)

func (*Document) GetInt

func (d *Document) GetInt(path Path) (int, bool)

func (*Document) GetNode added in v2.21.0

func (d *Document) GetNode(path Path) (*yaml.Node, bool)

func (*Document) GetString

func (d *Document) GetString(path Path) (string, bool)

func (*Document) GetValue added in v2.21.0

func (d *Document) GetValue(path Path) (interface{}, bool)

func (*Document) Has

func (d *Document) Has(path Path) bool

func (*Document) IsEmpty added in v2.22.0

func (d *Document) IsEmpty() bool

func (*Document) MarshalYAML

func (d *Document) MarshalYAML() (interface{}, error)

func (*Document) Remove

func (d *Document) Remove(path Path) bool

func (*Document) Set

func (d *Document) Set(path Path, newValue interface{}) bool

type Path

type Path []Step

func (Path) Append added in v2.21.0

func (p Path) Append(s Step) Path

func (Path) End added in v2.21.0

func (p Path) End() Step

func (Path) Parent

func (p Path) Parent() Path

Parent returns the path except for the last element.

func (Path) String

func (p Path) String() string

type Step

type Step interface{}

Jump to

Keyboard shortcuts

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