mysql

package
v0.0.0-...-5c79d48 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

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

func DefaultConfigPath() (string, error)

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.

Jump to

Keyboard shortcuts

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