global

package
v0.0.0-...-76d7753 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GVA_DB                  *gorm.DB
	GVA_DBList              map[string]*gorm.DB
	GVA_VP                  *viper.Viper
	Log                     *zap.Logger
	GVA_Timer               timer.Timer = timer.NewTimerTask()
	GVA_Concurrency_Control             = &singleflight.Group{}

	BlackCache local_cache.Cache
)

Functions

func GetGlobalDBByDBName

func GetGlobalDBByDBName(dbname string) *gorm.DB

GetGlobalDBByDBName 通过名称获取db list中的db

func MustGetGlobalDBByDBName

func MustGetGlobalDBByDBName(dbname string) *gorm.DB

MustGetGlobalDBByDBName 通过名称获取db 如果不存在则panic

Types

type IController

type IController interface {
	Build(e *Start)
}

type Start

type Start struct {
	*gin.Engine
}

func Ignite

func Ignite() *Start

func (*Start) Mount

func (g *Start) Mount(controllers ...IController) *Start

Mount 挂载需要执行的 gin.Handle

func (*Start) Run

func (g *Start) Run(addr string)

Jump to

Keyboard shortcuts

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