storkctl

package
v2.8.2-0...-dd449ac Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: Apache-2.0 Imports: 54 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCommand

func NewCommand(cmdFactory Factory, in io.Reader, out io.Writer, errOut io.Writer) *cobra.Command

NewCommand Create a new storkctl command

func ValidateMigration

func ValidateMigration(migr *storkv1.Migration) error

ValidateMigration of given name and namespace

Types

type Factory

type Factory interface {
	// BindFlags Binds command flags to the command
	BindFlags(flags *pflag.FlagSet)
	// BindGetFlags Binds command flags for the get subcommand
	BindGetFlags(flags *pflag.FlagSet)

	// AllNamespaces Retruns true if the all-namespaces flag was used
	AllNamespaces() bool
	// GetNamespace Gets the namespace used for the command
	GetNamespace() string
	// GetAllNamespaces Get all the namespaces that should be used for a command
	GetAllNamespaces() ([]string, error)
	// GetConfig Get the merged config for the server
	GetConfig() (*rest.Config, error)
	// RawConfig Gets the raw merged config for the server
	RawConfig() (clientcmdapi.Config, error)
	// UpdateConfig Updates the config to be used for API calls
	UpdateConfig() error
	// GetOutputFormat Get the output format
	GetOutputFormat() (string, error)

	// IsWatchSet return true if -w/watch is passed
	IsWatchSet() bool
	// contains filtered or unexported methods
}

Factory to be used for command line

func NewFactory

func NewFactory() Factory

NewFactory Return a new factory interface that can be used by commands

Jump to

Keyboard shortcuts

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