Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
mojito
Code your next Go web project with (a) Mojito! Mojito is a super-modular, fast, opinion-less framework to bootstrap your next Go web project. (by go-mojito)
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
I used the libraries mentioned here: https://github.com/rameshsunkara/go-rest-api-example
Big fan of gRPC-gateway. Not a big fan of protocol buffers however. That being said, https://buf.build/ makes them manageable and was built by the same guys doing gRPC-gateway
Of course you can do it, but using something like https://github.com/gorilla/mux will just be an overall more pleasant experience.
In recent projects I used flutter on the client side and the server was a REST client generated by the goa.design library, which seemed better than twirp. Or I used GraphQL - and I used the whole server which was generated by the https://github.com/99designs/gqlgen library. GraphQL is probably the best choice for the Flutter - Go combination.
I use the one I made with a friend :) https://github.com/go-mojito/mojito
We write the OAPI3 spec first - then use oapi-codegen to generate the boilerplate in Echo. After that it's just minor wiring things together and we're off to writing business logic. It includes request validation middleware as well - which was one of our hard requirements.
There's a pretty thorough walkthrough of this approach in the readme for the grpc-gateway plugin: https://github.com/grpc-ecosystem/grpc-gateway