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 *glog.Glogger GVA_Timer timer.Timer = timer.NewTimerTask() GVA_Concurrency_Control = &singleflight.Group{} BlackCache local_cache.Cache )
Functions ¶
func GetGlobalDBByDBName ¶
GetGlobalDBByDBName 通过名称获取db list中的db
func MustGetGlobalDBByDBName ¶
MustGetGlobalDBByDBName 通过名称获取db 如果不存在则 使用默认db panic
Types ¶
type GVA_MODEL ¶
type GVA_MODEL struct { //gorm.Model ID uint `gorm:"column:id;primaryKey;autoIncrement:true;type:int;" json:"ID"` // 主键ID CreatedAt time.Time `gorm:"column:created_at;not null;autoCreateTime" json:"CreatedAt"` // 创建时间 UpdatedAt time.Time `gorm:"column:updated_at;not null;autoUpdateTime" json:"UpdatedAt"` // 更新时间 DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;index" json:"-"` // 删除时间 }
json 推荐下划线
Click to show internal directories.
Click to hide internal directories.