Documentation ¶
Index ¶
- type Storage
- func (_m *Storage) AppendBacksides(ctx context.Context, userId int, cardId int, backsides []models.Backside) error
- func (_m *Storage) DeleteFlashcardFromDeck(ctx context.Context, cardId int) error
- func (_m *Storage) DeleteLeitner(ctx context.Context, id int) error
- func (_m *Storage) DeleteUserDeck(ctx context.Context, userId int, id int) error
- func (_m *Storage) GetDecksByUserId(ctx context.Context, id int) (models.Decks, error)
- func (_m *Storage) GetFlashcardById(ctx context.Context, id int) (models.Flashcard, error)
- func (_m *Storage) GetFlashcardsIdByDeckId(ctx context.Context, id int) ([]int, error)
- func (_m *Storage) GetLeitnerByUserIdCardId(ctx context.Context, id int, flashcardId int) (models.UserLeitner, error)
- func (_m *Storage) GetRandomCardDeckN(ctx context.Context, userId int, deckId int, down models.CoolDown, n int) ([]int, error)
- func (_m *Storage) GetUserInfo(ctx context.Context, uid int) (models.UserInfo, error)
- func (_m *Storage) PutAllFlashcards(ctx context.Context, id int, cards []models.Flashcard) ([]int, error)
- func (_m *Storage) PutAllUserLeitner(ctx context.Context, uls []models.UserLeitner) ([]int, error)
- func (_m *Storage) PutNewDeck(ctx context.Context, config models.DeckConfig) (int, error)
- func (_m *Storage) UpdateDeck(ctx context.Context, deck models.DeckConfig) error
- func (_m *Storage) UpdateFlashcard(ctx context.Context, id int, w string, b models.Backside, a string) error
- func (_m *Storage) UpdateLeitner(ctx context.Context, ul models.UserLeitner) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
Storage is an autogenerated mock type for the Storage type
func NewStorage ¶
NewStorage creates a new instance of Storage. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*Storage) AppendBacksides ¶
func (_m *Storage) AppendBacksides(ctx context.Context, userId int, cardId int, backsides []models.Backside) error
AppendBacksides provides a mock function with given fields: ctx, userId, cardId, backsides
func (*Storage) DeleteFlashcardFromDeck ¶
DeleteFlashcardFromDeck provides a mock function with given fields: ctx, cardId
func (*Storage) DeleteLeitner ¶
DeleteLeitner provides a mock function with given fields: ctx, id
func (*Storage) DeleteUserDeck ¶
DeleteUserDeck provides a mock function with given fields: ctx, userId, id
func (*Storage) GetDecksByUserId ¶
GetDecksByUserId provides a mock function with given fields: ctx, id
func (*Storage) GetFlashcardById ¶
GetFlashcardById provides a mock function with given fields: ctx, id
func (*Storage) GetFlashcardsIdByDeckId ¶
GetFlashcardsIdByDeckId provides a mock function with given fields: ctx, id
func (*Storage) GetLeitnerByUserIdCardId ¶
func (_m *Storage) GetLeitnerByUserIdCardId(ctx context.Context, id int, flashcardId int) (models.UserLeitner, error)
GetLeitnerByUserIdCardId provides a mock function with given fields: ctx, id, flashcardId
func (*Storage) GetRandomCardDeckN ¶
func (_m *Storage) GetRandomCardDeckN(ctx context.Context, userId int, deckId int, down models.CoolDown, n int) ([]int, error)
GetRandomCardDeckN provides a mock function with given fields: ctx, userId, deckId, down, n
func (*Storage) GetUserInfo ¶
GetUserInfo provides a mock function with given fields: ctx, uid
func (*Storage) PutAllFlashcards ¶
func (_m *Storage) PutAllFlashcards(ctx context.Context, id int, cards []models.Flashcard) ([]int, error)
PutAllFlashcards provides a mock function with given fields: ctx, id, cards
func (*Storage) PutAllUserLeitner ¶
PutAllUserLeitner provides a mock function with given fields: ctx, uls
func (*Storage) PutNewDeck ¶
PutNewDeck provides a mock function with given fields: ctx, config
func (*Storage) UpdateDeck ¶
UpdateDeck provides a mock function with given fields: ctx, deck
func (*Storage) UpdateFlashcard ¶
func (_m *Storage) UpdateFlashcard(ctx context.Context, id int, w string, b models.Backside, a string) error
UpdateFlashcard provides a mock function with given fields: ctx, id, w, b, a
func (*Storage) UpdateLeitner ¶
UpdateLeitner provides a mock function with given fields: ctx, ul