Commit Graph

5 Commits

Author SHA1 Message Date
lan
e873c58af9 refactor: 重构服务层和仓库层 2025-12-03 10:58:39 +08:00
lan
034e02e93a feat: Enhance dependency injection and service integration
- Updated main.go to initialize email service and include it in the dependency injection container.
- Refactored handlers to utilize context in service method calls, improving consistency and error handling.
- Introduced new service options for upload, security, and captcha services, enhancing modularity and testability.
- Removed unused repository implementations to streamline the codebase.

This commit continues the effort to improve the architecture by ensuring all services are properly injected and utilized across the application.
2025-12-02 22:52:33 +08:00
lan
ffdc3e3e6b feat: 完善依赖注入改造
完成所有Handler的依赖注入改造:
- AuthHandler: 认证相关功能
- UserHandler: 用户管理功能
- TextureHandler: 材质管理功能
- ProfileHandler: 档案管理功能
- CaptchaHandler: 验证码功能
- YggdrasilHandler: Yggdrasil API功能

新增错误类型定义:
- internal/errors/errors.go: 统一的错误类型和工厂函数

更新main.go:
- 使用container.NewContainer创建依赖容器
- 使用handler.RegisterRoutesWithDI注册路由

代码遵循Go最佳实践:
- 依赖通过构造函数注入
- Handler通过结构体方法实现
- 统一的错误处理模式
- 清晰的分层架构
2025-12-02 17:46:00 +08:00
lan
10fdcd916b feat: 添加种子数据初始化功能,重构多个处理程序以简化错误响应和用户验证 2025-12-02 10:33:19 +08:00
lafay
4188ee1555 feat: 添加Yggdrasil密码重置功能,更新依赖和配置 2025-11-30 18:56:56 +08:00