架构变更: - Python/FastAPI → Go/Gin 重写(Python 后端保留在 backend-python/) - GORM + SQLite(兼容现有数据库表结构) - JWT 认证 + RBAC 权限中间件 Go 后端结构: - cmd/server/main.go — 入口,端口 9000 - config/config.go — 环境变量配置 - internal/model/ — GORM 模型(30张表,完全兼容 SQLite) - internal/handler/ — auth/instance/ticket/dashboard/ghost handler - internal/middleware/ — JWT 认证 + CORS - internal/ghost/ — gh-ost 集成模块(同步/异步执行,任务管理) - router/router.go — API 路由注册(/api/v1/...) gh-ost 集成: - RunGhOst() 同步执行 - RunGhOstAsync() 异步执行 + 进度追踪 - TaskManager 管理多个并发任务 - API: POST /ghost/dry-run, /ghost/execute, GET /ghost/status/:taskId 核心 API 已对齐: - POST /auth/login (JWT) - GET /dashboard/stats, /dashboard/my-tickets - GET /tickets/statistics, CRUD + approve/execute - GET/POST/PUT/DELETE /instances - GET /users, /audit-rules, /announcements, /settings 已验证: - 登录 admin/admin123 ✅ - Dashboard 99工单/110查询/4实例 ✅ - 工单统计按角色过滤 ✅
33 lines
348 B
Plaintext
33 lines
348 B
Plaintext
# Backend Python
|
|
__pycache__/
|
|
*.pyc
|
|
venv/
|
|
*.db
|
|
.env
|
|
*.sqlite3
|
|
*.db-journal
|
|
.pytest_cache/
|
|
apscheduler.db
|
|
|
|
# Backend Python (preserved but not tracked)
|
|
backend-python/
|
|
|
|
# Backend Go
|
|
backend/sql-platform
|
|
backend/go.sum
|
|
|
|
# Frontend
|
|
node_modules/
|
|
dist/
|
|
|
|
# OS
|
|
.DS_Store
|
|
Thumbs.db
|
|
|
|
# Runtime
|
|
.pids/
|
|
logs/
|
|
|
|
# Docs (large/generated)
|
|
OPTIMIZATION_GUIDE*.md
|