database

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: MIT Imports: 17 Imported by: 13

Documentation

Overview

Package database handles connections to different types of databases

Index

Constants

This section is empty.

Variables

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
Package migrate to migrate the schema
Package migrate to migrate the schema
Package model contains all the models required for a functional database management system
Package model contains all the models required for a functional database management system

Jump to

Keyboard shortcuts

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