db

package
v0.0.0-...-0b89419 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DefaultConnectionTimeout = time.Minute * 6
)

Variables

This section is empty.

Functions

func CreateMySQLConfigDSN

func CreateMySQLConfigDSN(user, password, mysqlServiceHost, mysqlServicePort, dbName, mysqlGroupConcatMaxLen string,
	mysqlExtraParams map[string]string) string

func InitDBClient

func InitDBClient(params ConnectionParams, initConnectionTimeout time.Duration) (*gorm.DB, error)

Types

type ConnectionParams

type ConnectionParams struct {
	DbDriver            string
	DbHost              string
	DbPort              string
	DbName              string
	DbUser              string
	DbPwd               string
	DbGroupConcatMaxLen string
	DbExtraParams       string
	Timeout             time.Duration
}

func (*ConnectionParams) LoadMySQLDefaults

func (params *ConnectionParams) LoadMySQLDefaults()

Jump to

Keyboard shortcuts

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