134130 / protoc-gen-grpc-rest

REST client generator following the gRPC HTTP spec

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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())

About

REST client generator following the gRPC HTTP spec

License:MIT License


Languages

Language:Go 98.5%Language:Makefile 1.5%