~/talk

Building APIs

Talkat Golang UK Conference 2015 · on Friday, 2015-08-21· [web-platform, go]
name:Mat Ryer
github:matryer
slides:none on file

Explains how to build production-ready web APIs using the standard library around http.HandlerFunc and the ResponseWriter/Request pair, favors JSON-only endpoints, and shows concrete tooling: routing with Gorilla M (path params and method-specific handlers), per-request DB session handling with mgo stored in request context, a reusable respond/decode/OK-validation pattern, composable middleware via adapter functions, and testing with the Testify style plus net/http/httptest server and table-driven tests.

AI-written summary · about

  1. 0:00Introduction
  2. 1:20What are APIs
  3. 1:34Why use Golang
  4. 2:23Building APIs in Go
  5. 4:30ResponseWriter
  6. 4:55Request
  7. 5:30Routing
  8. 6:55HTTP Router
  9. 8:33Respond with Data
  10. 10:20MapString Interface
  11. 12:00Public Methods
  12. 13:00OK Pattern
  13. 17:18Middleware
  14. 18:35Server Types
  15. 19:58Sharing Data
  16. 21:20MongoDB Wrapper
  17. 26:57Using Adapters
  18. 32:17Using Flags
  19. 35:44HTTP Test
  20. 38:14Table Testing
  21. 40:26Teardown
  22. 41:17Golang Community
  23. 42:24Questions
  24. 44:37Middleware vs Adapter
  25. 47:25Panic
  26. 49:04Interfaces
~/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.