mysql

package
v0.0.0-...-61829c1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2019 License: Apache-2.0 Imports: 7 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBGetter

type DBGetter interface {
	Get() *sqlx.DB
}

type MySQL

type MySQL struct {
	Name            string
	Host            string `conf:"upstream" validate:"@hostname"`
	Port            int
	User            string           `conf:"env" validate:"@string[1,)"`
	Password        presets.Password `conf:"env" validate:"@string[1,)"`
	Extra           string
	PoolSize        int
	ConnMaxLifetime time.Duration
	presets.Retry
	// contains filtered or unexported fields
}

func (*MySQL) Connect

func (m *MySQL) Connect() error

func (MySQL) DockerDefaults

func (m MySQL) DockerDefaults() conf.DockerDefaults

func (*MySQL) Get

func (m *MySQL) Get() *sqlx.DB

func (MySQL) GetConnect

func (m MySQL) GetConnect() string

func (*MySQL) Init

func (m *MySQL) Init()

func (MySQL) MarshalDefaults

func (m MySQL) MarshalDefaults(v interface{})

Jump to

Keyboard shortcuts

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