Documentation ¶
Overview ¶
Package commands provides general resources for CLI.
Package commands provides general resources for CLI.
Index ¶
- Constants
- func ActionErrorf(format string, args ...interface{}) error
- func BuildHostname(host, port string) string
- func BuildTunnel(cliCtx *cli.Context, remoteHost *url.URL) (*portfwd.SSHTunnel, error)
- func CheckForwardingServerURL(cliCtx *cli.Context) error
- func ClientByCLIContext(cliCtx *cli.Context) (*dblabapi.Client, error)
- func ToActionError(err error) error
- type ActionError
Constants ¶
View Source
const ( EnvironmentIDKey = "environment-id" URLKey = "url" TokenKey = "token" InsecureKey = "insecure" RequestTimeoutKey = "request-timeout" FwServerURLKey = "forwarding-server-url" FwLocalPortKey = "forwarding-local-port" IdentityFileKey = "identity-file" )
CLI configuration keys.
Variables ¶
This section is empty.
Functions ¶
func ActionErrorf ¶
ActionErrorf formats according to a format specifier.
func BuildHostname ¶
BuildHostname builds a hostname string.
func BuildTunnel ¶
BuildTunnel creates a new instance of SSH tunnel.
func CheckForwardingServerURL ¶
func CheckForwardingServerURL(cliCtx *cli.Context) error
CheckForwardingServerURL checks if the forwarding server URL is set.
func ClientByCLIContext ¶
ClientByCLIContext creates a new Database Lab API client.
func ToActionError ¶
ToActionError wraps the error to a new action error.
Types ¶
type ActionError ¶
type ActionError struct {
// contains filtered or unexported fields
}
ActionError defines a custom type of CLI action error.
func NewActionError ¶
func NewActionError(msg string) ActionError
NewActionError constructs a new Action error.
func (ActionError) Error ¶
func (e ActionError) Error() string
Error returns an output of the action error.
Directories ¶
Path | Synopsis |
---|---|
Package clone provides clones management commands.
|
Package clone provides clones management commands. |
Package config provides commands for a CLI config management.
|
Package config provides commands for a CLI config management. |
Package global provides general commands for CLI usage.
|
Package global provides general commands for CLI usage. |
Package instance provides instance management commands.
|
Package instance provides instance management commands. |
Package snapshot provides snapshot management commands.
|
Package snapshot provides snapshot management commands. |
Click to show internal directories.
Click to hide internal directories.