Documentation ¶
Index ¶
- Variables
- type RepositoryFactory
- type RepositoryFactoryFunc
- type TatoebaLinkAddParameter
- type TatoebaLinkAddParameterIterator
- type TatoebaLinkRepository
- type TatoebaSentence
- type TatoebaSentenceAddParameter
- type TatoebaSentenceAddParameterIterator
- type TatoebaSentencePair
- type TatoebaSentencePairSearchResult
- type TatoebaSentenceRepository
- type TatoebaSentenceSearchCondition
- type Transaction
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTatoebaLinkAlreadyExists = errors.New("tatoebaLink already exists")
View Source
var ErrTatoebaLinkSourceNotFound = errors.New("tatoebaLink source not found")
View Source
var ErrTatoebaSentenceAlreadyExists = errors.New("tatoebaSentence already exists")
View Source
var ErrTatoebaSentenceNotFound = errors.New("tatoebaSentence not found")
Functions ¶
This section is empty.
Types ¶
type RepositoryFactory ¶
type RepositoryFactory interface { NewTatoebaLinkRepository(ctx context.Context) TatoebaLinkRepository NewTatoebaSentenceRepository(ctx context.Context) TatoebaSentenceRepository }
type RepositoryFactoryFunc ¶
type TatoebaLinkAddParameter ¶
func NewTatoebaLinkAddParameter ¶
func NewTatoebaLinkAddParameter(from, to int) (TatoebaLinkAddParameter, error)
type TatoebaLinkAddParameterIterator ¶
type TatoebaLinkAddParameterIterator interface {
Next(ctx context.Context) (TatoebaLinkAddParameter, error)
}
type TatoebaLinkRepository ¶
type TatoebaLinkRepository interface {
Add(ctx context.Context, param TatoebaLinkAddParameter) error
}
type TatoebaSentence ¶
type TatoebaSentence interface { GetSentenceNumber() int GetLang3() domain.Lang3 GetText() string GetAuthor() string GetUpdatedAt() time.Time }
func NewTatoebaSentence ¶
type TatoebaSentenceAddParameter ¶
type TatoebaSentenceAddParameter interface { GetSentenceNumber() int GetLang3() domain.Lang3 GetText() string GetAuthor() string GetUpdatedAt() time.Time }
type TatoebaSentenceAddParameterIterator ¶
type TatoebaSentenceAddParameterIterator interface {
Next(ctx context.Context) (TatoebaSentenceAddParameter, error)
}
type TatoebaSentencePair ¶
type TatoebaSentencePair interface { GetSrc() TatoebaSentence GetDst() TatoebaSentence }
func NewTatoebaSentencePair ¶
func NewTatoebaSentencePair(src, dst TatoebaSentence) (TatoebaSentencePair, error)
type TatoebaSentencePairSearchResult ¶
type TatoebaSentencePairSearchResult interface { GetTotalCount() int GetResults() []TatoebaSentencePair }
func NewTatoebaSentencePairSearchResult ¶
func NewTatoebaSentencePairSearchResult(totalCount int, results []TatoebaSentencePair) TatoebaSentencePairSearchResult
type TatoebaSentenceRepository ¶
type TatoebaSentenceRepository interface { FindTatoebaSentencePairs(ctx context.Context, param TatoebaSentenceSearchCondition) (TatoebaSentencePairSearchResult, error) FindTatoebaSentenceBySentenceNumber(ctx context.Context, sentenceNumber int) (TatoebaSentence, error) Add(ctx context.Context, param TatoebaSentenceAddParameter) error ContainsSentenceBySentenceNumber(ctx context.Context, sentenceNumber int) (bool, error) }
type TatoebaSentenceSearchCondition ¶
type TatoebaSentenceSearchCondition interface { GetPageNo() int GetPageSize() int GetKeyword() string IsRandom() bool }
func NewTatoebaSentenceSearchCondition ¶
func NewTatoebaSentenceSearchCondition(pageNo, pageSize int, keyword string, random bool) (TatoebaSentenceSearchCondition, error)
type Transaction ¶
type Transaction interface {
Do(ctx context.Context, fn func(rf RepositoryFactory) error) error
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.