feat: update template

This commit is contained in:
2026-08-19 22:05:49 +08:00
parent 0e674e9d56
commit 5a71093b0c
67 changed files with 2070 additions and 585 deletions

View File

@@ -5,6 +5,9 @@ import "fmt"
const (
UserApiPermissionsPattern = "user:api:permissions:*"
UserInfoPattern = "user:info:*"
UserAuthStatePattern = "user:auth_state:*"
AuthRefreshPattern = "auth:refresh:*" // 新增:覆盖 <hash> 和 user:<id> 两种 key
)
func UserApiPermissions(id int32) string {
@@ -23,3 +26,7 @@ func AuthRefresh(hash string) string {
func AuthRefreshUser(userID int32) string {
return fmt.Sprintf("auth:refresh:user:%d", userID)
}
func UserAuthState(id int32) string {
return fmt.Sprintf("user:auth_state:%d", id)
}