global

package
v0.0.0-...-26d3578 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: Apache-2.0 Imports: 10 Imported by: 19

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GVA_DB     *gorm.DB
	GVA_DBList map[string]*gorm.DB
	GVA_REDIS  *redis.Client
	GVA_CONFIG config.Server
	GVA_VP     *viper.Viper
	// GVA_LOG    *oplogging.Logger
	GVA_LOG                 *zap.Logger
	GVA_Timer               timer.Timer = timer.NewApiCase()
	GVA_Concurrency_Control             = &singleflight.Group{}

	BlackCache local_cache.Cache

	DebugTalkLock     = make(map[string]*sync.Mutex)
	DebugTalkFileLock = sync.RWMutex{}

	HrpMode       HrpModes
	IgnoreInstall bool
)

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 GVA_MODEL

type GVA_MODEL struct {
	ID        uint           `gorm:"primarykey"`              // 主键ID
	CreatedAt time.Time      `json:"CreatedAt"`               // 创建时间
	UpdatedAt time.Time      `json:"UpdatedAt"`               // 更新时间
	DeletedAt gorm.DeletedAt `json:"-" gorm:"index" json:"-"` // 删除时间
}

type HrpModes

type HrpModes int
const (
	HrpModeMaster HrpModes = 1
	HrpModeWork   HrpModes = 2
)

Jump to

Keyboard shortcuts

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