database

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2022 License: MIT Imports: 17 Imported by: 13

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 added in v1.4.2

func GetMongo() *qmgo.Client

GetMongo - get a connection

func GetRedis added in v1.2.7

func GetRedis() radix.Client

GetRedis - get a connection

func InitDB

func InitDB() *gorm.DB

InitDB - function to initialize db

func InitMongo added in v1.4.2

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

InitMongo - function to initialize mongo client

func InitRedis added in v1.2.7

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