Documentation
¶
Overview ¶
Package usecase implements application business logic. Each logic group in own file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Translation ¶
type Translation interface {
Translate(context.Context, entity.Translation) (entity.Translation, error)
History(context.Context) ([]entity.Translation, error)
}
type TranslationRepo ¶
type TranslationRepo interface {
Store(context.Context, entity.Translation) error
GetHistory(context.Context) ([]entity.Translation, error)
}
type TranslationUseCase ¶
type TranslationUseCase struct {
// contains filtered or unexported fields
}
func New ¶
func New(r TranslationRepo, w TranslationWebAPI) *TranslationUseCase
func (*TranslationUseCase) History ¶
func (uc *TranslationUseCase) History(ctx context.Context) ([]entity.Translation, error)
func (*TranslationUseCase) Translate ¶
func (uc *TranslationUseCase) Translate(ctx context.Context, t entity.Translation) (entity.Translation, error)
type TranslationWebAPI ¶
type TranslationWebAPI interface {
Translate(entity.Translation) (entity.Translation, error)
}
Click to show internal directories.
Click to hide internal directories.