Documentation ¶
Index ¶
- Variables
- func Close()
- func Drop(table interface{})
- func Migrate(db *gorm.DB, entity interface{}) error
- func NewMySQLDb(config Config) (*gorm.DB, error)
- func NewPostgresDb(config Config) (*gorm.DB, error)
- func NewSqliteDb(path string) (*gorm.DB, error)
- func SetupDatabase()
- func SetupDatabaseTests()
- type Config
- type Model
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Db *gorm.DB
)
Functions ¶
func NewPostgresDb ¶
New open a new database connection
func SetupDatabase ¶
func SetupDatabase()
func SetupDatabaseTests ¶
func SetupDatabaseTests()
Types ¶
Click to show internal directories.
Click to hide internal directories.