Documentation
¶
Overview ¶
Package commands contains the implementation of all qbec commands.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsRuntimeError ¶
IsRuntimeError returns if the supplied error was a runtime error as opposed to an error arising out of user input.
func Setup ¶
func Setup(root *cobra.Command, op OptionsProvider)
Setup sets up all subcommands for the supplied root command.
Types ¶
type Client ¶
type Client interface { DisplayName(o model.K8sMeta) string IsNamespaced(kind schema.GroupVersionKind) (bool, error) Get(obj model.K8sMeta) (*unstructured.Unstructured, error) Sync(obj model.K8sLocalObject, opts remote.SyncOptions) (*remote.SyncResult, error) ValidatorFor(gvk schema.GroupVersionKind) (remote.Validator, error) ListExtraObjects(ignore []model.K8sQbecMeta, scope remote.ListQueryConfig) ([]model.K8sQbecMeta, error) Delete(obj model.K8sMeta, dryRun bool) (*remote.SyncResult, error) }
Client encapsulates all remote operations needed for the superset of all commands.
type OptionsProvider ¶
type OptionsProvider func() StdOptionsWithClient
OptionsProvider provides standard configuration available to all commands
type StdOptions ¶
type StdOptions interface { App() *model.App // the app loaded for the command VM() *vm.VM // the base VM constructed out of command line args and potentially app information Colorize() bool // returns if colorized output is needed Verbosity() int // returns the verbosity level SortConfig(provider objsort.Namespaced) objsort.Config // returns the apply sort config potentially using hints from the app Stdout() io.Writer // output to write to DefaultNamespace(env string) string // the default namespace for the supplied environment Confirm(context string) error // confirmation function for dangerous operations EvalConcurrency() int // the concurrency using which to evaluate components }
StdOptions provides standardized access to information available to every command.
type StdOptionsWithClient ¶
type StdOptionsWithClient interface { StdOptions // base options Client(env string) (Client, error) // a client valid for the supplied environment }
StdOptionsWithClient provides a remote client in addition to standard options.
Click to show internal directories.
Click to hide internal directories.