database

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: MIT Imports: 10 Imported by: 0

README

Database

Database is a lib to simplify the database connection.

Installation

go get github.com/facily-tech/go-core/database

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"
	// Postgres is the enum for postgres database.
	Postgres database = "postgres"
)

Variables

This section is empty.

Functions

func InitDB

func InitDB(database database) (*gorm.DB, *sql.DB, error)

InitDB initializes a new database connection.

Types

This section is empty.

Jump to

Keyboard shortcuts

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