How iamrajiv/helloworld-grpc-gateway works
Project type and purpose
• This is a Go‑based microservice/demo that exposes a simple “Hello World” gRPC API and an HTTP/JSON REST façade via grpc‑gateway.
• Its primary goal is to illustrate how grpc‑gateway can translate HTTP/JSON calls into gRPC calls, generate OpenAPI/Swagger specs, and serve both protocols from one Go server.
File structure
• Top‑level files:
• main.go: starts the HTTP/gRPC server and grpc‑gateway mux
• Makefile: orchestrates dependency installation, proto code generation, and cleanup
• go.mod/go.sum: Go dependency management
• buf.yaml / buf.gen.yaml: configuration for buf (protobuf linting/generation)
• proto/: all Protobuf definitions and generated artifacts
• proto/google/api: common annotations (http mappings)
• proto/helloworld: service definition (hello_world.proto) and generated stubs (pb.go, pb.gw.go, pb_grpc.pb.go) plus swagger.json
README for additional insights
• Lists usage: make install, make generate, go run main.go
• Shows the REST endpoint (/v1/example/echo on port 8090)
• References Swagger UI for testing