fix(supply-api): 修复编译错误和测试问题
- 添加 ErrNotFound 和 ErrConcurrencyConflict 错误定义 - 修复 pgx.NullTime 替换为 *time.Time - 修复 db.go 事务类型 (pgx.Tx vs pgxpool.Tx) - 移除未使用的导入和变量 - 修复 NewSupplyAPI 调用参数 - 修复中间件链路 handler 类型问题 - 修复适配器类型引用 (storage.InMemoryAccountStore 等) - 所有测试通过 Test: go test ./...
This commit is contained in:
12
supply-api/internal/cache/redis.go
vendored
12
supply-api/internal/cache/redis.go
vendored
@@ -49,12 +49,12 @@ func (r *RedisCache) HealthCheck(ctx context.Context) error {
|
||||
|
||||
// TokenStatus Token状态
|
||||
type TokenStatus struct {
|
||||
TokenID string `json:"token_id"`
|
||||
SubjectID string `json:"subject_id"`
|
||||
Role string `json:"role"`
|
||||
Status string `json:"status"` // active, revoked, expired
|
||||
ExpiresAt int64 `json:"expires_at"`
|
||||
RevokedAt int64 `json:"revoked_at,omitempty"`
|
||||
TokenID string `json:"token_id"`
|
||||
SubjectID string `json:"subject_id"`
|
||||
Role string `json:"role"`
|
||||
Status string `json:"status"` // active, revoked, expired
|
||||
ExpiresAt int64 `json:"expires_at"`
|
||||
RevokedAt int64 `json:"revoked_at,omitempty"`
|
||||
RevokedReason string `json:"revoked_reason,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user