deepl

package
v0.0.0-...-3420d2a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

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

func (t DeepLEngine) SupportedTargetLanguages(srcLang language.Tag) ([]language.Tag, error)

func (DeepLEngine) Translate

func (t DeepLEngine) Translate(ctx context.Context, srcLang language.Tag, tgtLang language.Tag, src string) (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL