db

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HOST     = os.Getenv("PG_HOST")
	USER     = os.Getenv("PG_USER")
	PASSWORD = os.Getenv("PG_PASS")
	DB       = os.Getenv("PG_DB")
	PORT     = os.Getenv("PG_PORT")
	PgDB     *gorm.DB
)
View Source
var (
	RedisHost = os.Getenv("REDIS_HOST")
	RedisPort = os.Getenv("REDIS_PORT")
	Client    *redis.Client
)

Functions

func CloseDB

func CloseDB(logs *common.Logger)

func CloseRedis

func CloseRedis(logs *common.Logger)

func CreateAdminUser

func CreateAdminUser(logs *common.Logger)

func GetDB

func GetDB() *gorm.DB

func GetRedis

func GetRedis() *redis.Client

func MigrateTables

func MigrateTables(logs *common.Logger)

func OpenDB

func OpenDB(logs *common.Logger) error

func RedisClient

func RedisClient() error

Types

This section is empty.

Jump to

Keyboard shortcuts

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