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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFrontendAPI

func NewFrontendAPI(r Repo) pb.SrvFrontendApiServiceServer

Types

type Repo

type Repo interface {
	RepoKanji
	RepoWord
}

type RepoKanji

type RepoKanji interface {
	GetKanji(ctx context.Context, kanjiID uint64) (*pb.GetKanjiV1Response, error)
	ListKanji(ctx context.Context, level uint32) ([]*m_kanji.Kanji, error)
}

type RepoWord

type RepoWord interface {
	GetWord(ctx context.Context, wordID uint64) (*m_word.Word, error)
	ListWordsByLevel(ctx context.Context, level uint32) ([]*m_word.Word, error)
	ListWordByKanji(ctx context.Context, kanjiID uint64) ([]*m_word.Word, error)
}

Jump to

Keyboard shortcuts

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