app

package
v0.9.10 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Container = NewContainer()
)

Functions

func DB added in v0.9.0

func DB() *gorm.DB

DB 返回数据库连接

func GetDB added in v0.9.0

func GetDB(connectionName string) *gorm.DB

GetDB 通过名称获取数据库连接

func Http added in v0.8.0

func Http() (client *http.Client)

Http client

func InitDB added in v0.9.0

func InitDB() error

InitDB 初始化DB

func InitRedis added in v0.9.0

func InitRedis() error

InitRedis 初始化redis

func NewContainer

func NewContainer() *dig.Container

NewContainer return an empty container

func Redis

func Redis() (connection *redis.Client)

Redis get redis connection

Types

This section is empty.

Jump to

Keyboard shortcuts

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