printers

package
v0.8.11 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetObjectGroupKind

func GetObjectGroupKind(obj runtime.Object) schema.GroupKind

Types

type NamePrinter

type NamePrinter struct {
	// ShortOutput indicates whether an operation should be
	// printed along side the "resource/name" pair for an object.
	ShortOutput bool
	// Operation describes the name of the action that
	// took place on an object, to be included in the
	// finalized "successful" message.
	Operation string
}

NamePrinter is an implementation of ResourcePrinter which outputs "resource/name" pair of an object.

func (*NamePrinter) PrintObj

func (p *NamePrinter) PrintObj(obj runtime.Object, w io.Writer) error

PrintObj is an implementation of ResourcePrinter.PrintObj which decodes the object and print "resource/name" pair. If the object is a List, print all items in it.

type Named

type Named interface {
	GetName() string
}

Jump to

Keyboard shortcuts

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