dbs

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectMysql

func ConnectMysql(address, loc, parseTime, charset string, pool int)

ConnectMysql ... connect to mysql db

"mysql": {
    "pool": 20,
    "charset": "utf8mb4",
    "parseTime": "true",
    "loc": "Local",
    "address": "username:password@tcp(host:port)/dbname"
  }

func ConnectRedis

func ConnectRedis(addr, password, db string)

ConnectRedis ... connect to redis

func GetDB

func GetDB() *gorm.DB

GetDB get global DB instance

func NewConnection

func NewConnection() redis.Conn

NewConnection ... new a connection from redis pool

Types

This section is empty.

Directories

Path Synopsis
cmd/dto command

Jump to

Keyboard shortcuts

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