Files
lijiaoqiao/supply-api/config/sms.example.yaml
Your Name 5ea6750cf3 test(supply-api): validate shipped config samples
Add regression tests for the shipped development and SMS sample configs, and fix the SMS example to match the runtime flat Config schema instead of nested provider blocks. Verified with fresh go test runs for ./internal/config and ./internal/sms before commit.
2026-04-11 11:31:05 +08:00

48 lines
1.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# SMS Service Configuration
# 短信服务配置
sms:
# 是否启用SMS服务默认 false 时运行时会拒绝验证码校验
enabled: false
# SMS服务提供商: tencent (腾讯云) 或 aliyun (阿里云)
provider: tencent
# 运行时读取扁平字段,而不是按 provider 分组的嵌套字段
app_id: "1400123456" # 腾讯云: SDK AppID阿里云: AccessKey ID
app_secret: "your_app_key" # 腾讯云: AppKey阿里云: AccessKey Secret
sign_name: "供应链平台" # 短信签名
template_code: "SMS_123456789" # 短信模板 CODE
region: "ap-guangzhou" # 腾讯云区域;阿里云可忽略
endpoint: "" # 自定义 endpoint可选
# 通用配置
code_length: 6 # 验证码长度默认6位
code_expire_mins: 5 # 验证码有效期(分钟)默认5分钟
# 示例启用腾讯云SMS
# sms:
# enabled: true
# provider: tencent
# app_id: "1400123456"
# app_secret: "a1b2c3d4e5f6g7h8i9j0"
# sign_name: "供应链平台"
# template_code: "SMS_123456789"
# region: "ap-guangzhou"
# code_length: 6
# code_expire_mins: 5
# 示例启用阿里云SMS
# sms:
# enabled: true
# provider: aliyun
# app_id: "LTAI5tXXXXXXXXXXXX"
# app_secret: |
# -----BEGIN PRIVATE KEY-----
# MIIEvQIBADANBgkqhkiG9w0BAQEFAASC...
# -----END PRIVATE KEY-----
# sign_name: "供应链平台"
# template_code: "SMS_123456789"
# code_length: 6
# code_expire_mins: 5