From 37c9722b4fff5b6f83934649f134bd0113c7d65e Mon Sep 17 00:00:00 2001 From: huangsimin Date: Wed, 3 Jun 2020 14:07:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BE=9D=E8=B5=96=E8=AF=B4?= =?UTF-8?q?=E6=98=8E.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 +++- readme.md | 22 +++++++++++++++++----- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 8ebe9dc..3a0d1b2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ *.log .rocksdb workshop -*.7z \ No newline at end of file +*.7z +*.pb.go +*.gw.go \ No newline at end of file diff --git a/readme.md b/readme.md index ef0daa1..44285af 100644 --- a/readme.md +++ b/readme.md @@ -1,20 +1,32 @@ -# 编译流程 +# 编译依赖 + +* 自行解决墙的问题. 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 +``` + +## 编译流程 -* sh generate.sh * git submodule init * git submodule update +* sh generate.sh * go build -## 执行流程 +### 执行流程 * ./workshop -### 测试流程 +#### 测试流程 * 端口写死4433, 后期可以改成配置形式. * 执行 curl -X POST -k http://localhost:4433/v1/name/firstname 返回姓氏 格式 {"message":"融"} -#### 其他文档 +##### 其他文档 * 自动化接口测试推行 http://wiki.ym/pages/viewpage.action?pageId=21431287 * API文档及自动化测试推行情况 http://wiki.ym/pages/viewpage.action?pageId=29953694