api

package
v0.0.0-...-8519efd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDbaAPI

func NewDbaAPI(r Repo) pb.SrvDbaServiceServer

Types

type RepoHelpers

type RepoHelpers interface {
	GetCounter(ctx context.Context, userID uint64, level uint32) (*m_helpers.Counter, error)
}

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)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL