testfb/.history/README_20240925162207.md
2024-09-25 16:22:07 +08:00

31 lines
907 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# TestFB
> 使用Go语言实现用户登录、获取用户信息、修改用户信息。
## 工程要求:结构化工程,更加规范的代码编写。
## 工程使用的模块或技术:
1. Go语言
2. fiber框架
3. Gorm ORM框架
4. fiber下的storage/redis v3模块
5. JWT身份验证存储在redis中
6. mysql使用fiber下的storage/mysql v2模块
7. 日志使用fiber自带的日志模块
## mysql模块
1. 数据库地址localhost:3306
2. 数据库名称testfb
3. 表名称users
4. 字段id, username, password, email, phone, created_at, updated_at
5. 密码字段需加密。
## redis模块
1. 存储用户的token信息
2. redis地址localhost:6379
## 路由信息
1. 登录POST /login
2. 获取当前用户信息: GET /user
3. 修改当前用户信息: PUT /user
4. 获取某个用户信息: GET /users/:id
## 其他
1. 日志保存在当前main.go目录下