websh

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WebshCmd = &cobra.Command{
	Use:   "websh [SERVER NAME]",
	Short: "Open a websh terminal for a server",
	Long: ` 
	This command opens a websh terminal for interacting with the specified server. 
	It provides a terminal interface to manage and control the server remotely.
	`,
	Example: `
	alpacon websh [SERVER NAME]
	alpacon websh -r [SERVER_NAME]
	alpacon websh [SERVER NAME] --root
	`,
	Args: cobra.ExactArgs(1),
	Run: func(cmd *cobra.Command, args []string) {
		serverName := args[0]

		alpaconClient, err := client.NewAlpaconAPIClient()
		if err != nil {
			utils.CliError("Connection to Alpacon API failed: %s. Consider re-logging.", err)
		}

		err = websh.CreateWebshConnection(alpaconClient, serverName, root)
		if err != nil {
			utils.CliError("Failed to create the websh connection %s", err)
		}
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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