commands

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2022 License: Apache-2.0 Imports: 44 Imported by: 0

Documentation

Overview

Package commands contains the opnictl sub-commands.

Index

Constants

This section is empty.

Variables

View Source
var CompletionCmd = &cobra.Command{
	Use:   "completion [bash|zsh|fish]",
	Short: "Generate completion script",
	Long: `To load completions:

Bash:

  $ source <(yourprogram completion bash)

  # To load completions for each session, execute once:
  # Linux:
  $ yourprogram completion bash > /etc/bash_completion.d/yourprogram
  # macOS:
  $ yourprogram completion bash > /usr/local/etc/bash_completion.d/yourprogram

Zsh:

  # If shell completion is not already enabled in your environment,
  # you will need to enable it.  You can execute the following once:

  $ echo "autoload -U compinit; compinit" >> ~/.zshrc

  # To load completions for each session, execute once:
  $ yourprogram completion zsh > "${fpath[1]}/_yourprogram"

  # You will need to start a new shell for this setup to take effect.

fish:

  $ yourprogram completion fish | source

  # To load completions for each session, execute once:
  $ yourprogram completion fish > ~/.config/fish/completions/yourprogram.fish
`,
	DisableFlagsInUseLine: true,
	ValidArgs:             []string{"bash", "zsh", "fish"},
	Args:                  cobra.ExactValidArgs(1),
	Run: func(cmd *cobra.Command, args []string) {
		switch args[0] {
		case "bash":
			cmd.Root().GenBashCompletion(os.Stdout)
		case "zsh":
			cmd.Root().GenZshCompletion(os.Stdout)
		case "fish":
			cmd.Root().GenFishCompletion(os.Stdout, true)
		}
	},
}

Functions

func BuildBootstrapCmd added in v0.4.0

func BuildBootstrapCmd() *cobra.Command

func BuildBootstrapLoggingCommand added in v0.4.0

func BuildBootstrapLoggingCommand() *cobra.Command

func BuildCreateClusterCmd added in v0.2.0

func BuildCreateClusterCmd() *cobra.Command

func BuildCreateCmd

func BuildCreateCmd() *cobra.Command

func BuildDeleteClusterCmd added in v0.2.0

func BuildDeleteClusterCmd() *cobra.Command

func BuildDeleteCmd

func BuildDeleteCmd() *cobra.Command

func BuildGetCmd

func BuildGetCmd() *cobra.Command

func BuildInstallCmd

func BuildInstallCmd() *cobra.Command

func BuildUninstallCmd

func BuildUninstallCmd() *cobra.Command

Types

This section is empty.

Jump to

Keyboard shortcuts

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