Documentation ¶
Index ¶
- type AzureTranslationClient
- type AzureTranslationRepository
- func (_m *AzureTranslationRepository) Add(ctx context.Context, lang2 domain.Lang2, text string, ...) error
- func (_m *AzureTranslationRepository) Contain(ctx context.Context, lang2 domain.Lang2, text string) (bool, error)
- func (_m *AzureTranslationRepository) Find(ctx context.Context, lang2 domain.Lang2, text string) ([]service.AzureTranslation, error)
- func (_m *AzureTranslationRepository) FindByFirstLetter(ctx context.Context, lang2 domain.Lang2, firstLetter string) ([]domain.Translation, error)
- func (_m *AzureTranslationRepository) FindByText(ctx context.Context, lang2 domain.Lang2, text string) ([]domain.Translation, error)
- func (_m *AzureTranslationRepository) FindByTextAndPos(ctx context.Context, lang2 domain.Lang2, text string, pos domain.WordPos) (domain.Translation, error)
- type CustomTranslationRepository
- func (_m *CustomTranslationRepository) Add(ctx context.Context, param service.TranslationAddParameter) error
- func (_m *CustomTranslationRepository) Contain(ctx context.Context, lang2 domain.Lang2, text string) (bool, error)
- func (_m *CustomTranslationRepository) FindByFirstLetter(ctx context.Context, lang2 domain.Lang2, firstLetter string) ([]domain.Translation, error)
- func (_m *CustomTranslationRepository) FindByText(ctx context.Context, lang2 domain.Lang2, text string) ([]domain.Translation, error)
- func (_m *CustomTranslationRepository) FindByTextAndPos(ctx context.Context, lang2 domain.Lang2, text string, pos domain.WordPos) (domain.Translation, error)
- func (_m *CustomTranslationRepository) Remove(ctx context.Context, lang2 domain.Lang2, text string, pos domain.WordPos) error
- func (_m *CustomTranslationRepository) Update(ctx context.Context, lang2 domain.Lang2, text string, pos domain.WordPos, ...) error
- type RepositoryFactory
- type TranslationUpdateParameter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AzureTranslationClient ¶
AzureTranslationClient is an autogenerated mock type for the AzureTranslationClient type
func NewAzureTranslationClient ¶
func NewAzureTranslationClient(t testing.TB) *AzureTranslationClient
NewAzureTranslationClient creates a new instance of AzureTranslationClient. It also registers a cleanup function to assert the mocks expectations.
func (*AzureTranslationClient) DictionaryLookup ¶
func (_m *AzureTranslationClient) DictionaryLookup(ctx context.Context, text string, fromLang domain.Lang2, toLang domain.Lang2) ([]service.AzureTranslation, error)
DictionaryLookup provides a mock function with given fields: ctx, text, fromLang, toLang
type AzureTranslationRepository ¶
AzureTranslationRepository is an autogenerated mock type for the AzureTranslationRepository type
func NewAzureTranslationRepository ¶
func NewAzureTranslationRepository(t testing.TB) *AzureTranslationRepository
NewAzureTranslationRepository creates a new instance of AzureTranslationRepository. It also registers a cleanup function to assert the mocks expectations.
func (*AzureTranslationRepository) Add ¶
func (_m *AzureTranslationRepository) Add(ctx context.Context, lang2 domain.Lang2, text string, result []service.AzureTranslation) error
Add provides a mock function with given fields: ctx, lang2, text, result
func (*AzureTranslationRepository) Contain ¶
func (_m *AzureTranslationRepository) Contain(ctx context.Context, lang2 domain.Lang2, text string) (bool, error)
Contain provides a mock function with given fields: ctx, lang2, text
func (*AzureTranslationRepository) Find ¶
func (_m *AzureTranslationRepository) Find(ctx context.Context, lang2 domain.Lang2, text string) ([]service.AzureTranslation, error)
Find provides a mock function with given fields: ctx, lang2, text
func (*AzureTranslationRepository) FindByFirstLetter ¶
func (_m *AzureTranslationRepository) FindByFirstLetter(ctx context.Context, lang2 domain.Lang2, firstLetter string) ([]domain.Translation, error)
FindByFirstLetter provides a mock function with given fields: ctx, lang2, firstLetter
func (*AzureTranslationRepository) FindByText ¶
func (_m *AzureTranslationRepository) FindByText(ctx context.Context, lang2 domain.Lang2, text string) ([]domain.Translation, error)
FindByText provides a mock function with given fields: ctx, lang2, text
func (*AzureTranslationRepository) FindByTextAndPos ¶
func (_m *AzureTranslationRepository) FindByTextAndPos(ctx context.Context, lang2 domain.Lang2, text string, pos domain.WordPos) (domain.Translation, error)
FindByTextAndPos provides a mock function with given fields: ctx, lang2, text, pos
type CustomTranslationRepository ¶
CustomTranslationRepository is an autogenerated mock type for the CustomTranslationRepository type
func NewCustomTranslationRepository ¶
func NewCustomTranslationRepository(t testing.TB) *CustomTranslationRepository
NewCustomTranslationRepository creates a new instance of CustomTranslationRepository. It also registers a cleanup function to assert the mocks expectations.
func (*CustomTranslationRepository) Add ¶
func (_m *CustomTranslationRepository) Add(ctx context.Context, param service.TranslationAddParameter) error
Add provides a mock function with given fields: ctx, param
func (*CustomTranslationRepository) Contain ¶
func (_m *CustomTranslationRepository) Contain(ctx context.Context, lang2 domain.Lang2, text string) (bool, error)
Contain provides a mock function with given fields: ctx, lang2, text
func (*CustomTranslationRepository) FindByFirstLetter ¶
func (_m *CustomTranslationRepository) FindByFirstLetter(ctx context.Context, lang2 domain.Lang2, firstLetter string) ([]domain.Translation, error)
FindByFirstLetter provides a mock function with given fields: ctx, lang2, firstLetter
func (*CustomTranslationRepository) FindByText ¶
func (_m *CustomTranslationRepository) FindByText(ctx context.Context, lang2 domain.Lang2, text string) ([]domain.Translation, error)
FindByText provides a mock function with given fields: ctx, lang2, text
func (*CustomTranslationRepository) FindByTextAndPos ¶
func (_m *CustomTranslationRepository) FindByTextAndPos(ctx context.Context, lang2 domain.Lang2, text string, pos domain.WordPos) (domain.Translation, error)
FindByTextAndPos provides a mock function with given fields: ctx, lang2, text, pos
type RepositoryFactory ¶
RepositoryFactory is an autogenerated mock type for the RepositoryFactory type
func NewRepositoryFactory ¶
func NewRepositoryFactory(t testing.TB) *RepositoryFactory
NewRepositoryFactory creates a new instance of RepositoryFactory. It also registers a cleanup function to assert the mocks expectations.
func (*RepositoryFactory) NewAzureTranslationRepository ¶
func (_m *RepositoryFactory) NewAzureTranslationRepository(ctx context.Context) service.AzureTranslationRepository
NewAzureTranslationRepository provides a mock function with given fields: ctx
func (*RepositoryFactory) NewCustomTranslationRepository ¶
func (_m *RepositoryFactory) NewCustomTranslationRepository(ctx context.Context) service.CustomTranslationRepository
NewCustomTranslationRepository provides a mock function with given fields: ctx
type TranslationUpdateParameter ¶
TranslationUpdateParameter is an autogenerated mock type for the TranslationUpdateParameter type
func NewTranslationUpdateParameter ¶
func NewTranslationUpdateParameter(t testing.TB) *TranslationUpdateParameter
NewTranslationUpdateParameter creates a new instance of TranslationUpdateParameter. It also registers a cleanup function to assert the mocks expectations.
func (*TranslationUpdateParameter) GetTranslated ¶
func (_m *TranslationUpdateParameter) GetTranslated() string
GetTranslated provides a mock function with given fields: