Documentation ¶
Index ¶
- func BindFlags(flags *pflag.FlagSet)
- func BindFlagsSimple(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(ctx context.Context, kbClient kbclient.Client, backup *velerov1api.Backup, ...) string
- func DescribeBackupInSF(ctx context.Context, kbClient kbclient.Client, backup *velerov1api.Backup, ...) string
- func DescribeBackupResults(ctx context.Context, kbClient kbclient.Client, d *Describer, ...)
- func DescribeBackupResultsInSF(ctx context.Context, kbClient kbclient.Client, d *StructuredDescriber, ...)
- func DescribeBackupSpec(d *Describer, spec velerov1api.BackupSpec)
- func DescribeBackupSpecInSF(d *StructuredDescriber, spec velerov1api.BackupSpec)
- func DescribeBackupStatus(ctx context.Context, kbClient kbclient.Client, d *Describer, ...)
- func DescribeBackupStatusInSF(ctx context.Context, kbClient kbclient.Client, d *StructuredDescriber, ...)
- func DescribeCSIVolumeSnapshots(d *Describer, details bool, ...)
- func DescribeCSIVolumeSnapshotsInSF(d *StructuredDescriber, details bool, ...)
- func DescribeDeleteBackupRequests(d *Describer, requests []velerov1api.DeleteBackupRequest)
- func DescribeDeleteBackupRequestsInSF(d *StructuredDescriber, requests []velerov1api.DeleteBackupRequest)
- func DescribeInSF(fn func(d *StructuredDescriber), format string) string
- func DescribePodVolumeBackups(d *Describer, backups []velerov1api.PodVolumeBackup, details bool)
- func DescribePodVolumeBackupsInSF(d *StructuredDescriber, backups []velerov1api.PodVolumeBackup, details bool)
- func DescribeResourcePolicies(d *Describer, resPolicies *v1.TypedLocalObjectReference)
- func DescribeResourcePoliciesInSF(d *StructuredDescriber, resPolicies *v1.TypedLocalObjectReference)
- func DescribeRestore(ctx context.Context, kbClient kbclient.Client, restore *velerov1api.Restore, ...) string
- func DescribeSchedule(schedule *v1.Schedule) string
- func DescribeScheduleSpec(d *Describer, spec v1.ScheduleSpec)
- func DescribeScheduleStatus(d *Describer, status v1.ScheduleStatus)
- func DescribeVSC(d *Describer, details bool, vsc snapshotv1api.VolumeSnapshotContent)
- func DescribeVSCInSF(details bool, vsc snapshotv1api.VolumeSnapshotContent, ...)
- func GetLabelColumnsValues(cmd *cobra.Command) []string
- func GetOutputFlagValue(cmd *cobra.Command) string
- func GetShowLabelsValue(cmd *cobra.Command) bool
- func NewPrinter(cmd *cobra.Command) (printers.ResourcePrinter, 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{})
- type StructuredDescriber
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindFlagsSimple ¶ added in v1.0.1
BindFlagsSimple defines the output format flag only.
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( ctx context.Context, kbClient kbclient.Client, backup *velerov1api.Backup, deleteRequests []velerov1api.DeleteBackupRequest, podVolumeBackups []velerov1api.PodVolumeBackup, volumeSnapshotContents []snapshotv1api.VolumeSnapshotContent, details bool, veleroClient clientset.Interface, insecureSkipTLSVerify bool, caCertFile string, ) string
DescribeBackup describes a backup in human-readable format.
func DescribeBackupInSF ¶ added in v1.11.0
func DescribeBackupInSF( ctx context.Context, kbClient kbclient.Client, backup *velerov1api.Backup, deleteRequests []velerov1api.DeleteBackupRequest, podVolumeBackups []velerov1api.PodVolumeBackup, volumeSnapshotContents []snapshotv1api.VolumeSnapshotContent, details bool, veleroClient clientset.Interface, insecureSkipTLSVerify bool, caCertFile string, outputFormat string, ) string
DescribeBackupInSF describes a backup in structured format.
func DescribeBackupResults ¶ added in v1.11.0
func DescribeBackupResults(ctx context.Context, kbClient kbclient.Client, d *Describer, backup *velerov1api.Backup, insecureSkipTLSVerify bool, caCertPath string)
DescribeBackupResults describes errors and warnings in human-readable format.
func DescribeBackupResultsInSF ¶ added in v1.11.0
func DescribeBackupResultsInSF(ctx context.Context, kbClient kbclient.Client, d *StructuredDescriber, backup *velerov1api.Backup, insecureSkipTLSVerify bool, caCertPath string)
DescribeBackupResultsInSF describes errors and warnings in structured format.
func DescribeBackupSpec ¶ added in v0.6.0
func DescribeBackupSpec(d *Describer, spec velerov1api.BackupSpec)
DescribeBackupSpec describes a backup spec in human-readable format.
func DescribeBackupSpecInSF ¶ added in v1.11.0
func DescribeBackupSpecInSF(d *StructuredDescriber, spec velerov1api.BackupSpec)
DescribeBackupSpecInSF describes a backup spec in structured format.
func DescribeBackupStatus ¶ added in v0.6.0
func DescribeBackupStatus(ctx context.Context, kbClient kbclient.Client, d *Describer, backup *velerov1api.Backup, details bool, veleroClient clientset.Interface, insecureSkipTLSVerify bool, caCertPath string)
DescribeBackupStatus describes a backup status in human-readable format.
func DescribeBackupStatusInSF ¶ added in v1.11.0
func DescribeBackupStatusInSF(ctx context.Context, kbClient kbclient.Client, d *StructuredDescriber, backup *velerov1api.Backup, details bool, veleroClient clientset.Interface, insecureSkipTLSVerify bool, caCertPath string)
DescribeBackupStatusInSF describes a backup status in structured format.
func DescribeCSIVolumeSnapshots ¶ added in v1.4.0
func DescribeCSIVolumeSnapshots(d *Describer, details bool, volumeSnapshotContents []snapshotv1api.VolumeSnapshotContent)
func DescribeCSIVolumeSnapshotsInSF ¶ added in v1.11.0
func DescribeCSIVolumeSnapshotsInSF(d *StructuredDescriber, details bool, volumeSnapshotContents []snapshotv1api.VolumeSnapshotContent)
DescribeCSIVolumeSnapshotsInSF describes CSI volume snapshots in structured format.
func DescribeDeleteBackupRequests ¶ added in v0.8.0
func DescribeDeleteBackupRequests(d *Describer, requests []velerov1api.DeleteBackupRequest)
DescribeDeleteBackupRequests describes delete backup requests in human-readable format.
func DescribeDeleteBackupRequestsInSF ¶ added in v1.11.0
func DescribeDeleteBackupRequestsInSF(d *StructuredDescriber, requests []velerov1api.DeleteBackupRequest)
DescribeDeleteBackupRequestsInSF describes delete backup requests in structured format.
func DescribeInSF ¶ added in v1.11.0
func DescribeInSF(fn func(d *StructuredDescriber), format string) string
DescribeInSF returns the structured output based on the func that applies StructuredDescriber to collect outputs. This function takes arg 'format' for future format extension.
func DescribePodVolumeBackups ¶ added in v0.9.0
func DescribePodVolumeBackups(d *Describer, backups []velerov1api.PodVolumeBackup, details bool)
DescribePodVolumeBackups describes pod volume backups in human-readable format.
func DescribePodVolumeBackupsInSF ¶ added in v1.11.0
func DescribePodVolumeBackupsInSF(d *StructuredDescriber, backups []velerov1api.PodVolumeBackup, details bool)
DescribePodVolumeBackupsInSF describes pod volume backups in structured format.
func DescribeResourcePolicies ¶ added in v1.11.0
func DescribeResourcePolicies(d *Describer, resPolicies *v1.TypedLocalObjectReference)
DescribeResourcePolicies describes resource policiesin human-readable format
func DescribeResourcePoliciesInSF ¶ added in v1.11.0
func DescribeResourcePoliciesInSF(d *StructuredDescriber, resPolicies *v1.TypedLocalObjectReference)
DescribeResourcePoliciesInSF describes resource policies in structured format.
func DescribeRestore ¶ added in v0.6.0
func DescribeRestore(ctx context.Context, kbClient kbclient.Client, restore *velerov1api.Restore, podVolumeRestores []velerov1api.PodVolumeRestore, details bool, veleroClient clientset.Interface, insecureSkipTLSVerify bool, caCertFile string) string
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 DescribeVSC ¶ added in v1.4.0
func DescribeVSC(d *Describer, details bool, vsc snapshotv1api.VolumeSnapshotContent)
func DescribeVSCInSF ¶ added in v1.11.0
func DescribeVSCInSF(details bool, vsc snapshotv1api.VolumeSnapshotContent, vscDetails map[string]interface{})
DescribeVSCInSF describes CSI volume snapshot contents in structured format.
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.ResourcePrinter, error)
NewPrinter returns a printer for doing human-readable table printing of Velero 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 NewDescriber ¶ added in v1.11.0
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.
type StructuredDescriber ¶ added in v1.11.0
type StructuredDescriber struct {
// contains filtered or unexported fields
}
func NewStructuredDescriber ¶ added in v1.11.0
func NewStructuredDescriber(format string) *StructuredDescriber
NewStructuredDescriber creates a StructuredDescriber.
func (*StructuredDescriber) Describe ¶ added in v1.11.0
func (d *StructuredDescriber) Describe(name string, arg interface{})
Describe adds all types of argument to d.output.
func (*StructuredDescriber) DescribeMetadata ¶ added in v1.11.0
func (d *StructuredDescriber) DescribeMetadata(metadata metav1.ObjectMeta)
DescribeMetadata describes standard object metadata.
func (*StructuredDescriber) JsonEncode ¶ added in v1.11.0
func (d *StructuredDescriber) JsonEncode() string
JsonEncode encodes d.output to json