Documentation ¶
Index ¶
- Constants
- func ExactArgsWithUsage(n int) cobra.PositionalArgs
- func GetBoolFlag(name string, cmd *cobra.Command) (bool, error)
- func GetStringFlag(name string, cmd *cobra.Command) (string, error)
- func NewConfirmationProvider() defaultConfirmationProvider
- func OptionalArgsWithUsage(n int) cobra.PositionalArgs
- func SetDryRunOutputFlags(cmd *cobra.Command)
- func SetImgUploadDryRunOutputFlags(cmd *cobra.Command)
- func SetTLSFlags(cmd *cobra.Command, cfg *registry.TLSConfig)
- type CommandHelper
- func (ch CommandHelper) CanChangeState() bool
- func (ch CommandHelper) IsDryRun() bool
- func (ch CommandHelper) IsUploading() bool
- func (ch CommandHelper) OutOrDiscardWriter() io.Writer
- func (ch CommandHelper) OutOrErrWriter() io.Writer
- func (ch CommandHelper) PrintChangeResult(change bool, format string, args ...interface{}) error
- func (ch CommandHelper) PrintObjs(objs []runtime.Object) error
- func (ch CommandHelper) PrintResult(format string, args ...interface{}) error
- func (ch CommandHelper) PrintStatus(format string, args ...interface{}) error
- func (ch CommandHelper) Printlnf(format string, args ...interface{}) error
- func (ch CommandHelper) ShouldWait() bool
- func (ch CommandHelper) ShowTimestamp() bool
- func (ch CommandHelper) ValidateOnly() bool
- func (ch CommandHelper) Writer() io.Writer
- type CredentialFetcher
- type Differ
- type ResourceWaiter
- type StatusWriter
- type TableWriter
- type Waiter
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 NewConfirmationProvider ¶
func NewConfirmationProvider() defaultConfirmationProvider
func OptionalArgsWithUsage ¶
func OptionalArgsWithUsage(n int) cobra.PositionalArgs
func SetDryRunOutputFlags ¶
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) 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 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
Source Files ¶
Click to show internal directories.
Click to hide internal directories.