本次提交新增了完整的多渠道消息网关系统,包括: 1. 支持飞书、钉钉、Web、Hook 四种渠道的适配器与配置 2. 领域模型层:消息、会话、绑定、出箱等核心实体 3. 应用服务层:管道、中间件、DTO 与业务逻辑 4. 基础设施层:持久化、过滤器、队列等端口实现 5. 接口层:REST API、SSE、WebSocket 通信端点 6. 前端页面与路由配置,添加渠道管理菜单 7. 新增相关依赖包与 docker-compose 部署配置
30 lines
1.5 KiB
Python
30 lines
1.5 KiB
Python
from __future__ import annotations
|
|
|
|
import logging
|
|
|
|
from fastapi import APIRouter
|
|
|
|
from yuxi.channel.channels.feishu.routes import router as feishu_event_router
|
|
from yuxi.channel.channels.web.routes import router as web_message_router
|
|
from yuxi.channel.channels.hooks.routes import router as hooks_message_router
|
|
from yuxi.channel.interfaces.rest.router.bindings import router as bindings_router
|
|
from yuxi.channel.interfaces.rest.router.channel_status import router as channel_status_router
|
|
from yuxi.channel.interfaces.rest.router.config_reload import router as config_reload_router
|
|
from yuxi.channel.interfaces.rest.router.health import router as health_router
|
|
from yuxi.channel.interfaces.rest.router.metrics import router as metrics_router
|
|
from yuxi.channel.interfaces.rest.router.sse import router as sse_router
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
channel = APIRouter()
|
|
|
|
channel.include_router(health_router, tags=["channel-health"])
|
|
channel.include_router(metrics_router, tags=["channel-metrics"])
|
|
channel.include_router(channel_status_router, tags=["channel-status"])
|
|
channel.include_router(bindings_router, tags=["channel-bindings"])
|
|
channel.include_router(sse_router, tags=["channel-sse"])
|
|
channel.include_router(config_reload_router, tags=["channel-config"])
|
|
channel.include_router(feishu_event_router, tags=["channel-feishu-event"])
|
|
channel.include_router(web_message_router, tags=["channel-web-message"])
|
|
channel.include_router(hooks_message_router, tags=["channel-hooks-message"])
|