Initial open source release
This commit is contained in:
commit
74992e893f
377 changed files with 118084 additions and 0 deletions
13
internal/store/doc.go
Normal file
13
internal/store/doc.go
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
// Package store 定义存储接口与协议层 DTO,不含具体实现。
|
||||
//
|
||||
// 布局:主包只放接口(AuthKeyStore / SessionStore / UserStore / AuthorizationStore /
|
||||
// CodeStore / UpdateStateStore / UpdateEventStore 等)与协议 DTO;三种后端实现各自独立成对称子包:
|
||||
// - store/memory —— 内存实现,测试替身与本地兜底
|
||||
// - store/postgres —— PostgreSQL(pgx + sqlc 生成查询 + golang-migrate 迁移)
|
||||
// - store/redisstore —— Redis(go-redis)
|
||||
//
|
||||
// 类型边界:接口签名分两类——
|
||||
// - 协议产物用 store 自有 DTO:AuthKeyData、SessionData、PhoneCode(不依赖 tg.*,也非业务实体);
|
||||
// - 业务实体直接用 domain:UserStore / AuthorizationStore / MessageStore / UpdateEventStore
|
||||
// 收发 domain.User / domain.Authorization / domain.Message / domain.UpdateEvent。
|
||||
package store
|
||||
Loading…
Add table
Add a link
Reference in a new issue