proto/README.md

42 lines
827 B
Markdown
Raw Normal View History

2023-11-27 09:36:02 +00:00
# 公共服务调用的协议
#### 介绍
公共协议, 每个服务需要git submodule 拉 xxx/proto 目录下. 然后使用序列.
2023-12-04 04:26:57 +00:00
```
安装protoc protoc-25.0-linux-x86_64.zip
```
2023-11-27 09:36:02 +00:00
```bash
2023-12-04 06:19:43 +00:00
# 去掉SUMDB的验证
go env -w GOSUMDB="off"
git submodule add git@gitlab.fusenpack.com:backend/proto.git
2023-11-27 09:36:02 +00:00
```
然后执行
```bash
2023-12-04 08:00:09 +00:00
go install \
github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway \
github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 \
google.golang.org/protobuf/cmd/protoc-gen-go \
google.golang.org/grpc/cmd/protoc-gen-go-grpc
2023-11-27 09:36:02 +00:00
go run proto/goutils/proto_build/main.go
或者
在proto/goutils/proto_build/main_test.go执行测试 TestMain
2023-11-30 03:05:42 +00:00
./update_fspkg_master.sh # 执行更新最新的包
2023-11-27 09:36:02 +00:00
```
2023-12-04 04:26:57 +00:00
2023-11-27 09:36:02 +00:00
#### 软件架构
软件架构说明