kra-new/internal/integration
Yvan 63dbb4cfbc 优化结构 2026-08-20 21:46:52 +08:00
..
cache 优化结构 2026-08-20 20:46:18 +08:00
email 优化结构 2026-08-20 20:39:09 +08:00
payment 优化结构 2026-08-20 21:46:52 +08:00
storage 优化结构 2026-08-20 21:46:52 +08:00
README.md 优化结构 2026-08-20 21:46:52 +08:00
provider.go 优化结构 2026-08-20 21:46:52 +08:00

README.md

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.