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 FakeRESTClientGetter
- func (r *FakeRESTClientGetter) ToDiscoveryClient() (discovery.CachedDiscoveryInterface, error)
- func (r *FakeRESTClientGetter) ToRESTConfig() (*restclient.Config, error)
- func (r *FakeRESTClientGetter) ToRESTMapper() (meta.RESTMapper, error)
- func (r *FakeRESTClientGetter) ToRawKubeConfigLoader() clientcmd.ClientConfig
- type Getter
- 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 RESTClientGetter
- func (r *RESTClientGetter) ToDiscoveryClient() (discovery.CachedDiscoveryInterface, error)
- func (r *RESTClientGetter) ToRESTConfig() (*restclient.Config, error)
- func (r *RESTClientGetter) ToRESTMapper() (meta.RESTMapper, error)
- func (r *RESTClientGetter) ToRawKubeConfigLoader() clientcmd.ClientConfig
- 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 FakeRESTClientGetter ¶
type FakeRESTClientGetter struct {
// contains filtered or unexported fields
}
func NewFakeRESTClientGetter ¶
func NewFakeRESTClientGetter(clientGetter genericclioptions.RESTClientGetter) *FakeRESTClientGetter
func (*FakeRESTClientGetter) ToDiscoveryClient ¶
func (r *FakeRESTClientGetter) ToDiscoveryClient() (discovery.CachedDiscoveryInterface, error)
func (*FakeRESTClientGetter) ToRESTConfig ¶
func (r *FakeRESTClientGetter) ToRESTConfig() (*restclient.Config, error)
func (*FakeRESTClientGetter) ToRESTMapper ¶
func (r *FakeRESTClientGetter) ToRESTMapper() (meta.RESTMapper, error)
func (*FakeRESTClientGetter) ToRawKubeConfigLoader ¶
func (r *FakeRESTClientGetter) ToRawKubeConfigLoader() clientcmd.ClientConfig
type Getter ¶
type Getter interface { ToRESTConfig() (*restclient.Config, error) ToRESTMapper() (meta.RESTMapper, error) ToDiscoveryClient() (discovery.CachedDiscoveryInterface, error) ToRawKubeConfigLoader() clientcmd.ClientConfig }
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
type RESTClientGetter ¶
type RESTClientGetter struct {
// contains filtered or unexported fields
}
func NewRESTClientGetter ¶
func NewRESTClientGetter(clientGetter genericclioptions.RESTClientGetter) *RESTClientGetter
func (*RESTClientGetter) ToDiscoveryClient ¶
func (r *RESTClientGetter) ToDiscoveryClient() (discovery.CachedDiscoveryInterface, error)
func (*RESTClientGetter) ToRESTConfig ¶
func (r *RESTClientGetter) ToRESTConfig() (*restclient.Config, error)
func (*RESTClientGetter) ToRESTMapper ¶
func (r *RESTClientGetter) ToRESTMapper() (meta.RESTMapper, error)
func (*RESTClientGetter) ToRawKubeConfigLoader ¶
func (r *RESTClientGetter) ToRawKubeConfigLoader() clientcmd.ClientConfig
Click to show internal directories.
Click to hide internal directories.