mysqlclient

package
v0.0.0-...-e38cb6b Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeGorm = "gorm"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func InitClient

func InitClient(sqlconf *conf.Mysql) *Client

func InitClientWithProm

func InitClientWithProm(sqlconf *conf.Mysql, promClient **broccoliprometheus.Prom) *Client

func (*Client) Close

func (dbs *Client) Close()

func (*Client) GetCli

func (dbs *Client) GetCli() *gorm.DB

func (*Client) Reload

func (dbs *Client) Reload(cfg *conf.Mysql)

type DataSource

type DataSource struct {
	Host            string
	User            string
	Pwd             string
	DataSourceName  string
	CharSet         string
	ParseTime       bool
	ConnMaxLifetime time.Duration
	MaxIdleConns    int
	MaxOpenConns    int
}

type Handler

type Handler func(*gorm.Scope)

Handler ...

type Interceptor

type Interceptor func(*conf.Mysql, *broccoliprometheus.Prom) func(next Handler) Handler

Interceptor ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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