database

package
v0.0.0-...-fa930de Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: MIT Imports: 5 Imported by: 0

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.

Jump to

Keyboard shortcuts

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