调整缓存key,增加kv持久化方法

This commit is contained in:
ayflying
2025-03-18 16:16:44 +08:00
parent 1c4f804738
commit 14de836089
6 changed files with 164 additions and 4 deletions

32
service/game_kv.go Normal file
View File

@@ -0,0 +1,32 @@
// ================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// You can delete these comments if you wish manually maintain this interface file.
// ================================================================================
package service
type (
IGameKv interface {
// SavesV1 方法
//
// @Description: 保存用户KV数据列表。
// @receiver s: sGameKv的实例。
// @return err: 错误信息如果操作成功则为nil。
SavesV1() (err error)
}
)
var (
localGameKv IGameKv
)
func GameKv() IGameKv {
if localGameKv == nil {
panic("implement not found for interface IGameKv, forgot register?")
}
return localGameKv
}
func RegisterGameKv(i IGameKv) {
localGameKv = i
}