cmd

package
v0.30.2 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2018 License: Apache-2.0 Imports: 27 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// ConfigFilename is the forge config file without extension
	ConfigFilename = ".stormforger"
	// EnvPrefix is the prefix for environment configuration
	EnvPrefix = "stormforger"
)

Variables

View Source
var CompletionCmd = &cobra.Command{
	Use:   "completion",
	Short: "Create completion files for bash and zsh.",
	Long: `Create shell completion code to tab-complete forge's commands.

The generated completion files will be output in the current folder:
- forge-completion-bash.sh
- forge-completion-zsh.sh

Zsh (experimental)
------------------
1. Rename forge-completion-zsh.sh to _forge and move it into a directory
   that is part of your $fpath
2. Re-initialize your completion files:
   rm -f ~/.zcompdump; compinit

Bash
----
To enable bash completion for forge:
1. Edit your ~/.bash_profile and add a line like this:
   source /path/to/forge-completion-bash.sh
2. Start a new terminal session
`,
	Run: generateCompletionFiles,
}

CompletionCmd is the command to generate bash/zsh completion

View Source
var (
	// RootCmd represents the cobra root command
	RootCmd = &cobra.Command{
		Use: "forge",
		PersistentPreRun: func(cmd *cobra.Command, args []string) {
			if !stringInSlice(rootOpts.OutputFormat, []string{"human", "plain", "json"}) {
				log.Fatalf("Unknown output format '%s'", rootOpts.OutputFormat)
			}
		},
		Short: "Command line client to StormForger (https://stormforger.com)",
		Long: `The command line client "forge" to StormForger offers a interface
to the StormForger API and several convenience methods
to handle load and performance tests.

Happy Load Testing :)`,
	}
)
View Source
var TestCaseCmd = &cobra.Command{
	Use:     "test-case",
	Aliases: []string{"testcase", "tc"},
	Short:   "Work with and manage test cases",
	Long:    `Work with and manage test cases.`,
}

TestCaseCmd is the cobra definition

View Source
var TestRunCmd = &cobra.Command{
	Use:     "test-run",
	Aliases: []string{"testrun", "tr"},
	Short:   "Work with and manage test runs",
	Long:    `Work with and manage test runs.`,
}

TestRunCmd is the cobra definition

Functions

func Execute

func Execute()

Execute is the entry function for cobra

func NewClient

func NewClient() *api.Client

NewClient initializes a new API Client

Types

This section is empty.

Jump to

Keyboard shortcuts

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