golang-yitisheng-server/project_index.md

31 lines
1.1 KiB
Markdown

# 项目文件索引
## server/
- `main.go`: 应用程序入口,负责路由注册和服务器启动。
- `config/`: 配置文件目录。
- `config.go`: 应用全局配置。
- `database.go`: 数据库连接配置。
- `redis.go`: Redis连接配置。
- `common/`: 通用工具包。
- `response.go`: 统一HTTP响应结构。
- `context.go`: 上下文辅助函数。
- `logger.go`: 日志工具。
- `password.go`: 密码加密工具。
- `middleware/`: HTTP中间件。
- `auth.go`: JWT认证中间件。
- `security.go`: 安全相关的中间件。
- `ratelimit.go`: 限流中间件。
- `cors.go`: CORS跨域中间件。
- `modules/`: 业务模块目录。
- `system/`: 系统管理模块(用户、权限等)。
- `yx/`: 艺考相关业务模块。
- `dto/`: 数据传输对象,用于接口请求/响应定义。
- `entity/`: 实体定义。
- `mapper/`: 数据访问层实现。
- `service/`: 业务逻辑层实现。
- `controller/`: 控制层实现。
- `user/`: 用户相关业务扩展。
- `vo/`: 视图对象,用于数据展示。
- `service/`: 业务逻辑层。
- `docs/`: Swagger API文档。