实现七月迭代公共技术基础
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 9m20s

This commit is contained in:
2026-07-23 17:52:48 +09:00
parent f7c42252c0
commit 17782d5f8e
76 changed files with 5246 additions and 158 deletions

View File

@@ -0,0 +1,24 @@
package constants
import (
"fmt"
"time"
)
const (
// SystemConfigTypeString 表示字符串配置。
SystemConfigTypeString = "string"
// SystemConfigTypeInt 表示整数配置。
SystemConfigTypeInt = "int"
// SystemConfigTypeBool 表示布尔配置。
SystemConfigTypeBool = "bool"
// SystemConfigTypeJSON 表示 JSON 配置。
SystemConfigTypeJSON = "json"
// SystemConfigCacheTTL 是系统配置默认缓存时长。
SystemConfigCacheTTL = 5 * time.Minute
)
// RedisSystemConfigKey 生成单个系统配置的 Redis 缓存键。
func RedisSystemConfigKey(configKey string) string {
return fmt.Sprintf("system_config:value:%s", configKey)
}