finds.dev← search

// the find

rs/rest-layer

★ 1,245 · Go · MIT · updated Oct 2021

REST Layer, Go (golang) REST API framework

REST Layer is a Go API framework that takes the schema-first, convention-over-configuration approach: you define resources and relationships, and it generates routing, filtering, sorting, pagination, and ETag-based concurrency control automatically. It sits as a plain net/http handler so it composes with any middleware. The target user is someone building an internal or service-to-service REST API who wants those mechanical pieces handled and doesn't need fine-grained per-route control.

The field-level hooks (OnInit, OnUpdate) and dependency system give you a clean place to put business logic without wrapping handlers manually. ETag and If-Match support goes all the way down to the storage layer, which is rare and actually useful for concurrent writes. The sub-resource embedding — fetching a user with their last N posts in a single request by writing a field projection expression — is genuinely well thought out and reduces round trips without GraphQL's complexity. The schema package is independently useful: validators, nullable fields, read-only enforcement, and bcrypt passwords are all built in.

Dead since 2021 — no maintenance, Travis CI badges, the MongoDB driver is certainly on an ancient version, and Go module ecosystem has moved on. GraphQL support is read-only and explicitly unfinished, so that feature checkbox is mostly marketing. The storage backend story is thin: MongoDB and an in-memory test handler are the only first-party options; SQL, Elasticsearch, and Datastore handlers are third-party and similarly unmaintained. Authorization is 'customizable via hooks' which in practice means you roll it yourself from scratch — there's no RBAC or token middleware included.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →