Skip to content

Commit

Permalink
feat: add retrieving student counts
Browse files Browse the repository at this point in the history
- Added a new RPC in the proto file to fetch the number of students per major based on specified conditions.
- Updated the README to explain how to start a dev.
  • Loading branch information
yuuki798 committed Oct 19, 2024
1 parent 603abb8 commit b807761
Show file tree
Hide file tree
Showing 6 changed files with 940 additions and 279 deletions.
28 changes: 22 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@
![Goproxy.cn](https://goproxy.cn/stats/github.com/hduhelp/api_open_sdk/badges/download-count.svg)
![buf lint](https://github.com/hduhelp/api_open_sdk/actions/workflows/buf.yml/badge.svg)

### 配置网络

https://goproxy.cn/



## 前置步骤

#### linux
### linux

```shell
//安装 编译所需的插件
Expand All @@ -14,20 +20,30 @@
make install-tools
```

#### windows
### windows

如果使用goland,建议安装插件:buf、Protocol Buffers Support,以消除proto无法识别到的报警。

以下操作,开发前或开发后执行皆可

```
go get github.com/bufbuild/buf/cmd/buf@latest
go get github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@latest
go get github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@latest
go get google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
go get google.golang.org/protobuf/cmd/protoc-gen-go@latest
```

然后刷新一下。

```
go mod tidy
buf generate
```



### 配置网络

https://goproxy.cn/

## 依赖

Expand All @@ -40,6 +56,8 @@ https://goproxy.cn/
2. 运行 `buf generate`
3. 开启 swagger-ui 实时预览



## 预览 swagger 效果 (多数情况下没必要预览) (感觉还有更简单的)

### 公开文档
Expand Down Expand Up @@ -71,8 +89,6 @@ http://localhost:8080/campusapis/staff/v1/freshman.swagger.json

4. 每次改动 proto 后需要重新运行 `buf generate`,并且「清空缓存并进行硬刷新」网页

## Code Lint



## 接口注释
Expand Down
Loading

0 comments on commit b807761

Please sign in to comment.