Documentation
¶
Overview ¶
Package commands contains the implementation of all qbec commands.
Index ¶
- func IsRuntimeError(err error) bool
- func NewRuntimeError(err error) error
- func Setup(root *cobra.Command, cp ConfigProvider)
- type Client
- type Config
- func (c Config) App() *model.App
- func (c Config) Client(env string) (Client, error)
- func (c Config) Colorize() bool
- func (c Config) Confirm(context string) error
- func (c Config) EvalConcurrency() int
- func (c Config) EvalContext(env string) eval.Context
- func (c Config) KubeAttributes(env string) (*remote.KubeAttributes, error)
- func (c Config) Stderr() io.Writer
- func (c Config) Stdout() io.Writer
- func (c Config) Verbosity() int
- type ConfigFactory
- type ConfigProvider
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 NewRuntimeError ¶ added in v0.7.2
NewRuntimeError returns a runtime error
func Setup ¶
func Setup(root *cobra.Command, cp ConfigProvider)
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) (k8smeta.Validator, error) ListObjects(scope remote.ListQueryConfig) (remote.Collection, error) Delete(obj model.K8sMeta, dryRun bool) (*remote.SyncResult, error) ObjectKey(obj model.K8sMeta) string ResourceInterface(obj schema.GroupVersionKind, namespace string) (dynamic.ResourceInterface, error) }
Client encapsulates all remote operations needed for the superset of all commands.
type Config ¶ added in v0.6.4
type Config struct {
// contains filtered or unexported fields
}
Config is the command configuration.
func (Config) App ¶ added in v0.6.4
App returns the application object loaded for this run.
func (Config) Client ¶ added in v0.6.4
Client returns a client for the supplied environment
func (Config) Colorize ¶ added in v0.6.4
Colorize returns true if output needs to be colorized.
func (Config) Confirm ¶ added in v0.6.4
Confirm prompts for confirmation if needed.
func (Config) EvalConcurrency ¶ added in v0.6.4
EvalConcurrency returns the concurrency to be used for evaluating components.
func (Config) EvalContext ¶ added in v0.6.4
EvalContext returns the evaluation context for the supplied environment.
func (Config) KubeAttributes ¶ added in v0.7.2
func (c Config) KubeAttributes(env string) (*remote.KubeAttributes, error)
KubeAttributes returns the kubernetes attributes for the supplied environment
func (Config) Stderr ¶ added in v0.7.2
Stderr returns the standard error configured for the command.
func (Config) Stdout ¶ added in v0.6.4
Stdout returns the standard output configured for the command.
type ConfigFactory ¶ added in v0.6.4
type ConfigFactory struct { Stdout io.Writer //standard output for command Stderr io.Writer // standard error for command SkipConfirm bool // do not prompt for confirmation Colors bool // show colorized output EvalConcurrency int // concurrency of eval operations Verbosity int // verbosity level StrictVars bool // strict mode for variable evaluation }
ConfigFactory provides a config.
Source Files
¶
- apply.go
- common.go
- component.go
- config.go
- delete.go
- diff.go
- env.go
- examples.go
- filter.go
- init.go
- param.go
- remote-list.go
- show.go
- validate.go
- wait.go