Documentation
¶
Overview ¶
Package commands contains all the functions for CLI commands, such as listing, adding or deleting SSH connections. See an example of an integration with the CLI app :
app.Commands = []cli.Command{
{
Name: "list",
Aliases: []string{"l"},
Usage: "list all SSH connections",
Action: func(c *cli.Context) error {
return commands.ListConnections(c)
},
},
}
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddConnection ¶
AddConnection is a CLI command that adds a connection into user's book. It is called when the "ssh-book add" command is triggered by the user.
func Connect ¶
Connect is a CLI command that opens a connection stored inside user's book. It is called when the "ssh-book connect" command is triggered by the user.
func ListConnections ¶
ListConnections is a CLI command that lists all the saved connections in user's book. It is called when the "ssh-book list" command is triggered by the user.
func RemoveConnection ¶
RemoveConnection is a CLI command that removes a connection from user's book. It is called when the "ssh-book remove" command is triggered by the user.
Types ¶
This section is empty.