yamled

package
v3.0.0-...-d6c4d9c Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 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

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

func (*Document) Append

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

func (*Document) DecodeAtPath

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

func (*Document) Equal

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

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

func (*Document) GetString

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

func (*Document) GetValue

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

func (*Document) Has

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

func (*Document) IsEmpty

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

func (p Path) Append(s Step) Path

func (Path) End

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