utils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateEnumTypeDB

func CreateEnumTypeDB()

func NewPostgreSQLConnection

func NewPostgreSQLConnection(config *config.AppConfig) *gorm.DB

Types

type DatabaseConnection

type DatabaseConnection struct {
	Driver DatabaseDriver

	// for PostgreSQL
	PostgreSQL *gorm.DB
}

func NewConnectionDB

func NewConnectionDB(config *config.AppConfig) *DatabaseConnection

func (*DatabaseConnection) Close

func (db *DatabaseConnection) Close()

type DatabaseDriver

type DatabaseDriver string
const (
	// MongoDB Database driver
	MongoDB DatabaseDriver = "mongodb"

	// MySQL Database driver
	MySQL DatabaseDriver = "mysql"

	// PostgreSQL Database driver
	PostgreSQL DatabaseDriver = "postgres"
)

Jump to

Keyboard shortcuts

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