24 lines
780 B
Go
24 lines
780 B
Go
package repositories
|
|
|
|
import "go-eve-pi/types"
|
|
|
|
// CharacterRepositoryInterface defines the interface for character operations
|
|
type CharacterRepositoryInterface interface {
|
|
GetCharacterByName(characterName string) (*types.Character, error)
|
|
GetAllCharacters() ([]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
|
|
}
|