Documentation
¶
Index ¶
Constants ¶
const ( EnvSdkUsername = "TT_CLI_EE_USERNAME" EnvSdkPassword = "TT_CLI_EE_PASSWORD" )
const ( TCPNetwork = "tcp" UnixNetwork = "unix" )
const EnvEtcdCredentialsHelp = "The command supports the following Etcd environment variables:\n" + "* " + EtcdUsernameEnv + " - specifies a Etcd username\n" + "* " + EtcdPasswordEnv + " - specifies a Etcd password"
const EnvTarantoolCredentialsHelp = "The command supports the following Tarantool environment variables:\n" + "* " + TarantoolUsernameEnv + " - specifies a Tarantool username\n" + "* " + TarantoolPasswordEnv + " - specifies a Tarantool password"
nolint: lll
const EtcdPasswordEnv = "TT_CLI_ETCD_PASSWORD"
EtcdPasswordEnv is an environment variable with a password for etcd.
const EtcdUsernameEnv = "TT_CLI_ETCD_USERNAME"
EtcdUsernameEnv is an environment variable with a username for etcd.
const TarantoolPasswordEnv = "TT_CLI_PASSWORD"
TarantoolPasswordEnv is an environment variable with a password for Tarantool.
const TarantoolUsernameEnv = "TT_CLI_USERNAME"
TarantoolUsernameEnv is an environment variable with a username for Tarantool.
Variables ¶
This section is empty.
Functions ¶
func IsCredentialsURI ¶
IsCredentialsURI returns true if a string is a valid credentials URI.
func MakeURLHelp ¶
nolint: lll MakeURLHelp returns a part of command help message related to URL arguments. The function uses a template to generate the message. Accepts following placeholders in the `data` map:
`header` - string: a header for the help message; `footer` - string: a final message of the help; `service` - string: name of the service to connect with URL; `prefix` - string: a base path used by service application; `tag` - string: description how `#fragment` part used by application; `param_<name>` - string: description for an extra URL param with <name> added to help; `env_<name>_auth` - string: service info. It will expanded to: * <name>_USERNAME - specifies a <info> username; * <name>_PASSWORD - specifies a <info> password. `env_<name>` - string: description for an extra environment variable with <name>: * <name> - <description>.
func ParseBaseURI ¶
ParseBaseURI parses an URI and returns: (network, address)
Types ¶
type UriOpts ¶
type UriOpts struct { // Endpoint is a an endpoint to connect: [scheme://]host[:port]. Endpoint string // Host is a an address to connect: host[:port]. Host string // Prefix is a configuration prefix. Prefix string // Tag value of #fragment URL part. Tag string // Username is a user name for authorization Username string // Password is a password for authorization Password string // KeyFile is a path to a private SSL key file. KeyFile string // CertFile is a path to an SSL certificate file. CertFile string // CaPath is a path to a trusted certificate authorities (CA) directory. CaPath string // CaFile is a path to a trusted certificate authorities (CA) file. CaFile string // Ciphers is a colon-separated (:) list of SSL cipher suites the // connection can use. Ciphers string // SkipHostVerify controls whether a client verifies the server's // host name. This is dangerous option so by default it is false. SkipHostVerify bool // SkipHostVerify controls whether a client verifies the server's // certificate chain. This is dangerous option so by default it is false. SkipPeerVerify bool // Timeout is a timeout for actions. Timeout time.Duration // Params keeps extra URL parameters. Params map[string]string }
UriOpts is a universal list of connect options retrieved from an URI.
func CreateUriOpts ¶
CreateUriOpts parse URL string and creates appropriated UriOpts.