Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

TBH all I want are Django's generic views implemented in Go to make it easy to map routes to DB resources to speed up making APIs.

Ideally it would automagically expose a whitelisted list of DB tables as API endpoints but allow the ability to override queries for each table and perform logic as necessary (i.e. support custom handlers as well as lightweight default ones).

If anyone knows of anything like that please let me know.



sqlc.dev plus gongular and you have a quick REST api

sqlc.dev plus gql-gen and you have a quick GraphQL server

sqlc.dev plus goa.design and you have a full-featured REST + gRPC server with OpenAPI for easy client generation

No need to write model code and validation for inputs/outputs. Just define your SQL queries and your request objects (or typedefs for GraphQL) and then let these tools generate everything else.


You've piqued my interest. Do you know of any OSS repos that implement any of these?


No, I'd really like to see this change as I feel there are a lot of hidden gems in the Go ecosystem. Developers arrive in Go, find Gin and start making their Rails/Laravel/Express.js MVC framework without realizing Go offers some alternatives by it's design (Rust too!)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: