Go Web 与后端 MOC
net/http、JSON、路由中间件、分层、认证、gRPC/SSE 与 Gin 入口导航。
#moc
#growing
#backend
#go
[!info] related notes
Go Web 与后端 MOC
知识总览
filters:
and:
- 'file.ext == "md"'
- 'file.inFolder("z")'
- 'this.file.links.contains(file)'
- 'file.path != this.file.path'
formulas:
knowledge: 'file.asLink(title)'
properties:
formula.knowledge:
displayName: 知识
note.description:
displayName: Description
note.mastery:
displayName: Mastery
views:
- type: table
name: 知识总览
order:
- formula.knowledge
- note.description
- note.mastery
columnSize:
formula.knowledge: 280
note.description: 760
note.mastery: 56
这个概念为什么出现
要把语言能力变成 HTTP/RPC 服务,需要请求生命周期、契约、横切与分层地图。本图从标准库出发,再接到可选框架。
这张地图覆盖什么
net/http、JSON、路由、中间件、校验、HSR 分层、JWT、限流、健康检查、gRPC、SSE、Gin。
从这里开始
HTTP 与请求处理
认证与安全边界
数据交换
RPC 与实时
相邻主题
自测题
- 为何先学 net/http 再学 Gin?
- Handler 与 Service 的职责边界?
答案
- 掌握请求生命周期与可测 Handler,框架只是糖。
- Handler 做协议;Service 做用例/业务。