Files
Edu/services/api-gateway
SpecialX 75804c7d64 fix: lint-staged 移除 Go gofmt 规则
Go 工具链不在 git hook(Git Bash)PATH 中,gofmt 执行失败。
Go 文件格式化由开发者手动执行 go fmt。
2026-07-08 12:51:46 +08:00
..

API Gateway

Go (Gin) 实现的 API 网关,所有外部请求的统一入口。

职责

  • 路由转发:/api/v1/classes/* → classes 服务
  • JWT 鉴权P1 HS256P2 RS256
  • 请求 ID 注入:全链路追踪

开发

cd services/api-gateway
go mod tidy
go run main.go

健康检查

GET /healthz