Actually make fucking interfaces

This commit is contained in:
2025-10-10 22:31:01 +02:00
parent da5133eef8
commit a09a01e7bc
8 changed files with 44 additions and 19 deletions

View File

@@ -7,3 +7,16 @@ type CharacterRepositoryInterface interface {
GetCharacterByName(characterName string) (*types.Character, error)
SaveCharacter(character *types.Character) error
}
// CacheRepositoryInterface defines the interface for cache operations
type CacheRepositoryInterface interface {
GetCacheEntry(urlHash string) (*types.CacheEntry, error)
SaveCacheEntry(entry *types.CacheEntry) error
}
// DatabaseInterface defines the interface for database management
type DatabaseInterface interface {
Character() CharacterRepositoryInterface
Cache() CacheRepositoryInterface
AutoMigrate(dst ...interface{}) error
}