Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vender: add vender and explicit set protoc-gen-grpc-gateway version #18

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ Blog post: https://coreos.com/blog/gRPC-protobufs-swagger.html
To try it all out do this:

```
$ go get -u github.com/philips/grpc-gateway-example
$ git clone https://github.com/philips/grpc-gateway-example.git
$ glide install
$ go install ./vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
$ go install ./vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger
$ go build
$ grpc-gateway-example serve
$ grpc-gateway-example echo "my first rpc echo"
$ curl -X POST -k https://localhost:10000/v1/echo -H "Content-Type: text/plain" -d '{"value": "foo"}'
Expand Down
6 changes: 3 additions & 3 deletions echopb/Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
all:
protoc -I/usr/local/include -I. \
-I${GOPATH}/src \
-I${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
-I../vendor/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
--go_out=plugins=grpc:. \
service.proto
protoc -I/usr/local/include -I. \
-I${GOPATH}/src \
-I${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
-I../vendor/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
--grpc-gateway_out=logtostderr=true:. \
service.proto
protoc -I/usr/local/include -I. \
-I${GOPATH}/src \
-I${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
-I../vendor/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
--swagger_out=logtostderr=true:. \
service.proto
go generate .
13 changes: 5 additions & 8 deletions echopb/service.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

99 changes: 99 additions & 0 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions glide.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package: github.com/philips/grpc-gateway-example
import:
- package: github.com/golang/protobuf
subpackages:
- proto
- package: github.com/grpc-ecosystem/grpc-gateway
subpackages:
- runtime
- utilities
- package: github.com/philips/go-bindata-assetfs
- package: github.com/spf13/cobra
- package: github.com/spf13/viper
- package: golang.org/x/net
subpackages:
- context
- package: google.golang.org/genproto
subpackages:
- googleapis/api/annotations
- package: google.golang.org/grpc
subpackages:
- codes
- credentials
- grpclog
- status