mysql

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2020 License: BSD-3-Clause Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

Types

type Config

type Config struct {
	Pool []Item `yaml:"mysql"`
}

func (*Config) List

func (c *Config) List() (list []schema.ItemInterface)

type Item

type Item struct {
	Name              string        `yaml:"name"`
	Host              string        `yaml:"host"`
	Port              int           `yaml:"port"`
	Schema            string        `yaml:"schema"`
	User              string        `yaml:"user"`
	Password          string        `yaml:"password"`
	MaxIdleConn       int           `yaml:"maxidleconn"`
	MaxOpenConn       int           `yaml:"maxopenconn"`
	MaxConnTTL        time.Duration `yaml:"maxconnttl"`
	InterpolateParams bool          `yaml:"interpolateparams"`
	Timezone          string        `yaml:"timezone"`
	TxIsolationLevel  string        `yaml:"txisolevel"`
	Charset           string        `yaml:"charset"`
	Timeout           time.Duration `yaml:"timeout"`
	ReadTimeout       time.Duration `yaml:"readtimeout"`
	WriteTimeout      time.Duration `yaml:"writetimeout"`
}

func (Item) GetDSN

func (i Item) GetDSN() string

func (Item) GetName

func (i Item) GetName() string

func (Item) Setup

func (i Item) Setup(s schema.SetupInterface)

Jump to

Keyboard shortcuts

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