infrastructure

package
v0.0.0-...-3b801d0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2019 License: MIT Imports: 8 Imported by: 2

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 OpenDbConnection

func OpenDbConnection() *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