decoder

package
v1.7.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package decoder provides a YAML decoder for machine configuration documents.

Index

Constants

View Source
const (
	// ManifestAPIVersionKey is the string indicating a manifest's version.
	ManifestAPIVersionKey = "apiVersion"
	// ManifestKindKey is the string indicating a manifest's kind.
	ManifestKindKey = "kind"
	// 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 ErrMissingKind = errors.New("missing kind")

ErrMissingKind indicates that the manifest is missing a kind.

Functions

This section is empty.

Types

type Decoder

type Decoder struct{}

Decoder represents a multi-doc YAML decoder.

func NewDecoder

func NewDecoder() *Decoder

NewDecoder initializes and returns a `Decoder`.

func (*Decoder) Decode

func (d *Decoder) Decode(r io.Reader) ([]config.Document, error)

Decode decodes all known manifests.

Jump to

Keyboard shortcuts

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