Documentation
¶
Index ¶
Constants ¶
View Source
const ( // MySQLSSLModeVerifyCA is MySQL SSL mode that verifies server CA. // // See MySQL SSL mode docs for more info: // https://dev.mysql.com/doc/refman/8.0/en/connection-options.html#option_general_ssl-mode MySQLSSLModeVerifyCA = "VERIFY_CA" // MySQLSSLModeVerifyIdentity is MySQL SSL mode that verifies host name. // // See MySQL SSL mode docs for more info: // https://dev.mysql.com/doc/refman/8.0/en/connection-options.html#option_general_ssl-mode MySQLSSLModeVerifyIdentity = "VERIFY_IDENTITY" )
Variables ¶
This section is empty.
Functions ¶
func DefaultConfigPath ¶
DefaultConfigPath returns the default config path, which is .my.cnf file in the user's home directory. Home dir is determined by environment if not supplied as an argument.
Types ¶
type OptionFile ¶
type OptionFile struct {
// contains filtered or unexported fields
}
OptionFile represents MySQL option file.
https://dev.mysql.com/doc/refman/8.0/en/option-files.html
func Load ¶
func Load() (*OptionFile, error)
Load loads MySQL option file from the default location.
func LoadFromPath ¶
func LoadFromPath(path string) (*OptionFile, error)
LoadFromPath loads MySQL option file from the specified path.
func (*OptionFile) Delete ¶
func (o *OptionFile) Delete(name string) error
Delete removes the specified connection profile.
func (*OptionFile) Env ¶
func (o *OptionFile) Env(name string) (map[string]string, error)
Env returns the specified connection profile as environment variables.
func (*OptionFile) Upsert ¶
func (o *OptionFile) Upsert(profile profile.ConnectProfile) error
Upsert saves the provided connection profile in MySQL option file.
Click to show internal directories.
Click to hide internal directories.