Documentation
¶
Overview ¶
Package database help us to connect to the database using the gorm library and with tracing.
Index ¶
Constants ¶
View Source
const ( // DBPrefix is the prefix for all environment variables related to the database. DBPrefix = "DB_" // PostgresDriverName is the name of the postgres driver. PostgresDriverName = "pgx" // MySQLDriverName is the name of the mysql driver. MySQLDriverName = "mysql" // Postgres is the enum for postgres database. Postgres database = "postgres" // MySQL is the enum for mysql database. MySQL database = "mysql" )
Variables ¶
This section is empty.
Functions ¶
func InitDBWithPrefix ¶ added in v0.2.0
InitDBWithPrefix initializes a new database connection with a prefix.
func InitMongoDB ¶ added in v0.2.0
InitMongoDB initializes a new mongo database connection.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.