Deretardify the caching

This commit is contained in:
2025-10-11 10:33:03 +02:00
parent 6c1e9310c5
commit 22b218c7d3
6 changed files with 401 additions and 476 deletions

21
types/types.go Normal file
View File

@@ -0,0 +1,21 @@
package types
import "time"
// Character represents a character with authentication info
type Character struct {
ID int64 `gorm:"primaryKey"` // EVE character ID from JWT token
CharacterName string `gorm:"uniqueIndex"`
AccessToken string
RefreshToken string
ExpiresAt time.Time
UpdatedAt time.Time
CreatedAt time.Time
}
type CacheEntry struct {
ID uint `gorm:"primaryKey"`
Hash string `gorm:"uniqueIndex"`
Data string `gorm:"type:text"`
CachedAt time.Time `gorm:"index"`
}