Files
junhong_cmp_fiber/pkg/constants/system_config.go
break 17782d5f8e
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 9m20s
实现七月迭代公共技术基础
2026-07-23 17:52:48 +09:00

25 lines
660 B
Go

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)
}