Actually make fucking interfaces
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user