go-japi
examples-go
go-japi | examples-go | |
---|---|---|
4 | 4 | |
17 | 94 | |
- | - | |
1.8 | 7.3 | |
about 2 years ago | about 2 months ago | |
Go | Go | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
go-japi
-
What's the reason behind the design decision to not return a response value from handlers?
Check out https://github.com/jarrettv/go-japi if you are building a JSON HTTP API. Also `go-don` is faster and supports other encoding formats.
-
Is it possible to write a well-typed controller/handler in Go?
go-japi and go-don are two small libraries that will do what you want.
-
Connect, a better gRPC
The generic request and response wrappers seem interesting but they do tend to make the handler signature very verbose with little upside. For example: `type Handle[T any, O any] func(ctx context.Context, request T) (O, error)` would be really sweet. See go-japi for example.
-
japi is a JSON HTTP API go library with generics
Japi is a fork and simplification of another library. The upstream library go-don adopted fasthttp and our use case needed to stay on standard net/http.
examples-go
-
Joseph Weizenbaum's Original Eliza
There's a Go port available over gRPC (and gRPC-Web, and the Connect RPC protocol) at https://demo.connect.build. The code (as well as sample clients) are at https://github.com/bufbuild/connect-demo. You can also talk to our Eliza implementation with cURL:
curl --header 'Content-Type: application/json' --data '{"sentence": "I feel happy."}' https://demo.connect.build/buf.connect.demo.eliza.v1.ElizaSe...
I love that this little bit of computing history is getting some love :)
- Experience report: Converting from Google gRPC to Buf's Connect RPC (with gRPC compatibility)
-
Connect, a better gRPC
For more details, check out the launch blog post, the documentation, connect-go on Github, or the demo project.
What are some alternatives?
flamego - A fantastic modular Go web framework with a slim core but limitless extensibility
connect-go - Moved to https://github.com/connectrpc/connect-go
Macaron - Package macaron is a high productive and modular web framework in Go.
drpc - drpc is a lightweight, drop-in replacement for gRPC
there - ⚡️ Robust Web Framework to build Go Services
go-grpc-prometheus - Prometheus monitoring for your gRPC Go servers.
eliza
grpc-gateway - gRPC to JSON proxy generator following the gRPC HTTP spec
go-respond - A Go package for handling common HTTP JSON responses.
chi - lightweight, idiomatic and composable router for building Go HTTP services