Documentation
¶
Index ¶
- Constants
- Variables
- func NewDeliveryCommand(ctx context.Context) *cobra.Command
- func NewHelpJSONCommand(rootCmd *cobra.Command) *cobra.Command
- func NewKubectlCommand() *cobra.Command
- func NewLoginCommand() *cobra.Command
- func NewRootContext() context.Context
- func NewStrongholdCommand() *cobra.Command
- func NewVirtualizationCommand() *cobra.Command
- func ReplaceCommandName(from, to string, c *cobra.Command) *cobra.Command
- func StrongholdSubcommands() []*cobra.Command
- type CommandInfo
- type FlagInfo
Constants ¶
const DeliveryKitCommandName = "delivery-kit"
DeliveryKitCommandName is the top-level command name for the built-in werf re-skin. A plugin contract uses this same name to depend on delivery-kit while it ships as a built-in command rather than a standalone plugin.
Variables ¶
var HelpUsername = "user"
Functions ¶
func NewDeliveryCommand ¶
NewDeliveryCommand builds the built-in werf re-skin under the root context. It returns nil only on a path that has already asked for termination, which onShutdown turns into a process exit before the caller sees the nil.
func NewHelpJSONCommand ¶ added in v0.20.9
func NewKubectlCommand ¶
func NewLoginCommand ¶
func NewRootContext ¶ added in v0.33.15
NewRootContext returns the process-wide graceful-termination context that the whole d8 command tree runs under: it installs the SIGINT/SIGTERM handler that Execute's graceful.Terminate and telemetry shutdown depend on, and carries the werf logger.
It is separate from NewDeliveryCommand because the context is root infrastructure, still required when an installed plugin serves `delivery-kit` and the built-in werf tree is never constructed.
func NewStrongholdCommand ¶
func StrongholdSubcommands ¶ added in v0.29.29
StrongholdSubcommands builds a cobra command tree from the vault CLI command registry (via CommandSynopses). This keeps synopses in sync with initCommands and respects build tags (e.g. clionly omits server/agent). Cobra exposes the structure to help and help-json; execution still goes through vaultcommand.Run.
Types ¶
type CommandInfo ¶
type CommandInfo struct {
Name string `json:"name,omitempty"`
Description string `json:"description"`
LongDescription string `json:"longDescription,omitempty"`
Version string `json:"version,omitempty"`
Aliases []string `json:"aliases"`
Flags map[string]FlagInfo `json:"flags"`
Subcommands []CommandInfo `json:"subcommands"`
}