~/talk

Building APIs in Go The Stack Without a Framework

Talkat GopherCon UK 2019 · 2019-08-21..08-23· [go, api-design]
links:none on file
slides:none on file

Builds a small versioned REST CRUD API for a nutrition service (fruits, grains, vegetables) using plain net/http handler funcs and a gorilla/mux router, Postgres accessed via database/sql + lib/pq, migrations run with golang-migrate, simple token check using net/http BasicAuth, and a time‑based rate limiter. Code on GitHub shows controller functions that json.Marshal model results, SQL queries executed with Exec/Query/QueryRow, and migrations as sequential .up/.down SQL files — a working DIY stack.

AI-written summary · about

  1. 0:00Start
  2. 3:39The Problem Set: Nutritional API
  3. 7:10How do I DIY?
  4. 8:52Type Serve Mux
  5. 10:54go/chi
  6. 17:07Router
  7. 17:55Controller
  8. 19:59Ratelimiting
  9. 20:13Summary
  10. 20:37References
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.