database

package
v0.0.0-...-cf52b1d Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DB *gorm.DB
)

Functions

func Init

func Init(dataSource *DatasourceConfig)

func NewMysqlDB

func NewMysqlDB(dataSource *DatasourceConfig) *gorm.DB

Types

type DatasourceConfig

type DatasourceConfig struct {
	DriverName string `mapstructure:"driverName"`
	Addr       string `mapstructure:"addr"`
	Database   string `mapstructure:"database"`
	User       string `mapstructure:"user"`
	Password   string `mapstructure:"password"`
	Charset    string `mapstructure:"charset"`
}

Jump to

Keyboard shortcuts

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