feat: 新增轮询自动触发配置(EnableAutoTrigger、AutoTriggerSystemUserID)
This commit is contained in:
@@ -13,17 +13,18 @@ var globalConfig atomic.Pointer[Config]
|
||||
|
||||
// Config 应用配置
|
||||
type Config struct {
|
||||
Server ServerConfig `mapstructure:"server"`
|
||||
Redis RedisConfig `mapstructure:"redis"`
|
||||
Database DatabaseConfig `mapstructure:"database"`
|
||||
Queue QueueConfig `mapstructure:"queue"`
|
||||
Logging LoggingConfig `mapstructure:"logging"`
|
||||
Middleware MiddlewareConfig `mapstructure:"middleware"`
|
||||
SMS SMSConfig `mapstructure:"sms"`
|
||||
JWT JWTConfig `mapstructure:"jwt"`
|
||||
DefaultAdmin DefaultAdminConfig `mapstructure:"default_admin"`
|
||||
Storage StorageConfig `mapstructure:"storage"`
|
||||
Gateway GatewayConfig `mapstructure:"gateway"`
|
||||
Server ServerConfig `mapstructure:"server"`
|
||||
Redis RedisConfig `mapstructure:"redis"`
|
||||
Database DatabaseConfig `mapstructure:"database"`
|
||||
Queue QueueConfig `mapstructure:"queue"`
|
||||
Logging LoggingConfig `mapstructure:"logging"`
|
||||
Middleware MiddlewareConfig `mapstructure:"middleware"`
|
||||
SMS SMSConfig `mapstructure:"sms"`
|
||||
JWT JWTConfig `mapstructure:"jwt"`
|
||||
DefaultAdmin DefaultAdminConfig `mapstructure:"default_admin"`
|
||||
Storage StorageConfig `mapstructure:"storage"`
|
||||
Gateway GatewayConfig `mapstructure:"gateway"`
|
||||
PollingAutoTrigger PollingAutoTriggerConfig `mapstructure:"polling_auto_trigger"`
|
||||
}
|
||||
|
||||
// ServerConfig HTTP 服务器配置
|
||||
@@ -139,6 +140,16 @@ type GatewayConfig struct {
|
||||
Timeout int `mapstructure:"timeout"` // 超时时间(秒)
|
||||
}
|
||||
|
||||
// PollingAutoTriggerConfig 轮询自动触发配置
|
||||
type PollingAutoTriggerConfig struct {
|
||||
// EnableAutoTrigger 是否启用C端实名自动触发
|
||||
// 环境变量:JUNHONG_POLLING_AUTO_TRIGGER_ENABLE_AUTO_TRIGGER
|
||||
EnableAutoTrigger bool `mapstructure:"enable_auto_trigger"`
|
||||
// AutoTriggerSystemUserID 自动触发使用的系统用户ID(暂用 SuperAdmin ID=1)
|
||||
// 环境变量:JUNHONG_POLLING_AUTO_TRIGGER_AUTO_TRIGGER_SYSTEM_USER_ID
|
||||
AutoTriggerSystemUserID int `mapstructure:"auto_trigger_system_user_id"`
|
||||
}
|
||||
|
||||
// S3Config S3 兼容存储配置
|
||||
type S3Config struct {
|
||||
Endpoint string `mapstructure:"endpoint"` // 服务端点(如:http://obs-helf.cucloud.cn)
|
||||
|
||||
@@ -116,3 +116,8 @@ gateway:
|
||||
app_secret: "BZeQttaZQt0i73moF"
|
||||
timeout: 30
|
||||
|
||||
# 轮询自动触发配置
|
||||
polling_auto_trigger:
|
||||
enable_auto_trigger: true
|
||||
auto_trigger_system_user_id: 1 # 暂用 SuperAdmin,生产环境建议创建专用平台账号并更新此值
|
||||
|
||||
|
||||
Reference in New Issue
Block a user