yaml

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NullTag      = "!!null"
	BoolTag      = "!!bool"
	StrTag       = "!!str"
	IntTag       = "!!int"
	FloatTag     = "!!float"
	TimestampTag = "!!timestamp"
	SeqTag       = "!!seq"
	MapTag       = "!!map"
	BinaryTag    = "!!binary"
	MergeTag     = "!!merge"
)
View Source
const (
	DocumentNode = yaml.DocumentNode
	SequenceNode = yaml.SequenceNode
	MappingNode  = yaml.MappingNode
	ScalarNode   = yaml.ScalarNode
	AliasNode    = yaml.AliasNode
)
View Source
const (
	TaggedStyle       = yaml.TaggedStyle
	DoubleQuotedStyle = yaml.DoubleQuotedStyle
	SingleQuotedStyle = yaml.SingleQuotedStyle
	LiteralStyle      = yaml.LiteralStyle
	FoldedStyle       = yaml.FoldedStyle
	FlowStyle         = yaml.FlowStyle
)

Variables

This section is empty.

Functions

func GopkgMarshal

func GopkgMarshal(in any) (out []byte, err error)

func GopkgUnmarshal

func GopkgUnmarshal(in []byte, out interface{}) (err error)

func Marshal

func Marshal(in any) (out []byte, err error)

func Unmarshal

func Unmarshal(in []byte, out interface{}) (err error)

Types

type Decoder

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

A Decoder reads and decodes YAML values from an input stream.

func NewDecoder

func NewDecoder(r io.Reader) *Decoder

func (*Decoder) Decode

func (dec *Decoder) Decode(v interface{}) (err error)

Decode reads the next YAML-encoded value from its input and stores it in the value pointed to by v.

See the documentation for Unmarshal for details about the conversion of YAML into a Go value.

func (*Decoder) KnownFields

func (dec *Decoder) KnownFields(enable bool)

type Encoder

type Encoder = yaml.Encoder

func NewEncoder

func NewEncoder(w io.Writer) *Encoder

type EntryUnmarshaler

type EntryUnmarshaler interface {
	UnmarshalYAMLEntry(key string, value *Node) (ok bool, err error)
}

type IsZeroer

type IsZeroer = yaml.IsZeroer

type Kind

type Kind = yaml.Kind

type Marshaler

type Marshaler = yaml.Marshaler

type Node

type Node yaml.Node

func (*Node) Decode

func (n *Node) Decode(v interface{}) (err error)

Decode decodes the node and stores its data into the value pointed to by v.

See the documentation for Unmarshal for details about the conversion of YAML into a Go value.

func (*Node) IsZero

func (n *Node) IsZero() bool

func (*Node) LongTag

func (n *Node) LongTag() string

func (*Node) SetString

func (n *Node) SetString(s string)

func (*Node) ShortTag

func (n *Node) ShortTag() string

type Style

type Style = yaml.Style

type TypeError

type TypeError = yaml.TypeError

type Unmarshaler

type Unmarshaler interface {
	UnmarshalYAML(value *Node) error
}

Jump to

Keyboard shortcuts

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