Documentation ¶
Index ¶
- type DeepLAPIClient
- type DeepLEngine
- func (t DeepLEngine) IsSourceSizeOK(src string) bool
- func (t *DeepLEngine) LoadConfig(conf config.Config) error
- func (t DeepLEngine) Name() string
- func (t *DeepLEngine) SetEndpoint(endpoint string) error
- func (t DeepLEngine) SupportedSourceLanguages() ([]language.Tag, error)
- func (t DeepLEngine) SupportedTargetLanguages(srcLang language.Tag) ([]language.Tag, error)
- func (t DeepLEngine) Translate(ctx context.Context, srcLang language.Tag, tgtLang language.Tag, src string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeepLAPIClient ¶
type DeepLAPIClient interface {
TranslateTextWithFormdataBodyWithResponse(ctx context.Context, body deepl.TranslateTextFormdataRequestBody, reqEditors ...deepl.RequestEditorFn) (*deepl.TranslateTextResponse, error)
}
type DeepLEngine ¶
type DeepLEngine struct { ServerURL string // contains filtered or unexported fields }
func (DeepLEngine) IsSourceSizeOK ¶
func (t DeepLEngine) IsSourceSizeOK(src string) bool
func (*DeepLEngine) LoadConfig ¶
func (t *DeepLEngine) LoadConfig(conf config.Config) error
func (DeepLEngine) Name ¶
func (t DeepLEngine) Name() string
func (*DeepLEngine) SetEndpoint ¶
func (t *DeepLEngine) SetEndpoint(endpoint string) error
func (DeepLEngine) SupportedSourceLanguages ¶
func (t DeepLEngine) SupportedSourceLanguages() ([]language.Tag, error)
func (DeepLEngine) SupportedTargetLanguages ¶
Click to show internal directories.
Click to hide internal directories.