database

package
v0.0.0-...-594642b Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup(driver string)

Types

type Database

type Database interface {
	Setup()
	Open(conn string, cfg *gorm.Config) (db *gorm.DB, err error)
	GetConnect() string
	GetDriver() string
}

type Mysql

type Mysql struct {
}

func (*Mysql) GetConnect

func (m *Mysql) GetConnect() string

获取数据库连接

func (*Mysql) GetDriver

func (m *Mysql) GetDriver() string

func (*Mysql) Open

func (m *Mysql) Open(db *sql.DB, cfg *gorm.Config) (*gorm.DB, error)

打开数据库连接

func (*Mysql) Setup

func (m *Mysql) Setup()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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