6 Commits

Author SHA1 Message Date
向宁
3eb1a1839d feat: add JWT auth middleware with public endpoint selector
Add HS256 JWT authentication to both HTTP and gRPC servers using
Kratos jwt middleware with selector to skip auth for public share
endpoints (GetShareInfo, DownloadShare). Wire DI updated to inject
conf.Auth into server constructors.
2026-05-25 13:43:34 +08:00
向宁
dfaead4766 feat: add Watermill CQRS setup with commands, events, and handler stubs 2026-05-25 13:08:55 +08:00
向宁
b9b5838938 chore: add Kratos, Watermill, GORM, Wire dependencies for migration
Add new framework dependencies needed for the Gin-to-Kratos migration:
- go-kratos/kratos/v2 (HTTP/gRPC transport, config, middleware, JWT auth)
- google/wire (compile-time dependency injection)
- ThreeDotsLabs/watermill + watermill-sql/v2 (event-driven CQRS)
- gorm.io/gorm + gorm.io/driver/postgres (PostgreSQL ORM)

The old Gin/Swagger deps remain as direct deps since existing code still
imports them. They will be removed in later migration tasks when code is
rewritten. Blank imports in internal/deps.go ensure go mod tidy keeps
the new deps until actual code imports them directly.
2026-05-25 12:51:26 +08:00
向宁
3a18ca0579 feat: add directory structure and file sharing support
- PostgreSQL metadata overlay layer on top of existing S3 storage
- 3 new tables: folders, files, share_links
- Folder CRUD: create, get with children, tree, rename, delete (cascade)
- File operations: upload to folder, move between folders
- Share links: create with optional password/expiry/download limit, public access
- S3 compensation on PG write failure
- Existing 14 endpoints untouched
2026-05-20 20:26:19 +08:00
向宁
d3015d63f2 feat: add OpenTelemetry tracing, metrics, and logging
- Create internal/common/otel.go with InitOTel() for tracing + metrics + logs
- Add otelgin middleware for automatic Gin HTTP span creation
- Add OTelEndpoint config (default: 192.168.1.154:4316)
- Export all signals via OTLP gRPC to OTel Collector
2026-05-17 22:08:03 +08:00
root
8232827835 Initial commit 2025-12-18 09:34:49 +08:00