infrastructures

package
v0.0.0-...-4cf977b Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 License: ISC Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DBConn is the database connection
	DBConn *gorm.DB
)

Functions

func GetDBConn

func GetDBConn() *gorm.DB

GetDBConn returns the database connection object

Types

type DBParams

type DBParams struct {
	Host     string
	Port     string
	User     string
	Password string
	DBName   string
}

func DBConfig

func DBConfig() DBParams

DBConfig returns the database configuration parameters from environment variables

see: utils/env.go

func (*DBParams) Connect

func (dbConfig *DBParams) Connect() error

Connect creates a connection to database dbConfig is the database configuration parameters

see: utils/config.go and utils/env.go for more details

Jump to

Keyboard shortcuts

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