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[value.Card] ListAllInDeck(ctx context.Context, deck value.Deck) ([]value.Card, error) FindAll(ctx context.Context, front, back string) ([]value.Card, error) FindAllInDeck(ctx context.Context, front, back string, deck value.Deck) ([]value.Card, error) FindAllByFront(ctx context.Context, front string) ([]value.Card, error) FindAllByFrontInDeck(ctx context.Context, front string, deck value.Deck) ([]value.Card, error) DeleteAllInDeck(ctx context.Context, deck value.Deck) error }
type Storage ¶
type Storage interface { // GetCardRepo should return stored CardRepo implementation. GetCardRepo() CardRepo // GetDeckRepo should return stored DeckRepo implementation. GetDeckRepo() DeckRepo // Close gently closes living connection to datasource(if there is some). Close() error }
Storage describes a storage with living connection.
Click to show internal directories.
Click to hide internal directories.