commands

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DryRunFlag          = "dry-run"
	DryRunImgUploadFlag = "dry-run-with-image-upload"
	OutputFlag          = "output"
	WaitFlag            = "wait"
	TimestampsFlag      = "timestamps"
)
View Source
const StatusWriterPadding = 4
View Source
const StatusWriterTabWidth = 4

Variables

This section is empty.

Functions

func ExactArgsWithUsage

func ExactArgsWithUsage(n int) cobra.PositionalArgs

func GetBoolFlag

func GetBoolFlag(name string, cmd *cobra.Command) (bool, error)

func GetStringFlag

func GetStringFlag(name string, cmd *cobra.Command) (string, error)

func NewConfirmationProvider

func NewConfirmationProvider() defaultConfirmationProvider

func OptionalArgsWithUsage

func OptionalArgsWithUsage(n int) cobra.PositionalArgs

func SetDryRunOutputFlags

func SetDryRunOutputFlags(cmd *cobra.Command)

func SetImgUploadDryRunOutputFlags

func SetImgUploadDryRunOutputFlags(cmd *cobra.Command)

func SetTLSFlags

func SetTLSFlags(cmd *cobra.Command, cfg *registry.TLSConfig)

Types

type CommandHelper

type CommandHelper struct {
	// contains filtered or unexported fields
}

func NewCommandHelper

func NewCommandHelper(cmd *cobra.Command) (*CommandHelper, error)

func (CommandHelper) CanChangeState

func (ch CommandHelper) CanChangeState() bool

func (CommandHelper) IsDryRun

func (ch CommandHelper) IsDryRun() bool

func (CommandHelper) IsUploading added in v0.3.1

func (ch CommandHelper) IsUploading() bool

func (CommandHelper) OutOrDiscardWriter

func (ch CommandHelper) OutOrDiscardWriter() io.Writer

func (CommandHelper) OutOrErrWriter

func (ch CommandHelper) OutOrErrWriter() io.Writer

func (CommandHelper) PrintChangeResult

func (ch CommandHelper) PrintChangeResult(change bool, format string, args ...interface{}) error

func (CommandHelper) PrintObjs

func (ch CommandHelper) PrintObjs(objs []runtime.Object) error

func (CommandHelper) PrintResult

func (ch CommandHelper) PrintResult(format string, args ...interface{}) error

func (CommandHelper) PrintStatus

func (ch CommandHelper) PrintStatus(format string, args ...interface{}) error

func (CommandHelper) Printlnf

func (ch CommandHelper) Printlnf(format string, args ...interface{}) error

func (CommandHelper) ShouldWait

func (ch CommandHelper) ShouldWait() bool

func (CommandHelper) ShowTimestamp added in v0.12.0

func (ch CommandHelper) ShowTimestamp() bool

func (CommandHelper) ValidateOnly

func (ch CommandHelper) ValidateOnly() bool

func (CommandHelper) Writer

func (ch CommandHelper) Writer() io.Writer

type CredentialFetcher

type CredentialFetcher struct {
}

func (CredentialFetcher) FetchPassword

func (c CredentialFetcher) FetchPassword(envVar, prompt string) (string, error)

type Differ

type Differ struct {
}

func (Differ) Diff

func (d Differ) Diff(dOld, dNew interface{}) (string, error)

type ResourceWaiter

type ResourceWaiter interface {
	Wait(ctx context.Context, object runtime.Object, extraChecks ...watchTools.ConditionFunc) error
}

func NewNoopWaiter

func NewNoopWaiter() ResourceWaiter

func NewResourceWaiter

func NewResourceWaiter(dc dynamic.Interface) ResourceWaiter

type StatusWriter

type StatusWriter struct {
	// contains filtered or unexported fields
}

func NewStatusWriter

func NewStatusWriter(out io.Writer) *StatusWriter

func (*StatusWriter) AddBlock

func (s *StatusWriter) AddBlock(header string, items ...string) error

func (*StatusWriter) Write

func (s *StatusWriter) Write() error

type TableWriter

type TableWriter struct {
	// contains filtered or unexported fields
}

func NewTableWriter

func NewTableWriter(out io.Writer, headers ...string) (*TableWriter, error)

func (*TableWriter) AddRow

func (w *TableWriter) AddRow(columns ...string) error

func (*TableWriter) Write

func (w *TableWriter) Write() error

type Waiter

type Waiter struct {
	// contains filtered or unexported fields
}

func NewWaiter

func NewWaiter(dc dynamic.Interface, timeout time.Duration) *Waiter

func (*Waiter) Wait

func (w *Waiter) Wait(ctx context.Context, ob runtime.Object, extraConditions ...watchTools.ConditionFunc) error

Jump to

Keyboard shortcuts

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