feat: 网关只读资产改为数据表,只读资产只允许查询类调用
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 9m36s
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 9m36s
- 新增 tb_gateway_readonly_card(卡 ICCID / 设备 IMEI)与开关 JUNHONG_GATEWAY_READONLY_ENABLED, 替换环境变量名单 JUNHONG_GATEWAY_READONLY_ICCIDS - 只读资产只放行查卡状态、查实名、查流量、查设备信息、查设备槽位、同步设备状态; 停机、复机、限速、实名认证链接与设备写操作在网关出口本地拦截;查表失败按拦截;不缓存 - 测试环境部署开启只读模式;新增技术方案与清理顺序文档 Change: add-gateway-readonly-prod-import Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -163,9 +163,9 @@ type GatewayConfig struct {
|
||||
AppID string `mapstructure:"app_id"` // 应用 ID
|
||||
AppSecret string `mapstructure:"app_secret"` // 应用密钥
|
||||
Timeout int `mapstructure:"timeout"` // 超时时间(秒)
|
||||
// ReadonlyICCIDs 只读卡名单(逗号分隔 ICCID):名单内的卡只放行查流量、卡状态、实名查询,写操作在本地拦截。
|
||||
// 只在测试环境导入生产卡做流量采集验证时配置,生产不配置。环境变量:JUNHONG_GATEWAY_READONLY_ICCIDS
|
||||
ReadonlyICCIDs string `mapstructure:"readonly_iccids"`
|
||||
// ReadonlyEnabled 只读模式:开启后网关只读资产表 tb_gateway_readonly_card 中的卡与设备只允许查询类调用,
|
||||
// 其余调用在本地拦截。只在测试环境导入生产数据验证时开启,生产不配置。环境变量:JUNHONG_GATEWAY_READONLY_ENABLED
|
||||
ReadonlyEnabled bool `mapstructure:"readonly_enabled"`
|
||||
}
|
||||
|
||||
// WorkerConfig Worker 进程运行配置
|
||||
|
||||
@@ -130,7 +130,7 @@ func bindEnvVariables(v *viper.Viper) {
|
||||
"gateway.app_id",
|
||||
"gateway.app_secret",
|
||||
"gateway.timeout",
|
||||
"gateway.readonly_iccids",
|
||||
"gateway.readonly_enabled",
|
||||
"polling.verbose_log",
|
||||
"polling.carrier.nsqd_address",
|
||||
"polling.carrier.nsqlookupd_addresses",
|
||||
|
||||
Reference in New Issue
Block a user