mysql

package
v1.4.7 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MySQL

type MySQL struct {
	Name            string
	Host            string
	Port            int
	User            string
	Password        envconfig.Password
	Extra           string
	PoolSize        int
	ConnMaxLifetime envconfig.Duration
	Retry
	Database *sqlx.Database `json:"-" ignored:"true"`

	*sqlx.DB `json:"-" ignored:"true"`
}

func (*MySQL) Connect

func (m *MySQL) Connect() error

func (*MySQL) Get

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

func (*MySQL) Init

func (m *MySQL) Init()

func (*MySQL) Refresh

func (m *MySQL) Refresh()

func (*MySQL) SetDefaults

func (m *MySQL) SetDefaults()

func (*MySQL) URL

func (m *MySQL) URL() string

type Retry

type Retry struct {
	Repeats  int
	Interval envconfig.Duration
}

func (Retry) Do

func (r Retry) Do(exec func() error) (err error)

func (*Retry) SetDefaults

func (r *Retry) SetDefaults()

Jump to

Keyboard shortcuts

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