yaml

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package yaml provides tools for encoding and decoding YAML.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decoder

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

Decoder is a YAML decoder.

func NewDecoder

func NewDecoder(r io.Reader) *Decoder

NewDecoder returns a new YAML decoder.

func (*Decoder) Decode

func (d *Decoder) Decode(visitFunc func(obj *unstructured.Unstructured) error) error

Decode decodes YAML into a list of unstructured objects.

type Encoder

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

Encoder is a YAML encoder.

func NewEncoder

func NewEncoder(w io.Writer) *Encoder

NewEncoder returns a new YAML printer.

func (*Encoder) Encode

func (p *Encoder) Encode(obj runtime.Object) error

Encode prints the object as YAML.

Jump to

Keyboard shortcuts

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