- 在 model/user.go 中添加 Querier 接口,定义了 GetByEmail 方法- 在 query/users.gen.go 中实现 Querier 接口的 GetByEmail 方法 - 修改 gen.go以使用新的 Querier 接口和 User 模型生成代码 - 将 users.gen.go 中的 ID 类型从 Int64 改为 Uint
*** Project
introduce
- Use the Kitex framework
- Generating the base code for unit tests.
- Provides basic config functions
- Provides the most basic MVC code hierarchy.
Directory structure
| catalog | introduce |
|---|---|
| conf | Configuration files |
| main.go | Startup file |
| handler.go | Used for request processing return of response. |
| kitex_gen | kitex generated code |
| biz/service | The actual business logic. |
| biz/dal | Logic for operating the storage layer |
How to run
sh build.sh
sh output/bootstrap.sh