From 4d177a782ec575569dc1979ad8f968620f00ed3e Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Wed, 15 Apr 2020 13:22:32 +0300 Subject: [PATCH] vendor proto files from google (#1536) Signed-off-by: Vasiliy Tolstov --- .github/generate.sh | 10 ++++++++-- server/grpc/proto/test.pb.micro.go | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/generate.sh b/.github/generate.sh index 672ce4ff..97a81de2 100755 --- a/.github/generate.sh +++ b/.github/generate.sh @@ -1,9 +1,15 @@ #!/bin/bash -e find . -type f -name '*.pb.*.go' -o -name '*.pb.go' -a ! -name 'message.pb.go' -delete -PROTOS=$(find . -type f -name '*.proto') +PROTOS=$(find . -type f -name '*.proto' | grep -v proto/google/api) + +mkdir -p proto/google/api +curl -s -o proto/google/api/annotations.proto -L https://raw.githubusercontent.com/googleapis/googleapis/master/google/api/annotations.proto +curl -s -o proto/google/api/http.proto -L https://raw.githubusercontent.com/googleapis/googleapis/master/google/api/http.proto for PROTO in $PROTOS; do echo $PROTO - protoc -I${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis -I./ -I$(dirname $PROTO) --go_out=plugins=grpc,paths=source_relative:. --micro_out=paths=source_relative:. $PROTO + protoc -I./proto -I. -I$(dirname $PROTO) --go_out=plugins=grpc,paths=source_relative:. --micro_out=paths=source_relative:. $PROTO done + +rm -r proto diff --git a/server/grpc/proto/test.pb.micro.go b/server/grpc/proto/test.pb.micro.go index 46c76443..0139530b 100644 --- a/server/grpc/proto/test.pb.micro.go +++ b/server/grpc/proto/test.pb.micro.go @@ -42,6 +42,7 @@ func NewTestEndpoints() []*api.Endpoint { Name: "Test.Call", Path: []string{"/api/v0/test/call/{uuid}"}, Method: []string{"POST"}, + Body: "*", Handler: "rpc", }, } @@ -93,6 +94,7 @@ func RegisterTestHandler(s server.Server, hdlr TestHandler, opts ...server.Handl Name: "Test.Call", Path: []string{"/api/v0/test/call/{uuid}"}, Method: []string{"POST"}, + Body: "*", Handler: "rpc", })) return s.Handle(s.NewHandler(&Test{h}, opts...))