优化结构

This commit is contained in:
Yvan
2026-08-20 21:46:52 +08:00
parent 23bc29ce0f
commit 63dbb4cfbc
78 changed files with 767 additions and 1082 deletions
+20
View File
@@ -0,0 +1,20 @@
# Integrations
`internal/integration` contains adapters that talk to systems outside the
application process. They may open sockets, create SDK clients, keep reloadable
state, or translate provider-specific protocols into `biz` interfaces.
## Packages
- `cache`: Redis-backed cache with an in-memory fallback.
- `email`: SMTP email repository.
- `payment`: payment-channel SDKs and callback/signature handling.
- `storage`: local and object-storage implementations of `biz.FileStorage`.
These packages are not `utils`: they perform I/O and own external dependency
lifecycles. Their constructors are exposed through `ProviderSet`; `cmd` binds
the `cache.RedisProvider` implementation to the shared `data.Data` container.
Stateless protocol helpers that do not own clients live in
`internal/utils/paymentutil`. They are intentionally small and dependency
light, while provider adapters remain here.