How to import gRPC empty and Google api annotations proto

Arjun Yelamanchili picture Arjun Yelamanchili · Apr 10, 2017 · Viewed 17.1k times · Source

I am trying to use Google Cloud Endpoints to make a gRPC based api that can transcode incoming REST requests. I am following their example code but I can not any documentation on how to properly import and compile with the annotation.proto or the empty.proto.

Thank you!

Answer

Arjun Yelamanchili picture Arjun Yelamanchili · Apr 10, 2017

I didn't understand that this was part of grpc-gateway. By following the docs I ran

protoc -I/usr/local/include -I. -I$GOPATH/src -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis --go_out=plugins=grpc:. *.proto

and compiled successfully.