database

package
v0.0.0-...-271498a Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

DB global variable to access gorm

View Source
var MongoClient *qmgo.Client

MongoClient instance

View Source
var RedisClient radix.Client

RedisClient global variable to access the redis client

View Source
var RedisConnTTL int

RedisConnTTL - context deadline in second

Functions

func GetDB

func GetDB() *gorm.DB

GetDB - get a connection

func GetMongo

func GetMongo() *qmgo.Client

GetMongo - get a connection

func GetRedis

func GetRedis() radix.Client

GetRedis - get a connection

func InitDB

func InitDB() *gorm.DB

InitDB - function to initialize db

func InitMongo

func InitMongo() (*qmgo.Client, error)

InitMongo - function to initialize mongo client

func InitRedis

func InitRedis() (radix.Client, error)

InitRedis - function to initialize redis client

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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