printers

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// PrinterTypeTable is a table printer type.
	PrinterTypeTable = PrinterType("table")
	// PrinterTypeYAML is a yaml printer type.
	PrinterTypeYAML = PrinterType("yaml")
	// PrinterTypeJSON is a json printer type.
	PrinterTypeJSON = PrinterType("json")
)
View Source
var (
	// ErrUnknowPrinterType is an error if a printer type isn't known.
	ErrUnknowPrinterType = errors.New("unknown printer type")
	// ErrTableRequired is an error if the object being printed
	// isn't a metav1.Table.
	ErrTableRequired = errors.New("metav1.Table is required")
)

Functions

This section is empty.

Types

type Printer

type Printer interface {
	// Print is a method to print an object
	Print(in interface{}) error
}

Printer is an interface for a printer.

func New

func New(printerType string, writer io.Writer) (Printer, error)

New creates a new printer.

type PrinterType

type PrinterType string

PrinterType is a type declaration for a printer type.

Jump to

Keyboard shortcuts

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