Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GetSSHCommand = &cobra.Command{ Use: "get-ssh-command", Short: "Constructs and returns the SSH command based on the running Gerrit instance.", RunE: func(cmd *cobra.Command, args []string) error { path := getString(cmd, "json") if path == "" { return errors.New("--json not provided") } info, err := gerrittest.LoadJSON(path) if err != nil { return err } sshcmd, err := gerrittest.GetSSHCommand(info) if err != nil { return err } fmt.Println(sshcmd) return nil }, }
GetSSHCommand returns a command to run to connect over ssh.
View Source
var Start = &cobra.Command{ Use: "start", Short: "Responsible for starting an instance of Gerrit.", RunE: func(cmd *cobra.Command, args []string) error { cfg, err := newStartConfig(cmd) if err != nil { return err } gerrit, err := gerrittest.New(cfg) if err != nil { return gerrit.Destroy() } return jsonOutput(cmd, gerrit) }, }
Start implements the `start` subcommand.
View Source
var Stop = &cobra.Command{ Use: "stop", Short: "Responsible for stopping an instance of Gerrit.", RunE: func(cmd *cobra.Command, args []string) error { path := getString(cmd, "json") if path == "" { return errors.New("--json not provided") } instance, err := gerrittest.NewFromJSON(path) if err != nil { return err } return instance.Destroy() }, }
Stop implements the `stop` subcommand.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.