dao

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dao

type Dao struct {
	Word       Word
	Phrase     Phrase
	WordPhrase WordPhrase
}

func Get

func Get() Dao

type Phrase

type Phrase interface {
	Create(ctx context.Context, phrase *model.Phrase) error
}

func NewPhrase

func NewPhrase() Phrase

type PhraseImpl

type PhraseImpl struct {
}

func (PhraseImpl) Create

func (impl PhraseImpl) Create(ctx context.Context, phrase *model.Phrase) error

type Word

type Word interface {
	BatchInsert(ctx context.Context, words model.Words) error
	GetList(ctx context.Context) (words model.Words, err error)
	IncrNumRepetitions(ctx context.Context, wordIds []string) error
}

func NewWord

func NewWord() Word

type WordImpl

type WordImpl struct {
}

func (WordImpl) BatchInsert

func (impl WordImpl) BatchInsert(ctx context.Context, words model.Words) error

func (WordImpl) GetList

func (impl WordImpl) GetList(ctx context.Context) (words model.Words, err error)

func (WordImpl) IncrNumRepetitions

func (impl WordImpl) IncrNumRepetitions(ctx context.Context, wordIds []string) error

type WordPhrase

type WordPhrase interface {
	BatchInsert(ctx context.Context, list []*model.WordPhrase) error
}

func NewWordPhrase

func NewWordPhrase() WordPhrase

type WordPhraseImpl

type WordPhraseImpl struct {
}

func (WordPhraseImpl) BatchInsert

func (impl WordPhraseImpl) BatchInsert(ctx context.Context, list []*model.WordPhrase) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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