Documentation
¶
Index ¶
- type LangRepo
- func (l LangRepo) Create(ln *lang.Lang) error
- func (l LangRepo) Delete(id, authorID string) error
- func (l LangRepo) DeleteByAuthorID(authorID string) (int, error)
- func (l LangRepo) Exist(id, authorID string) (bool, error)
- func (l LangRepo) Get(id, authorID string) (*lang.Lang, error)
- func (l LangRepo) GetAllViews(authorID string) ([]query.LangView, error)
- func (l LangRepo) GetView(id, authorID string) (query.LangView, error)
- func (l LangRepo) Update(ln *lang.Lang) error
- type Opts
- type TagRepo
- func (t TagRepo) AllExist(ids []string, authorID string) (bool, error)
- func (t TagRepo) Create(tg *tag.Tag) error
- func (t TagRepo) Delete(id, authorID string) error
- func (t TagRepo) DeleteByAuthorID(authorID string) (int, error)
- func (t TagRepo) Get(id, authorID string) (*tag.Tag, error)
- func (t TagRepo) GetAllViews(authorID string) ([]query.TagView, error)
- func (t TagRepo) GetView(id, authorID string) (query.TagView, error)
- func (t TagRepo) GetViews(ids []string, authorID string) ([]query.TagView, error)
- func (t TagRepo) Update(tg *tag.Tag) error
- type TranslationRepo
- func (t *TranslationRepo) Create(record *translation.Translation) error
- func (t *TranslationRepo) Delete(id, authorID string) error
- func (t *TranslationRepo) DeleteByAuthorID(authorID string) (int, error)
- func (t *TranslationRepo) ExistByLang(langID, authorID string) (bool, error)
- func (t *TranslationRepo) ExistByTag(tagID, authorID string) (bool, error)
- func (t *TranslationRepo) Get(id, authorID string) (*translation.Translation, error)
- func (t *TranslationRepo) GetLastViewsBySourcePart(authorID, langID, sourcePart string, pageSize, page int) (query.LastTranslationViews, error)
- func (t *TranslationRepo) GetLastViewsByTags(authorID, langID string, pageSize, page int, tagIds []string) (query.LastTranslationViews, error)
- func (t *TranslationRepo) GetLastViewsByTargetPart(authorID, langID, targetPart string, pageSize, page int) (query.LastTranslationViews, error)
- func (t *TranslationRepo) GetRandomViews(authorID, langID string, tagIds []string, limit int) (query.RandomViews, error)
- func (t *TranslationRepo) GetView(id, authorID string) (query.TranslationView, error)
- func (t *TranslationRepo) Update(record *translation.Translation) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LangRepo ¶
type LangRepo struct {
// contains filtered or unexported fields
}
func NewLangRepo ¶
func NewLangRepo(ctx context.Context, domainProxy lang.Repository, queryProxy query.LangViewRepository, opts Opts) *LangRepo
func (LangRepo) GetAllViews ¶
type TagRepo ¶
type TagRepo struct {
// contains filtered or unexported fields
}
func NewTagRepo ¶
func NewTagRepo(ctx context.Context, domainProxy tag.Repository, queryProxy query.TagViewRepository, opts Opts) *TagRepo
type TranslationRepo ¶
type TranslationRepo struct {
// contains filtered or unexported fields
}
func NewTranslationRepo ¶
func NewTranslationRepo(ctx context.Context, domainProxy translation.Repository, queryProxy query.TranslationViewRepository, cacheTTL time.Duration) *TranslationRepo
func (*TranslationRepo) Create ¶
func (t *TranslationRepo) Create(record *translation.Translation) error
func (*TranslationRepo) Delete ¶
func (t *TranslationRepo) Delete(id, authorID string) error
func (*TranslationRepo) DeleteByAuthorID ¶
func (t *TranslationRepo) DeleteByAuthorID(authorID string) (int, error)
func (*TranslationRepo) ExistByLang ¶
func (t *TranslationRepo) ExistByLang(langID, authorID string) (bool, error)
func (*TranslationRepo) ExistByTag ¶
func (t *TranslationRepo) ExistByTag(tagID, authorID string) (bool, error)
func (*TranslationRepo) Get ¶
func (t *TranslationRepo) Get(id, authorID string) (*translation.Translation, error)
func (*TranslationRepo) GetLastViewsBySourcePart ¶
func (t *TranslationRepo) GetLastViewsBySourcePart(authorID, langID, sourcePart string, pageSize, page int) (query.LastTranslationViews, error)
func (*TranslationRepo) GetLastViewsByTags ¶
func (t *TranslationRepo) GetLastViewsByTags(authorID, langID string, pageSize, page int, tagIds []string) (query.LastTranslationViews, error)
func (*TranslationRepo) GetLastViewsByTargetPart ¶
func (t *TranslationRepo) GetLastViewsByTargetPart(authorID, langID, targetPart string, pageSize, page int) (query.LastTranslationViews, error)
func (*TranslationRepo) GetRandomViews ¶
func (t *TranslationRepo) GetRandomViews(authorID, langID string, tagIds []string, limit int) (query.RandomViews, error)
func (*TranslationRepo) GetView ¶
func (t *TranslationRepo) GetView(id, authorID string) (query.TranslationView, error)
func (*TranslationRepo) Update ¶
func (t *TranslationRepo) Update(record *translation.Translation) error
Click to show internal directories.
Click to hide internal directories.