feat: 初始化Webhook中继系统项目
- 添加FastAPI应用基础结构,包括主入口、路由和模型定义
- 实现Webhook接收端点(/webhook/{namespace})和健康检查(/health)
- 添加管理后台路由和模板,支持端点、目标、渠道和模板管理
- 包含SQLite数据库模型定义和初始化逻辑
- 添加日志记录和统计服务
- 包含Dockerfile和配置示例文件
- 添加项目文档,包括设计、流程图和验收标准
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
server:
|
||||
port: 8080
|
||||
log_level: info
|
||||
routing:
|
||||
remark_map:
|
||||
imcgcd03: ["target_3"]
|
||||
imcgcd02: ["target_2"]
|
||||
default_targets: []
|
||||
targets:
|
||||
- name: target_1
|
||||
url: "https://httpbin.org/post"
|
||||
timeout_ms: 5000
|
||||
- name: target_2
|
||||
url: "https://httpbin.org/post"
|
||||
timeout_ms: 5000
|
||||
- name: target_3
|
||||
url: "https://httpbin.org/post"
|
||||
timeout_ms: 5000
|
||||
notifications:
|
||||
event_map:
|
||||
wechat.complaint:
|
||||
template: "⚠️请注意,您有新的微信投诉,请注意查看"
|
||||
channels: ["feishu","wecom"]
|
||||
refund.standard:
|
||||
template: "退款成功,退款金额:{actual_ref_amt}"
|
||||
channels: ["feishu","wecom"]
|
||||
pay.ali_scaned:
|
||||
template: "支付宝收款{trans_amt}元,状态:{cash_resp_desc}"
|
||||
channels: ["feishu","wecom"]
|
||||
pay.wx_scaned:
|
||||
template: "微信收款{trans_amt}元,状态:{cash_resp_desc}"
|
||||
channels: ["feishu","wecom"]
|
||||
channels:
|
||||
feishu:
|
||||
webhooks:
|
||||
- "https://open.feishu.cn/your-bot-webhook"
|
||||
wecom:
|
||||
webhooks:
|
||||
- "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=your-key"
|
||||
retry:
|
||||
max_attempts: 3
|
||||
initial_delay_ms: 500
|
||||
max_delay_ms: 3000
|
||||
security:
|
||||
outbound_signature: false
|
||||
Binary file not shown.
Reference in New Issue
Block a user