decoder

package
v1.2.9 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ManifestVersionKey is the string indicating a manifest's version.
	ManifestVersionKey = "version"
	// ManifestKindKey is the string indicating a manifest's kind.
	ManifestKindKey = "kind"
	// ManifestSpecKey represents a manifest's spec.
	ManifestSpecKey = "spec"
	// ManifestDeprecatedKeyMachine represents the deprecated v1alpha1 manifest.
	ManifestDeprecatedKeyMachine = "machine"
	// ManifestDeprecatedKeyCluster represents the deprecated v1alpha1 manifest.
	ManifestDeprecatedKeyCluster = "cluster"
	// ManifestDeprecatedKeyDebug represents the deprecated v1alpha1 manifest.
	ManifestDeprecatedKeyDebug = "debug"
	// ManifestDeprecatedKeyPersist represents the deprecated v1alpha1 manifest.
	ManifestDeprecatedKeyPersist = "persist"
)

Variables

View Source
var (
	// ErrMissingVersion indicates that the manifest is missing a version.
	ErrMissingVersion = errors.New("missing version")
	// ErrMissingKind indicates that the manifest is missing a kind.
	ErrMissingKind = errors.New("missing kind")
	// ErrMissingSpec indicates that the manifest is missing a spec.
	ErrMissingSpec = errors.New("missing spec")
	// ErrMissingSpecConent indicates that the manifest spec is empty.
	ErrMissingSpecConent = errors.New("missing spec content")
)

Functions

This section is empty.

Types

type Decoder

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

Decoder represents a multi-doc YAML decoder.

func NewDecoder

func NewDecoder(source []byte) *Decoder

NewDecoder initializes and returns a `Decoder`.

func (*Decoder) Decode

func (d *Decoder) Decode() ([]interface{}, error)

Decode decodes all known manifests.

Jump to

Keyboard shortcuts

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