2020-06-03 06:07:42 +00:00
|
|
|
# 编译依赖
|
|
|
|
|
|
|
|
* 自行解决墙的问题. golang 入门.
|
|
|
|
* 安装 protobuf-c-compiler(protobuf-compiler-grpc) // 解决 protoc --go_out=plugins=grpc等问题
|
|
|
|
|
|
|
|
``` bash
|
|
|
|
go get -u github.com/golang/protobuf/proto // golang protobuf 库
|
|
|
|
go get -u github.com/golang/protobuf/protoc-gen-go //protoc --go_out 工具
|
|
|
|
go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
|
|
|
|
go get google.golang.org/grpc
|
|
|
|
```
|
|
|
|
|
|
|
|
## 编译流程
|
2020-06-02 07:26:53 +00:00
|
|
|
|
|
|
|
* git submodule init
|
|
|
|
* git submodule update
|
2020-06-03 06:07:42 +00:00
|
|
|
* sh generate.sh
|
2020-06-02 07:26:53 +00:00
|
|
|
* go build
|
|
|
|
|
2020-06-03 06:07:42 +00:00
|
|
|
### 执行流程
|
2020-06-02 07:26:53 +00:00
|
|
|
|
|
|
|
* ./workshop
|
2020-06-03 03:44:15 +00:00
|
|
|
|
2020-06-03 06:07:42 +00:00
|
|
|
#### 测试流程
|
2020-06-03 03:44:15 +00:00
|
|
|
|
|
|
|
* 端口写死4433, 后期可以改成配置形式.
|
|
|
|
* 执行 curl -X POST -k http://localhost:4433/v1/name/firstname 返回姓氏 格式 {"message":"融"}
|
|
|
|
|
2020-06-03 06:07:42 +00:00
|
|
|
##### 其他文档
|
2020-06-03 03:44:15 +00:00
|
|
|
|
|
|
|
* 自动化接口测试推行 http://wiki.ym/pages/viewpage.action?pageId=21431287
|
|
|
|
* API文档及自动化测试推行情况 http://wiki.ym/pages/viewpage.action?pageId=29953694
|
|
|
|
* 数据工坊接口文档(部分) http://wiki.ym/pages/viewpage.action?pageId=49283192
|