xiaowei
|
6667d42e14
|
feat(M1): Go API 服务器骨架 + Auth 中间件 + /health 端点
M1.3: Go HTTP 服务器 (net/http, /health, Auth middleware)
M1.4: Protobuf IPC 定义 (Go↔Rust Consolidation 服务)
验收:
- /health → 200 {"status":"ok","service":"zhiyid","version":"0.1.0"}
- 无 X-API-Key → 401
- 正确 Key → 200
- 错误 Key → 401
文件:
- go/cmd/zhiyid/main.go (127 行, 优雅关闭)
- go/internal/api/server.go (31 行, 路由注册)
- go/internal/api/middleware/auth.go (38 行, X-API-Key)
- go/internal/api/routes/health.go (24 行)
- go/proto/consolidate.proto (72 行, 4 RPC)
|
2026-05-28 17:16:52 +08:00 |