commands

package
v3.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2022 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package commands provides general resources for CLI.

Package commands provides general resources for CLI.

Index

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

func ActionErrorf(format string, args ...interface{}) error

ActionErrorf formats according to a format specifier.

func BuildHostname

func BuildHostname(host, port string) string

BuildHostname builds a hostname string.

func BuildTunnel

func BuildTunnel(cliCtx *cli.Context, remoteHost *url.URL) (*portfwd.SSHTunnel, error)

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

func ClientByCLIContext(cliCtx *cli.Context) (*dblabapi.Client, error)

ClientByCLIContext creates a new Database Lab API client.

func ToActionError

func ToActionError(err error) error

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.

Jump to

Keyboard shortcuts

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