nerdalize / gg Goto Github PK
View Code? Open in Web Editor NEWGenerates HTTP1.1 handlers and clients from gRPC Go code
License: MIT License
Generates HTTP1.1 handlers and clients from gRPC Go code
License: MIT License
Returning an error from the gRPC implementation should be handled more gracefully for default implementations by actually encode as JSON but should be customisable if necessary. Also how would we like to deal with errors from code generation itself, can we provide error codes? Maybe those by grpc
You never want trailing whitespaces to influence your url paths. Trim it before it is used for making a request
Often you would like your code to behave differently whenever the server returns an unexpected status code was returned. The default implementation should take care that the body might not contain encoded content in cases and handle this gracefully.
These are currently stored in private members, this should instead be configurable by the users of the generated code.
For example, running gg $(pwd)/my-proto/*.pb.go
causes double absolute paths like "/Users/my-user/go/my-proto/Users/my-user/my-proto" resulting in file not found.
Currently, the protobuf json encoder is used to generate json send as body but that encumbers client libraries with including a dependency that they dont need for a very large part.
Users might want to customize the requests for certain endpoints before it is send to the server, for example to add certain headers. Lifecycle hooks should allow for this.
Not all possible scenarios can be covered with generated codes. To allow for fine-grained customisations to how HTTP requests are parsed into the protobuf message it would be usefull to provide hooks that can be implemented for certain endpoints. Specifically after the input has been parsed and before output is send to the client.
gRPC supports ways of calling rpc endpoints that are not (easily) supported by http 1 endpoints. Make sure this is documented and no (standard) code is generated.
Debugging mall functioning endpoints and requests can be hard when you cant print the actual requests and responses to/from the server. Requesters should define a small and simple logging interface that consumers can implement to see what happens in the generated code. It should be such that the standard lib (accidentally) implements this interface.
Protobuf supports a whole bunch of types, make sure the gorilla/schema form decoder supports such kinds of types.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.