yggdrasil/src/api/mod.rs
xfy 65a7b1226f style: 全项目格式规范化(cargo fmt)+ Docker daemon 断连容错
- 全项目 .rs 统一 cargo fmt 排版(换行/缩进/参数分行/导入排序)
- infra/docker: DOCKER_CLIENT 连接失败不 panic,降级返回 None
  (博客不依赖 Docker,panic=abort 下会导致整个进程崩溃)
- infra/mod: 去除多余空行
- database/mod: 模块声明按字母序重新排序
2026-07-15 17:22:06 +08:00

37 lines
1.0 KiB
Rust
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.

//! API 层根模块。
//!
//! 按职责划分子模块,包含两类接口:
//! - Dioxus server function`#[server(Name, "/api")]`),如 `auth`、`posts`
//! - Axum 手动路由处理器,如 `upload`、`image`。
/// 认证相关的 Dioxus server function。
pub mod auth;
/// 代码运行接口与数据结构。
pub mod code_runner;
/// 评论相关接口。
pub mod comments;
/// CSRF 防护中间件。
pub mod csrf;
/// 数据库管理接口(运行状态 / SQL 控制台 / 导出 / 备份恢复)。
pub mod database;
/// 应用错误类型与转换。
pub mod error;
/// 健康检查端点liveness / readiness
pub mod health;
/// 图片服务的 Axum 处理器。
pub mod image;
/// Markdown 渲染与 HTML 清理。
pub mod markdown;
/// 文章 CRUD 相关接口。
pub mod posts;
/// 限流工具。
pub mod rate_limit;
/// HTML 消毒器。
pub mod sanitizer;
/// 回收站与站点配置接口。
pub mod settings;
/// URL slug 生成与校验。
pub mod slug;
/// 图片上传的 Axum 处理器。
pub mod upload;