Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GlobalDB *gorm.DB
GlobalDB is a global db object that will be used across different packages
Functions ¶
func InitDatabase ¶
func InitDatabase() (err error)
InitDatabase creates a mysql db connecntion and stores it in the GlobalDB variable It reads the environment variables from the .env file and uses them to create the connection It returns an error if the connection fails
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.