Phase 1:CLI架构重构 - main.rs: 509行 → 21行(简化96%) - 新增cli模块:框架命令与应用命令分离 - cli/framework.rs (394行): Display/Render/Config/Scan/Hash/WebDAV/iSCSI - cli/apps/download_center.rs (59行): ImportMarkdown/SshServer/Sftp - 编译成功,CLI命令正确识别(11个命令) Phase 2:API模块结构创建 - 新增api模块目录结构:api/handlers/ - 为未来handler模块预留空间: - tree.rs: FileTree CRUD - file.rs: 文件流/渲染 - upload.rs: 上传处理 - auth.rs: 认证 - config.rs: 配置管理 - system.rs: 系统健康检查 - view.rs: 分类/系列视图 - static.rs: 静态页面 - server.rs保持稳定(2409行),降低重构风险 架构优势: - 清晰的框架/应用分离 - 降低耦合度,便于后续维护 - 为新功能提供清晰的模块空间 - 保持现有功能稳定运行
30 lines
850 B
Rust
30 lines
850 B
Rust
pub mod audio;
|
||
pub mod auth;
|
||
pub mod audit;
|
||
pub mod cli;
|
||
pub mod api;
|
||
pub mod command;
|
||
pub mod config;
|
||
pub mod download;
|
||
pub mod pg_client;
|
||
pub mod render;
|
||
pub mod rsync;
|
||
pub mod s3;
|
||
pub mod s3_auth;
|
||
pub mod s3_config;
|
||
pub mod s3_xml;
|
||
pub mod scan;
|
||
pub mod server;
|
||
pub mod archive; // Archive Module - Universal Compression Format Support (Phase 1-3完成)
|
||
pub mod category_view;
|
||
pub mod import_markdown; // Category View Module - 双视图管理(Phase 1)
|
||
// pub mod sftp; // ⚠️ russh版本(已禁用)
|
||
// pub mod ssh2_server; // ssh2服务器(已禁用)
|
||
// pub mod ssh2_mod; // ssh2辅助模块(已禁用)
|
||
pub mod ssh_server; // SSH服务器(Phase 1-9完成,正在修复编译错误)⭐⭐⭐⭐⭐
|
||
pub mod sync;
|
||
|
||
// Re-export from external filetree crate
|
||
pub use filetree::node::FileNode;
|
||
pub use filetree::FileTree;
|