Documentation ¶ Index ¶ func InitDB(dbCfg *config.DatabaseConfig) (*gorm.DB, error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func InitDB ¶ func InitDB(dbCfg *config.DatabaseConfig) (*gorm.DB, error) InitDB initialises a database connection as well as runs the migration scripts. It is important to close the database after using it by calling defer db.Close() Types ¶ This section is empty. Source Files ¶ View all Source files database.go Click to show internal directories. Click to hide internal directories.