Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Gorm *gorm.DB
View Source
var NewsCachePool *sync.Pool
Functions ¶
func NewMCache ¶
func NewMCache() *goredis.SimpleCache
func NewsDBGetter ¶
func NewsDBGetter(id string) goredis.DBGettFunc
Types ¶
type McachePool ¶
type McachePool struct {
mstruct.MCacheConfig
}
func NewMCachePool ¶
func NewMCachePool(config mstruct.MCacheConfig) *McachePool
type NewsModel ¶
type NewsModel struct { NewsID int `gorm:"column:id" json:"id"` NewsTitle string `gorm:"column:newstitle" json:"title"` NewsContent string `gorm:"column:newscontent" json:"content"` NewsVies int `gorm:"column:views" json:"views"` NewsTime time.Time `gorm:"column:addtime" json:"addtime"` }
func NewNewsModel ¶
func NewNewsModel() *NewsModel
Click to show internal directories.
Click to hide internal directories.