api
This commit is contained in:
@@ -17,6 +17,12 @@ type Store interface {
|
||||
Delete(ctx context.Context, key string) error
|
||||
}
|
||||
|
||||
// MaSessionPrefix 是小程序用户会话键前缀。
|
||||
const MaSessionPrefix = "ma:session:"
|
||||
|
||||
// MaSessionKey 拼接小程序用户会话键(token 为 Login 签发的会话凭证)。
|
||||
func MaSessionKey(token string) string { return MaSessionPrefix + token }
|
||||
|
||||
// MemoryStore 进程内会话存储,适用于无 Redis 的本地/测试环境。
|
||||
// 注意:多实例部署时各进程不共享,仅供单实例使用。
|
||||
type MemoryStore struct {
|
||||
|
||||
Reference in New Issue
Block a user