增加用户管理

This commit is contained in:
wtz
2026-02-20 23:39:49 +08:00
parent a272dad5f1
commit af3b805dbf
18 changed files with 1493 additions and 53 deletions

View File

@@ -250,3 +250,23 @@ func RoomTTLKey(roomID string) string {
func PlayerTTLKey(playerID string) string {
return "player:" + playerID + ":ttl"
}
func CaptchaKey(captchaID string) string {
return "captcha:" + captchaID
}
func UserKey(username string) string {
return "user:" + username
}
func UserRoomKey(userID string) string {
return "user:" + userID + ":room"
}
func SessionKey(token string) string {
return "session:" + token
}
func UserIDToUsernameKey(userID string) string {
return "user_id:" + userID + ":username"
}