Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInternal = errors.New("internal storage error")
Functions ¶
This section is empty.
Types ¶
type CardRepo ¶
type CardRepo interface { Repo[domain.Card] FindAllByWord(ctx context.Context, word string) ([]domain.Card, error) FindAllByWordInDeck(ctx context.Context, word string, deck domain.Deck) ([]domain.Card, error) ListAllInDeck(ctx context.Context, deck domain.Deck) ([]domain.Card, error) DeleteAllInDeck(ctx context.Context, deck domain.Deck) error }
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage stores repo implementations.
func NewStorage ¶
func NewStorage(cardRepo CardRepo, deckRepo DeckRepo) *Storage
NewStorage returns storage of repo implementations.
It is supposed to be used by repo implementations to pass them.
Click to show internal directories.
Click to hide internal directories.