REST in peace: using generics to remove REST boilerplate
summary
Generics power a small Go library that generates CRUD HTTP endpoints from a typed provider: register rip.ResourceProvider[MyResource] and call rip.HandleResource[MyResource] to get GET/POST/PUT/DELETE plus content negotiation (JSON, XML, MessagePack, HTML). An EntityProvider interface exposes Create/Get/Update/Delete/List using real types; demo uses an in-memory provider and HTMX UI. Library registers encoders via init, lacks robust error handling, pagination, nested resources and partial-update semantics, and acknowledges some generic-vs-any performance tradeoffs.
AI-written summary · about
chapters (9)
- 0:00Introduction and background
- 5:47The problem with boilerplate
- 8:00Empty interface challenges
- 11:10Leveraging Go generics
- 13:58The Rip framework approach
- 19:06Resource handling implementation
- 23:24Framework demo and UI
- 29:47Future goals and community
- 34:23Q&A session








