yggdrasil/src/api/mod.rs

27 lines
720 B
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 comments;
/// 应用错误类型与转换。
pub mod error;
/// 图片服务的 Axum 处理器。
pub mod image;
/// Markdown 渲染与 HTML 清理。
pub mod markdown;
/// 文章 CRUD 相关接口。
pub mod posts;
/// 限流工具。
pub mod rate_limit;
/// HTML 消毒器。
pub mod sanitizer;
/// URL slug 生成与校验。
pub mod slug;
/// 图片上传的 Axum 处理器。
pub mod upload;