What problem does it solve?
This Skill addresses the need to make gRPC services accessible via standard HTTP/REST APIs, simplifying integration with frontends and other services that may not natively support gRPC.
Core Features & Use Cases
- HTTP Binding Generation: Automatically adds HTTP annotations to
.proto files.
- Gateway Server Creation: Generates a
main.go file for a standalone gateway server.
- Cross-Origin Resource Sharing (CORS): Configures CORS for web accessibility.
- Authentication Passthrough: Allows forwarding of authentication headers.
- OpenAPI/Swagger Spec Generation: Creates an OpenAPI specification for documentation and tooling.
- Use Case: You have a Go gRPC microservice for user management, and you need to expose endpoints like
GET /users/{id} and POST /users for a web application to consume. This skill automates the setup of the grpc-gateway to achieve this.
Quick Start
Use the go-grpc-gateway skill to add an HTTP gateway to the attached proto file, forwarding the 'Authorization' header and allowing origins from 'http://localhost:3000'.