infrastructure

package
v0.0.0-...-f2de229 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

Functions

func GetDB

func GetDB() *gorm.DB

Using this function to get a connection, you can create your connection pool here.

func InitDb

func InitDb() *gorm.DB

Opening a database and save the reference to `Database` struct.

func RemoveDb

func RemoveDb(db *gorm.DB) error

Delete the database after running testing cases.

Types

type Database

type Database struct {
	*gorm.DB
}

Jump to

Keyboard shortcuts

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