database

package
v0.0.0-...-fa01437 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MysqlConfig

type MysqlConfig struct {
	DSN             string
	MaxIdleConns    int
	MaxOpenConns    int
	ConnMaxLifetime time.Duration
	DevMode         bool
}

type MysqlConnector

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

func NewMysqlConnector

func NewMysqlConnector(conf MysqlConfig) (*MysqlConnector, error)

func (*MysqlConnector) Close

func (m *MysqlConnector) Close(ctx context.Context) error

func (*MysqlConnector) Connect

func (m *MysqlConnector) Connect(ctx context.Context) (*gorm.DB, error)

func (*MysqlConnector) Ping

func (m *MysqlConnector) Ping(ctx context.Context) error

Jump to

Keyboard shortcuts

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