Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDbaAPI ¶
func NewDbaAPI(r Repo) pb.SrvDbaServiceServer
Types ¶
type Repo ¶
type Repo interface { RepoKanji RepoWord RepoKanjiProgress RepoWordProgress RepoHelpers }
type RepoHelpers ¶
type RepoKanji ¶
type RepoKanji interface { GetKanjiByID(ctx context.Context, kanjiID uint64) (*m_kanji.Kanji, error) ListKanjiByLevel(ctx context.Context, level uint32, limit uint64, offset uint64, min bool) ([]*m_kanji.Kanji, error) ListKanjiByIDs(ctx context.Context, ids []uint64, min bool) ([]*m_kanji.Kanji, error) }
type RepoKanjiProgress ¶
type RepoKanjiProgress interface { GetKanjiProgressById(ctx context.Context, userID uint64, kanjiID uint64) (*m_kanji.KanjiProgress, error) ListKanjiProgressByTime(ctx context.Context, userID uint64, now time.Time, limit uint64, offset uint64) ([]*m_kanji.KanjiProgress, error) ListKanjiProgressByIDs(ctx context.Context, userID uint64, kanjiIDs []uint64) ([]*m_kanji.KanjiProgress, error) ListKanjiProgressBySRSLevel(ctx context.Context, userID uint64, srsLevel uint32, limit uint64, offset uint64) ([]*m_kanji.KanjiProgress, error) AddKanjiProgress(ctx context.Context, userID uint64, kanjiID []uint64) (bool, error) UpdateKanjiProgress(ctx context.Context, progressID uint64, srsLevel uint32, nextDate *time.Time, burnDate *time.Time) (bool, error) }
type RepoWord ¶
type RepoWord interface { GetWordByID(ctx context.Context, wordID uint64) (*m_word.Word, error) ListWordsByLevel(ctx context.Context, level uint32, limit uint64, offset uint64, min bool) ([]*m_word.Word, error) ListWordsByKanji(ctx context.Context, kanjiID uint64, limit uint64, offset uint64, min bool) ([]*m_word.Word, error) ListWordsByKanjiAndLevel(ctx context.Context, level uint32, kanjiID uint64, limit uint64, offset uint64, min bool) ([]*m_word.Word, error) ListWordsByIds(ctx context.Context, word_ids []uint64, min bool) ([]*m_word.Word, error) }
type RepoWordProgress ¶
type RepoWordProgress interface { GetWordProgressById(ctx context.Context, userID uint64, wordID uint64) (*m_word.WordProgress, error) ListWordProgressByTime(ctx context.Context, userID uint64, now time.Time, limit uint64, offset uint64) ([]*m_word.WordProgress, error) ListWordProgressByIDs(ctx context.Context, userID uint64, wordIDs []uint64) ([]*m_word.WordProgress, error) ListWordProgressBySRSLevel(ctx context.Context, userID uint64, srsLevel uint32, limit uint64, offset uint64) ([]*m_word.WordProgress, error) AddWordProgress(ctx context.Context, userID uint64, wordID []uint64) (bool, error) UpdateWordProgress(ctx context.Context, progressID uint64, srsLevel uint32, nextDate *time.Time, burnDate *time.Time) (bool, error) }
Click to show internal directories.
Click to hide internal directories.