1 Star 0 Fork 0

tomatomeatman/GolangRepository

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
CacheInfo.go 644 Bytes
一键复制 编辑 原始数据 按行查看 历史
laowei 提交于 2024-07-15 14:55 +08:00 . bricks2准备
package model
import "time"
//用于定义缓存信息的类
type CacheInfo struct {
GsId string `json:"sId"` //编号,作为关键字存在
Gdata interface{} `json:"data"` //缓存的数据对象
GdCreate time.Time `json:"dCreate"` //创建时间
GdLast time.Time `json:"dLast"` //最后访问时间
}
/**
* 新建缓存信息结构体
* @param sId 编号,作为关键字存在
* @param data 缓存的数据对象
* @return 返回新创建的结构体
*/
func (CacheInfo) New(sId string, data interface{}) CacheInfo {
result := CacheInfo{
sId,
data,
time.Now(),
time.Now(),
}
return result
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/tomatomeatman/golang-repository.git
git@gitee.com:tomatomeatman/golang-repository.git
tomatomeatman
golang-repository
GolangRepository
5de5a6dbad55

搜索帮助