output

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2021 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindFlags

func BindFlags(flags *pflag.FlagSet)

BindFlags defines a set of output-specific flags within the provided FlagSet.

func BindFlagsSimple

func BindFlagsSimple(flags *pflag.FlagSet)

BindFlagsSimple defines the output format flag only.

func BoolPointerString

func BoolPointerString(b *bool, falseString, trueString, nilString string) string

BoolPointerString returns the appropriate string based on the bool pointer's value.

func ClearOutputFlagDefault

func ClearOutputFlagDefault(cmd *cobra.Command)

ClearOutputFlagDefault sets the current and default value of the "output" flag to the empty string.

func Describe

func Describe(fn func(d *Describer)) string

func DescribeBackup

func DescribeBackup(
	ctx context.Context,
	kbClient kbclient.Client,
	backup *velerov1api.Backup,
	deleteRequests []velerov1api.DeleteBackupRequest,
	podVolumeBackups []velerov1api.PodVolumeBackup,
	volumeSnapshotContents []snapshotv1beta1api.VolumeSnapshotContent,
	details bool,
	veleroClient clientset.Interface,
	insecureSkipTLSVerify bool,
	caCertFile string,
) string

DescribeBackup describes a backup in human-readable format.

func DescribeBackupSpec

func DescribeBackupSpec(d *Describer, spec velerov1api.BackupSpec)

DescribeBackupSpec describes a backup spec in human-readable format.

func DescribeBackupStatus

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 DescribeCSIVolumeSnapshots

func DescribeCSIVolumeSnapshots(d *Describer, details bool, volumeSnapshotContents []snapshotv1beta1api.VolumeSnapshotContent)

func DescribeDeleteBackupRequests

func DescribeDeleteBackupRequests(d *Describer, requests []velerov1api.DeleteBackupRequest)

DescribeDeleteBackupRequests describes delete backup requests in human-readable format.

func DescribePodVolumeBackups

func DescribePodVolumeBackups(d *Describer, backups []velerov1api.PodVolumeBackup, details bool)

DescribePodVolumeBackups describes pod volume backups in human-readable format.

func DescribeRestore

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

func DescribeSchedule(schedule *v1.Schedule) string

func DescribeScheduleSpec

func DescribeScheduleSpec(d *Describer, spec v1.ScheduleSpec)

func DescribeScheduleStatus

func DescribeScheduleStatus(d *Describer, status v1.ScheduleStatus)

func DescribeVSC

func DescribeVSC(d *Describer, details bool, vsc snapshotv1beta1api.VolumeSnapshotContent)

func GetLabelColumnsValues

func GetLabelColumnsValues(cmd *cobra.Command) []string

GetLabelColumnsValues returns the value of the "label-columns" flag in the provided command, or the zero value if not present.

func GetOutputFlagValue

func GetOutputFlagValue(cmd *cobra.Command) string

GetOutputFlagValue returns the value of the "output" flag in the provided command, or the zero value if not present.

func GetShowLabelsValue

func GetShowLabelsValue(cmd *cobra.Command) bool

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

func PrintWithFormat(c *cobra.Command, obj runtime.Object) (bool, error)

PrintWithFormat prints the provided object in the format specified by the command's flags.

func ValidateFlags

func ValidateFlags(cmd *cobra.Command) error

ValidateFlags returns an error if any of the output-related flags were specified with invalid values, or nil otherwise.

Types

type Describer

type Describer struct {
	Prefix string
	// contains filtered or unexported fields
}

func (*Describer) DescribeMap

func (d *Describer) DescribeMap(name string, m map[string]string)

DescribeMap describes a map of key-value pairs using name as the heading.

func (*Describer) DescribeMetadata

func (d *Describer) DescribeMetadata(metadata metav1.ObjectMeta)

DescribeMetadata describes standard object metadata in a consistent manner.

func (*Describer) DescribeSlice

func (d *Describer) DescribeSlice(preindent int, name string, s []string)

DescribeSlice describes a slice of strings using name as the heading. The output is prefixed by "preindent" number of tabs.

func (*Describer) Printf

func (d *Describer) Printf(msg string, args ...interface{})

func (*Describer) Println

func (d *Describer) Println(args ...interface{})

Jump to

Keyboard shortcuts

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