Documentation ¶
Index ¶
- Constants
- Variables
- func AllDone(t time.Duration)
- func BeforeTask(msg string)
- func CheckErr(err error)
- func IgnoreNotFoundErr(err error) error
- func IsToTable(printer *Printer) bool
- func PrintInventory(inventory map[string]string)
- func PrintOpenFunction()
- func TaskFail(msg string) string
- func ToTable(tableRow TableRow, objs ...runtime.Object) (*metav1.Table, error)
- func TranslateTimestampSince(timestamp metav1.Time) string
- func UsageErrorf(cmd *cobra.Command, format string, args ...interface{}) error
- type MessageLevel
- type Printer
- func (p *Printer) AddFlags(cmd *cobra.Command)
- func (p *Printer) SetForceDefail()
- func (p *Printer) SetPrinterFunc(fc PrinterFunc)
- func (p *Printer) ShouldPrintObject() bool
- func (p *Printer) ToPrinter() (printers.ResourcePrinter, error)
- func (p *Printer) ToPrinterWitchColumn(columnLabels []string) (printers.ResourcePrinter, error)
- type PrinterFunc
- type TableRow
Constants ¶
View Source
const ( NormalMsg = "normal" SuccessMsg = "success" ErrorMsg = "error" )
Variables ¶
View Source
var ( Yellow = color.New(color.FgHiYellow, color.Bold).SprintFunc() YellowItalic = color.New(color.FgHiYellow, color.Bold, color.Italic).SprintFunc() Green = color.New(color.FgHiGreen, color.Bold).SprintFunc() Blue = color.New(color.FgHiBlue, color.Bold).SprintFunc() Cyan = color.New(color.FgCyan, color.Bold, color.Underline).SprintFunc() Red = color.New(color.FgHiRed, color.Bold).SprintFunc() White = color.New(color.FgWhite).SprintFunc() WhiteBold = color.New(color.FgWhite, color.Bold).SprintFunc() )
Functions ¶
func BeforeTask ¶ added in v0.5.2
func BeforeTask(msg string)
func IgnoreNotFoundErr ¶
func PrintInventory ¶ added in v0.5.2
func PrintOpenFunction ¶ added in v0.5.2
func PrintOpenFunction()
func TranslateTimestampSince ¶
Types ¶
type MessageLevel ¶
type MessageLevel string
type Printer ¶
type Printer struct { PrintFlags *genericclioptions.PrintFlags PrinterFunc PrinterFunc ForceDetail bool }
func (*Printer) SetForceDefail ¶
func (p *Printer) SetForceDefail()
func (*Printer) SetPrinterFunc ¶
func (p *Printer) SetPrinterFunc(fc PrinterFunc)
func (*Printer) ShouldPrintObject ¶
func (*Printer) ToPrinterWitchColumn ¶
func (p *Printer) ToPrinterWitchColumn(columnLabels []string) (printers.ResourcePrinter, error)
type PrinterFunc ¶
type PrinterFunc func(*Printer) (printers.ResourcePrinter, error)
func WithDefaultPrinter ¶
func WithDefaultPrinter(operation string) PrinterFunc
func WithTablePrinter ¶
func WithTablePrinter(options printers.PrintOptions) PrinterFunc
Click to show internal directories.
Click to hide internal directories.