Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Building APIs In Go
Search
Sowju
August 23, 2019
Programming
0
80
Building APIs In Go
Sowju
August 23, 2019
Tweet
Share
More Decks by Sowju
See All by Sowju
containwd.pdf
sowjumn
0
290
Build a Go Web App
sowjumn
0
180
Other Decks in Programming
See All in Programming
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
1
2.6k
並行開発のためのコードレビュー
miyukiw
0
290
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
3.9k
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
380
Best-Practices-for-Cortex-Analyst-and-AI-Agent
ryotaroikeda
1
110
CSC307 Lecture 05
javiergs
PRO
0
500
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
430
Grafana:建立系統全知視角的捷徑
blueswen
0
330
Smart Handoff/Pickup ガイド - Claude Code セッション管理
yukiigarashi
0
140
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
7.4k
CSC307 Lecture 06
javiergs
PRO
0
690
CSC307 Lecture 09
javiergs
PRO
1
840
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
141
7.3k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Building the Perfect Custom Keyboard
takai
2
690
Rebuilding a faster, lazier Slack
samanthasiow
85
9.4k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.6k
Designing for Performance
lara
610
70k
The Spectacular Lies of Maps
axbom
PRO
1
520
How to build a perfect <img>
jonoalderson
1
4.9k
Reality Check: Gamification 10 Years Later
codingconduct
0
2k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
Believing is Seeing
oripsolob
1
56
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Transcript
Building APIs in GO - The stack without a framework
Hi Gophers!
Agenda
Takeaways
The Problem Set : Nutritional API
API Design Considerations
None
Rapid Prototyping Frameworks ➢ ➢ ➢ ➢
Why do I DIY? ➢ ➢ ➢ ➢
How do I DIY?
HTTP HandlerFunc
Type ServeMux
net/http: type Request
go/chi
database/sql: type DB & Tx • • • • •
• • •
lib/pq : type SQL •
Code
Http BasicAuth
golang-migrate
Migrations
Applying the migrations
Router …
Controller
Model
Ratelimiting type Limiter
Summary
References • • • • • • • • •
•
Codebase & Slides https://github.com/sowjumn/diy_nutrition
Thank You!