Documentation ¶
Index ¶
- func BindFlags(flags *pflag.FlagSet)
- func BoolPointerString(b *bool, falseString, trueString, nilString string) string
- func ClearOutputFlagDefault(cmd *cobra.Command)
- func Describe(fn func(d *Describer)) string
- func DescribeBackup(backup *arkv1api.Backup, deleteRequests []arkv1api.DeleteBackupRequest, ...) string
- func DescribeBackupSpec(d *Describer, spec arkv1api.BackupSpec)
- func DescribeBackupStatus(d *Describer, backup *arkv1api.Backup, details bool, ...)
- func DescribeDeleteBackupRequests(d *Describer, requests []arkv1api.DeleteBackupRequest)
- func DescribePodVolumeBackups(d *Describer, backups []arkv1api.PodVolumeBackup, details bool)
- func DescribeRestore(restore *v1.Restore, podVolumeRestores []v1.PodVolumeRestore, details bool, ...) string
- func DescribeSchedule(schedule *v1.Schedule) string
- func DescribeScheduleSpec(d *Describer, spec v1.ScheduleSpec)
- func DescribeScheduleStatus(d *Describer, status v1.ScheduleStatus)
- func GetLabelColumnsValues(cmd *cobra.Command) []string
- func GetOutputFlagValue(cmd *cobra.Command) string
- func GetShowLabelsValue(cmd *cobra.Command) bool
- func NewPrinter(cmd *cobra.Command) (*printers.HumanReadablePrinter, error)
- func PrintWithFormat(c *cobra.Command, obj runtime.Object) (bool, error)
- func ValidateFlags(cmd *cobra.Command) error
- type Describer
- func (d *Describer) DescribeMap(name string, m map[string]string)
- func (d *Describer) DescribeMetadata(metadata metav1.ObjectMeta)
- func (d *Describer) DescribeSlice(preindent int, name string, s []string)
- func (d *Describer) Printf(msg string, args ...interface{})
- func (d *Describer) Println(args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoolPointerString ¶ added in v0.6.0
BoolPointerString returns the appropriate string based on the bool pointer's value.
func ClearOutputFlagDefault ¶
ClearOutputFlagDefault sets the current and default value of the "output" flag to the empty string.
func DescribeBackup ¶ added in v0.6.0
func DescribeBackup( backup *arkv1api.Backup, deleteRequests []arkv1api.DeleteBackupRequest, podVolumeBackups []arkv1api.PodVolumeBackup, details bool, arkClient clientset.Interface, ) string
DescribeBackup describes a backup in human-readable format.
func DescribeBackupSpec ¶ added in v0.6.0
func DescribeBackupSpec(d *Describer, spec arkv1api.BackupSpec)
DescribeBackupSpec describes a backup spec in human-readable format.
func DescribeBackupStatus ¶ added in v0.6.0
func DescribeBackupStatus(d *Describer, backup *arkv1api.Backup, details bool, arkClient clientset.Interface)
DescribeBackupStatus describes a backup status in human-readable format.
func DescribeDeleteBackupRequests ¶ added in v0.8.0
func DescribeDeleteBackupRequests(d *Describer, requests []arkv1api.DeleteBackupRequest)
DescribeDeleteBackupRequests describes delete backup requests in human-readable format.
func DescribePodVolumeBackups ¶ added in v0.9.0
func DescribePodVolumeBackups(d *Describer, backups []arkv1api.PodVolumeBackup, details bool)
DescribePodVolumeBackups describes pod volume backups in human-readable format.
func DescribeRestore ¶ added in v0.6.0
func DescribeSchedule ¶ added in v0.6.0
func DescribeScheduleSpec ¶ added in v0.6.0
func DescribeScheduleSpec(d *Describer, spec v1.ScheduleSpec)
func DescribeScheduleStatus ¶ added in v0.6.0
func DescribeScheduleStatus(d *Describer, status v1.ScheduleStatus)
func GetLabelColumnsValues ¶
GetLabelColumnsValues returns the value of the "label-columns" flag in the provided command, or the zero value if not present.
func GetOutputFlagValue ¶
GetOutputFlagValue returns the value of the "output" flag in the provided command, or the zero value if not present.
func GetShowLabelsValue ¶
GetShowLabelsValue returns the value of the "show-labels" flag in the provided command, or the zero value if not present.
func NewPrinter ¶
func NewPrinter(cmd *cobra.Command) (*printers.HumanReadablePrinter, error)
NewPrinter returns a printer for doing human-readable table printing of Ark objects.
func PrintWithFormat ¶
PrintWithFormat prints the provided object in the format specified by the command's flags.
func ValidateFlags ¶
ValidateFlags returns an error if any of the output-related flags were specified with invalid values, or nil otherwise.
Types ¶
type Describer ¶ added in v0.6.0
type Describer struct { Prefix string // contains filtered or unexported fields }
func (*Describer) DescribeMap ¶ added in v0.6.0
DescribeMap describes a map of key-value pairs using name as the heading.
func (*Describer) DescribeMetadata ¶ added in v0.6.0
func (d *Describer) DescribeMetadata(metadata metav1.ObjectMeta)
DescribeMetadata describes standard object metadata in a consistent manner.
func (*Describer) DescribeSlice ¶ added in v0.6.0
DescribeSlice describes a slice of strings using name as the heading. The output is prefixed by "preindent" number of tabs.