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.6.6
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.2
type Config struct {
// contains filtered or unexported fields
}
Config is the command configuration.
func (Config) EvalConcurrency ¶ added in v0.6.2
EvalConcurrency returns the concurrency to be used for evaluating components.
func (Config) EvalContext ¶ added in v0.6.2
EvalContext returns the evaluation context for the supplied environment.
func (Config) KubeAttributes ¶ added in v0.7.1
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.
type ConfigFactory ¶ added in v0.6.2
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.
type ConfigProvider ¶ added in v0.6.2
type ConfigProvider func() *Config
ConfigProvider provides standard configuration available to all commands