/protoc-gen-grpc-rest

REST client generator following the gRPC HTTP spec

Primary LanguageGoMIT LicenseMIT

gRPC-REST

REST client generator following the gRPC HTTP spec


Note

Currently only supports unary calls

Installation

make build
PATH="$(pwd):$PATH" protoc -I=examples/proto --go_out=examples --grpc-rest_out=examples examples/proto/*.proto
client := NewUserServiceClient("http://localhost:8080")

# Supports `google.protobuf.Empty`
users, err := client.GetUsers(context.Background())
user, err := client.GetUser(context.Background())
user, err := client.CreateUser(context.Background(), &User{})
err := client.DeleteUser(context.Background())