database

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: AGPL-3.0, AGPL-3.0-or-later Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

DB is a global variable for database

Functions

func GetDB

func GetDB() *gorm.DB

GetDB get database

func InitDatabase

func InitDatabase(filePath string)

InitDatabase init database

Types

type DBInterface

type DBInterface interface {
	InitDB(migrateDst ...interface{}) (*gorm.DB, error)
}

DBInterface is an interface for database

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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