mysql

package
v11.3.3 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: Apache-2.0 Imports: 7 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

This section is empty.

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