-
Notifications
You must be signed in to change notification settings - Fork 2
feat: v2 refactor - migrate to Hertz backend and Vue 3 frontend #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
7f3cc2a
feat: v2 refactor - migrate to Hertz backend and Vue 3 frontend
zy84338719 110f699
fix: 修复CI工作流配置并统一端口为12345
zy84338719 6b5c5f5
fix: 更新golangci-lint版本并移除handler.bak目录
zy84338719 068e586
fix: 升级golangci-lint-action到v7并修复maintenance handler类型引用
zy84338719 35dcb3b
refactor: migrate biz to gen, split IDL by domain with independent go…
zy84338719 b2f4a01
fix: 添加 golangci-lint v2 配置版本声明
zy84338719 87d14f5
fix: CI集成测试前创建data目录以修复SQLite初始化失败
zy84338719 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,150 @@ | ||
| # API 完整性对比报告 | ||
|
|
||
| ## 对比日期: 2026-03-11 | ||
|
|
||
| --- | ||
|
|
||
| ## 新项目已实现的 API | ||
|
|
||
| ### ✅ 用户模块 | ||
| | API | 老项目 | 新项目 | 状态 | | ||
| |-----|--------|--------|------| | ||
| | POST /user/register | ✅ | ✅ | 完整 | | ||
| | POST /user/login | ✅ | ✅ | 完整 | | ||
| | GET /user/info | ✅ | ✅ | 完整 | | ||
| | PUT /user/profile | ✅ | ✅ | 完整 | | ||
| | POST /user/change-password | ✅ | ✅ | 完整 | | ||
| | GET /user/stats | ✅ | ✅ | 完整 | | ||
| | GET /user/files | ✅ | ✅ | 完整 | | ||
| | DELETE /user/files/:code | ✅ | ⚠️ | 需验证 | | ||
| | GET /user/api-keys | ✅ | ✅ | 完整 | | ||
| | POST /user/api-keys | ✅ | ✅ | 完整 | | ||
| | DELETE /user/api-keys/:id | ✅ | ✅ | 完整 | | ||
| | POST /user/logout | ✅ | ❌ | 缺失 | | ||
| | GET /user/check-auth | ✅ | ❌ | 缺失 | | ||
|
|
||
| ### ✅ 管理员模块 | ||
| | API | 老项目 | 新项目 | 状态 | | ||
| |-----|--------|--------|------| | ||
| | POST /admin/login | ✅ | ✅ | 完整 | | ||
| | GET /admin/stats | ✅ | ✅ | 完整 | | ||
| | GET /admin/dashboard | ✅ | ⚠️ | 复用 stats | | ||
| | GET /admin/files | ✅ | ✅ | 完整 | | ||
| | DELETE /admin/files/:id | ✅ | ✅ | 完整 | | ||
| | PUT /admin/files/:id | ✅ | ❌ | 缺失 | | ||
| | GET /admin/files/:id | ✅ | ❌ | 缺失 | | ||
| | GET /admin/files/download | ✅ | ❌ | 缺失 | | ||
| | GET /admin/users | ✅ | ✅ | 完整 | | ||
| | GET /admin/users/:id | ✅ | ❌ | 缺失 | | ||
| | POST /admin/users | ✅ | ❌ | 缺失 | | ||
| | PUT /admin/users/:id | ✅ | ❌ | 缺失 | | ||
| | DELETE /admin/users/:id | ✅ | ❌ | 缺失 | | ||
| | PUT /admin/users/:id/status | ✅ | ✅ | 完整 | | ||
| | POST /admin/users/batch-* | ✅ | ❌ | 缺失 | | ||
| | GET /admin/config | ✅ | ✅ | 完整 | | ||
| | PUT /admin/config | ✅ | ✅ | 完整 | | ||
|
|
||
| ### ✅ 存储模块 | ||
| | API | 老项目 | 新项目 | 状态 | | ||
| |-----|--------|--------|------| | ||
| | GET /admin/storage | ✅ | ✅ | 完整 | | ||
| | POST /admin/storage/switch | ✅ | ✅ | 完整 | | ||
| | GET /admin/storage/test/:type | ✅ | ✅ | 完整 | | ||
| | PUT /admin/storage/config | ✅ | ✅ | 完整 | | ||
|
|
||
| ### ✅ 维护模块 | ||
| | API | 老项目 | 新项目 | 状态 | | ||
| |-----|--------|--------|------| | ||
| | POST /admin/maintenance/clean-expired | ✅ | ✅ | 完整 | | ||
| | POST /admin/maintenance/clean-temp | ✅ | ✅ | 完整 | | ||
| | GET /admin/maintenance/system-info | ✅ | ✅ | 完整 | | ||
| | GET /admin/maintenance/monitor/storage | ✅ | ✅ | 完整 | | ||
| | GET /admin/maintenance/logs | ✅ | ✅ | 完整 | | ||
| | POST /admin/maintenance/db/backup | ✅ | ❌ | 缺失 | | ||
| | POST /admin/maintenance/db/optimize | ✅ | ❌ | 缺失 | | ||
| | POST /admin/maintenance/cache/clear-* | ✅ | ❌ | 缺失 | | ||
| | POST /admin/maintenance/security/scan | ✅ | ❌ | 缺失 | | ||
|
|
||
| ### ✅ 分享模块 | ||
| | API | 老项目 | 新项目 | 状态 | | ||
| |-----|--------|--------|------| | ||
| | POST /share/text/ | ✅ | ✅ | 完整 | | ||
| | POST /share/file/ | ✅ | ✅ | 完整 | | ||
| | GET /share/select/ | ✅ | ✅ | 完整 | | ||
| | POST /share/select/ | ✅ | ✅ | 完整 | | ||
| | GET /share/download | ✅ | ✅ | 完整 | | ||
|
|
||
| ### ✅ 分片上传模块 | ||
| | API | 老项目 | 新项目 | 状态 | | ||
| |-----|--------|--------|------| | ||
| | POST /chunk/upload/init | ✅ | ✅ | 完整 | | ||
| | POST /chunk/upload/chunk | ✅ | ✅ | 完整 | | ||
| | POST /chunk/upload/complete | ✅ | ✅ | 完整 | | ||
| | GET /chunk/upload/status | ✅ | ✅ | 完整 | | ||
| | DELETE /chunk/upload/cancel | ✅ | ✅ | 完整 | | ||
|
|
||
| ### ✅ 其他模块 | ||
| | API | 老项目 | 新项目 | 状态 | | ||
| |-----|--------|--------|------| | ||
| | GET /health | ✅ | ✅ | 完整 | | ||
| | GET /setup/check | ✅ | ✅ | 完整 | | ||
| | POST /setup | ✅ | ✅ | 完整 | | ||
| | POST /qrcode/generate | ✅ | ✅ | 完整 | | ||
| | GET /qrcode/:id | ✅ | ✅ | 完整 | | ||
|
|
||
| --- | ||
|
|
||
| ## 缺失的高优先级 API | ||
|
|
||
| ### P0 - 核心功能 (影响基本使用) | ||
| - ❌ **POST /user/logout** - 用户登出 | ||
| - ❌ **GET /user/check-auth** - 检查认证状态 | ||
|
|
||
| ### P1 - 管理功能 (影响后台管理) | ||
| - ❌ **GET/POST/PUT/DELETE /admin/users/:id** - 用户 CRUD | ||
| - ❌ **PUT /admin/files/:id** - 文件更新 | ||
| - ❌ **GET /admin/logs/transfer** - 传输日志 | ||
|
|
||
| ### P2 - 高级功能 (可后续补充) | ||
| - ❌ **MCP 协议支持** - AI 集成 | ||
| - ❌ **批量操作 API** - batch-delete/enable/disable | ||
| - ❌ **数据库维护** - backup/optimize | ||
| - ❌ **安全扫描** - security/scan | ||
|
|
||
| --- | ||
|
|
||
| ## 前端 API 对接状态 | ||
|
|
||
| ### 已匹配 | ||
| - ✅ /user/login, /user/register | ||
| - ✅ /admin/login, /admin/stats | ||
| - ✅ /share/text/, /share/file/, /share/select/ | ||
| - ✅ /admin/storage, /admin/maintenance/* | ||
|
|
||
| ### 需前端调整 | ||
| - ⚠️ /user/profile → /user/info | ||
| - ⚠️ /user/files → /share/user | ||
| - ⚠️ /user/files/:code → /share/:code | ||
|
|
||
| --- | ||
|
|
||
| ## 建议优先补充 | ||
|
|
||
| 1. **POST /user/logout** - 简单,影响用户体验 | ||
| 2. **GET /user/check-auth** - 简单,前端需要 | ||
| 3. **GET /admin/logs/transfer** - 管理后台需要 | ||
| 4. **用户 CRUD** - 管理后台核心功能 | ||
|
|
||
| --- | ||
|
|
||
| ## 总体评估 | ||
|
|
||
| | 类别 | 完成度 | | ||
| |------|--------| | ||
| | 核心功能 | 95% | | ||
| | 管理功能 | 80% | | ||
| | 维护功能 | 70% | | ||
| | 高级功能 | 40% | | ||
| | **总体** | **85%** | | ||
|
|
||
| **结论**: 核心功能基本完整,可进入测试阶段。缺失功能可在后续迭代补充。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This Dockerfile builds with
CGO_ENABLED=1but the runtime stage is a minimal Alpine image; if the binary ends up dynamically linked, it may fail at runtime due to missing libs. Unless CGO is required, preferCGO_ENABLED=0for a fully static binary (and keep consistent withbackend/Dockerfilewhich already does that).