global

package
v0.0.0-...-382dce9 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OPM_DB     *gorm.DB
	OPM_DBList map[string]*gorm.DB
	OPM_REDIS  *redis.Client
	OPM_CONFIG config.Server
	OPM_VP     *viper.Viper
	// OPM_LOG    *oplogging.Logger
	OPM_LOG                 *zap.Logger
	OPM_Timer               timer.Timer = timer.NewTimerTask()
	OPM_Concurrency_Control             = &singleflight.Group{}

	BlackCache local_cache.Cache
)

Functions

func GetGlobalDBByDBName

func GetGlobalDBByDBName(dbname string) *gorm.DB

GetGlobalDBByDBName get by name db list' db

func MustGetGlobalDBByDBName

func MustGetGlobalDBByDBName(dbname string) *gorm.DB

MustGetGlobalDBByDBName get by name db, panic if not present

Types

type OPM_MODEL

type OPM_MODEL struct {
	ID        uint           `gorm:"primarykey"` // id
	CreatedAt time.Time      // create time
	UpdatedAt time.Time      // update time
	DeletedAt gorm.DeletedAt `gorm:"index" json:"-"` // delete time
}

Jump to

Keyboard shortcuts

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