io

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidInput  = errors.New("stdin did not produce a valid input")
	ErrInputNotFound = errors.New("the requested named input was not found")

	ErrWriterIsCommitted   = errors.New("cannot add new items to a writer once it's been flushed")
	ErrNonWriteableOutputs = errors.New("wat not able to write items to stdout")

	ErrPointerConversionTarget = errors.New("conversion already returns pointer to the type argument, do not provide a pointer")
	ErrConversionFailed        = errors.New("the given unstructured cannot be converted to the target concrete type")
)

Functions

func Convert

func Convert[T any](u *unstructured.Unstructured) (*T, error)

Convert is a utility function that wraps the default unstructured converter.

Types

type InputReader

type InputReader interface {
	GetInput(name string) (*unstructured.Unstructured, error)
}

func NewInputReader

func NewInputReader() (InputReader, error)

type OutputWriter

type OutputWriter interface {
	Write(outputs ...*unstructured.Unstructured) error
	Commit() error
}

OutputWriter allows to output resources from a synthesizer. Operations are thread safe.

func NewOutputWriter

func NewOutputWriter() OutputWriter

Jump to

Keyboard shortcuts

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