config

package
v0.0.0-...-40b02db Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: MIT Imports: 11 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DBDriver = GetEnv("DB_DRIVER", "postgres")
	DBName   = GetEnv("DB_NAME", "email_verification")
	DBHost   = GetEnv("DB_HOST", "localhost")
	DBPort   = GetEnv("DB_PORT", "5432")
	DBUser   = GetEnv("DB_USER", "postgres")
	DBPass   = GetEnv("DB_PASS", "")
	SSLMode  = GetEnv("SSL_MODE", "disable")

	REDISHost = GetEnv("REDIS_HOST")
	REDISPass = GetEnv("REDIS_PASS")
	REDISPort = GetEnv("REDIS_PORT")

	MONGOHost = GetEnv("MONGO_HOST")
	MONGOPort = GetEnv("MONGO_PORT")
	MONGODB   = GetEnv("MONGO_DB")
)

Functions

func CloseConnectionDB

func CloseConnectionDB()

CloseConnectionDB adalah

func CloseRedis

func CloseRedis()

func ConnectMongo

func ConnectMongo(ctx context.Context, DBCollection ...string) *mongo.Database

func ConnectRedis

func ConnectRedis() redis.Conn

func DBConnection

func DBConnection() *sql.DB

DBConnection adalah

func GetEnv

func GetEnv(key string, value ...string) string

func OpenConnection

func OpenConnection() error

Open Connection

Types

This section is empty.

Jump to

Keyboard shortcuts

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