Skip to content

Latest commit

 

History

History
47 lines (38 loc) · 1.61 KB

File metadata and controls

47 lines (38 loc) · 1.61 KB

go-grpc-poc

This project aims to explore the gRPC world, focused in communication with servers through one API gateway, code generation from .protoc files and code enrichment from protobuf annotations

Dependencies

In order to generate the gRPC, protobuf and gRPC-gateway code with protoc, these projects are necessary:

And can be achieved through golang dependency management tool by running make bootstrap. Then, code can be generated by make protoc-generate.

To generate code with buf (https://github.com/bufbuild/buf) it's only necessary to call make buf-generate, and the tool will manage the deps for you.

Gateway & gRPC server implementations

In progress

tree

.
├── buf.gen.yaml # buf configuration fule
├── buf.lock     # buf configuration fule
├── buf.yaml     # buf configuration fule
├── gen
│   ├── openapi  # generated openapi spec
│   │   └── openapi.swagger.json
│   └── proto    # generated golang code (gw+grpc+protobuf)
│       ├── hello_grpc.pb.go
│       ├── hello.pb.go
│       ├── hello.pb.gw.go
│       ├── user_grpc.pb.go
│       ├── user.pb.go
│       └── user.pb.gw.go
├── go.mod
├── go.sum
├── main.go
├── Makefile
├── pkg           # code implementing gateway and grpc server
│   ├── gateway.go
│   └── server.go
├── proto         # protobuf specs
│   ├── hello.proto
│   └── user.proto
└── README.md