driver

package
v0.0.0-...-6e5bb36 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenMysql

func OpenMysql(cfg config.IConfig) (dbx *gorm.DB, err error)

OpenMysql ...

func OpenPgsql

func OpenPgsql(cfg config.IConfig) (dbx *gorm.DB, err error)

OpenPgsql ...

Types

type MysqlOption

type MysqlOption struct {
	Host            string
	Port            int
	Username        string
	Password        string
	DBName          string
	AddParams       string
	MaxOpenConns    int
	MaxIdleConns    int
	ConnMaxLifetime int
}

MysqlOption ...

type PgsqlOption

type PgsqlOption struct {
	Host        string
	Port        int
	Username    string
	Password    string
	DBName      string
	MaxPoolSize time.Duration
	Sslmode     string
}

PgsqlOption ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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