Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/danielvladco/jrpc

Go json-rpc protobuf plugin
https://github.com/danielvladco/jrpc

go golang grpc grpc-go json json-rpc protobuf protobuf-plugin rpc rpc-framework rpc-server

Last synced: 3 months ago
JSON representation

Go json-rpc protobuf plugin

Awesome Lists containing this project

README

        

## Go json-rpc protobuf plugin
JSON-RPC? gRPC? jRPC!

jRPC is a simple plugin that generates http endpoints from a proto schema. It is useful when your client does not have access to gRPC endpoints

Try it:
`git clone https://github.com/danielvladco/jrpc.git && cd ./jrpc/example && go run server.go`

Test it:
`curl --data '{ "bool": true, "msg": { "param1": "test" } }' http://localhost:8080/Service/Endpoint1`

Generate command:
`protoc --go_out=plugins=grpc,paths=source_relative:. --jrpc_out=paths=source_relative:. ./example/pb/*.proto`

It's as easy as this! try it out and save yourself lots of time writing boilerplate code and debugging potential bugs.

See `/example` for more documentation

## Features
- JSON Request decoding
- JSON response encoding
- Generates endpoints by the following formula: `/` + service name + `/` + method name. ex: `/Service/Endpoint1`
- gRPC status codes to http status codes
- (not supported) client streaming
- (not supported) server streaming

## License:

jRPC is released under the Apache 2.0 license. See the LICENSE file for details.