Documentation ¶
Index ¶
- Constants
- func GetCmdTimeout() time.Duration
- func GetDefaultDB() string
- func GetHost() string
- func GetPort() uint16
- func InitCfgRegistry()
- func InitConfig()
- func LookupTLSCACert() (string, bool)
- func LookupTLSClientCert() (string, bool)
- func LookupTLSClientKey() (string, bool)
- func SetDefaultDB(name string)
- func SetHost(host string)
- func SetPort(port uint16)
- func WriteFile() error
Constants ¶
View Source
const ( CacheDirSubDirName string = ".hakjctl" TokenCacheFileName string = "._hakjctl_token_cache___" // ConfigKeyHost is the configuration key for host. ConfigKeyHost string = "host" // ConfigKeyPort is the configuration key for port. ConfigKeyPort string = "port" // ConfigKeyDatabase is the configuration key for default database. ConfigKeyDatabase string = "default_db" // ConfigKeyTlsCertPath is the configuration key for TLS client certificate path. ConfigKeyTLSClientCertPath string = "tls_client_cert_path" // ConfigKeyTLSClientKeyPath is the configuration key for TLS client key path. ConfigKeyTLSClientKeyPath string = "tls_client_key_path" // ConfigKeyTLSCACertPath is the configuration key for TLS CA certificate path. ConfigKeyTLSCACertPath string = "tls_ca_cert_path" // ConfigKeyCommandTimeout is the configuration key for setting command timeout. ConfigKeyCommandTimeout string = "command_timeout" // EnvPrefix is the prefix for environment variables. EnvPrefix string = "HAKJCTL" // EnvVarPassword is the environment variable for password. EnvVarPassword string = EnvPrefix + "_PASSWORD" // DefaultDatabase is the name of the default database to use. DefaultDatabase string = "default" // DefaultCommandTimeout is the default command timeout in seconds. DefaultCommandTimeout uint32 = 10 )
Variables ¶
This section is empty.
Functions ¶
func GetCmdTimeout ¶
GetCmdTimeout gets the configured command timeout. Command timeout is the maximum number of seconds to wait before a request is cancelled.
func GetDefaultDB ¶ added in v1.2.0
func GetDefaultDB() string
func InitCfgRegistry ¶ added in v1.2.0
func InitCfgRegistry()
func LookupTLSCACert ¶ added in v1.1.0
The returned string is the file path. The returned bool is true if the path is set.
func LookupTLSClientCert ¶ added in v1.1.0
The returned string is the file path. The returned bool is true if the path is set.
func LookupTLSClientKey ¶ added in v1.1.0
The returned string is the file path. The returned bool is true if the path is set.
func SetDefaultDB ¶ added in v1.2.0
func SetDefaultDB(name string)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.