Skip to content

Commit

Permalink
🐞 fix:readme
Browse files Browse the repository at this point in the history
  • Loading branch information
linyyyang committed Sep 8, 2021
1 parent 2e1d1cf commit f0b92a5
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,34 @@ $ ginny new hellodemo --grpc
$ ginny new hellodemo -m github.com/xxx/hellodemo
```

### 创建handler

http服务项目,可以通过命令行工具创建handler:

```sh
$ ginny handle user

```
创建的handler文件在项目 internal/handlers目录


### 创建业务层service

```sh
$ ginny service user

```
创建的service文件在项目 internal/services目录

### 创建数据层repository

```sh
// support mysql、mongo、redis
$ ginny repo user -d mysql

```
创建的repository文件在项目 internal/repository目录

### 定义proto协议

```sh
Expand All @@ -143,3 +171,6 @@ hello.proto文件自动保存在项目api/proto目录。
```sh
make proto
```

创建grpc服务项目,会自动创建proto文件,无需单独创建

0 comments on commit f0b92a5

Please sign in to comment.