commands

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2021 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func ExactArgsWithUsage added in v0.1.3

func ExactArgsWithUsage(n int) cobra.PositionalArgs

func GetBoolFlag added in v0.1.3

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

func GetStringFlag added in v0.1.3

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

func NewConfirmationProvider

func NewConfirmationProvider() defaultConfirmationProvider

func OptionalArgsWithUsage added in v0.1.4

func OptionalArgsWithUsage(n int) cobra.PositionalArgs

func SetDryRunOutputFlags added in v0.1.3

func SetDryRunOutputFlags(cmd *cobra.Command)

func SetImgUploadDryRunOutputFlags added in v0.1.3

func SetImgUploadDryRunOutputFlags(cmd *cobra.Command)

func SetTLSFlags added in v0.1.3

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

Types

type CommandHelper added in v0.1.3

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

func NewCommandHelper added in v0.1.3

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

func (CommandHelper) CanChangeState added in v0.1.3

func (ch CommandHelper) CanChangeState() bool

func (CommandHelper) IsDryRun added in v0.1.3

func (ch CommandHelper) IsDryRun() bool

func (CommandHelper) OutOrDiscardWriter added in v0.1.3

func (ch CommandHelper) OutOrDiscardWriter() io.Writer

func (CommandHelper) OutOrErrWriter added in v0.1.3

func (ch CommandHelper) OutOrErrWriter() io.Writer

func (CommandHelper) PrintChangeResult added in v0.1.3

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

func (CommandHelper) PrintObj added in v0.1.3

func (ch CommandHelper) PrintObj(obj runtime.Object) error

func (CommandHelper) PrintObjs added in v0.1.3

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

func (CommandHelper) PrintResult added in v0.1.3

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

func (CommandHelper) PrintStatus added in v0.1.3

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

func (CommandHelper) Printlnf added in v0.1.3

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

func (CommandHelper) ShouldWait added in v0.1.3

func (ch CommandHelper) ShouldWait() bool

func (CommandHelper) ValidateOnly added in v0.1.3

func (ch CommandHelper) ValidateOnly() bool

func (CommandHelper) Writer added in v0.1.3

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 added in v0.1.3

type Differ struct {
}

func (Differ) Diff added in v0.1.3

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

type ResourceWaiter added in v0.2.0

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

func NewResourceWaiter added in v0.2.0

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 added in v0.2.0

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

func NewWaiter added in v0.2.0

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

func (*Waiter) Wait added in v0.2.0

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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