owpengram-server/internal/store/doc.go
2026-06-04 01:37:39 +08:00

13 lines
897 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Package store 定义存储接口与协议层 DTO不含具体实现。
//
// 布局主包只放接口AuthKeyStore / SessionStore / UserStore / AuthorizationStore /
// CodeStore / UpdateStateStore / UpdateEventStore 等)与协议 DTO三种后端实现各自独立成对称子包
// - store/memory —— 内存实现,测试替身与本地兜底
// - store/postgres —— PostgreSQLpgx + sqlc 生成查询 + golang-migrate 迁移)
// - store/redisstore —— Redisgo-redis
//
// 类型边界:接口签名分两类——
// - 协议产物用 store 自有 DTOAuthKeyData、SessionData、PhoneCode不依赖 tg.*,也非业务实体);
// - 业务实体直接用 domainUserStore / AuthorizationStore / MessageStore / UpdateEventStore
// 收发 domain.User / domain.Authorization / domain.Message / domain.UpdateEvent。
package store