deepl

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2022 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RequestResponse

type RequestResponse struct {
	Translations []RequestResponseTranslation
}

type RequestResponseTranslation

type RequestResponseTranslation struct {
	DetectedSourceLanguage string `json:"detected_source_language"`
	Text                   string `json:"text"`
}

type RequestUsage

type RequestUsage struct {
	CharacterCount int64 `json:"character_count"`
	CharacterLimit int64 `json:"character_limit"`
}

type TranslationService

type TranslationService struct {
	Endpoint string
	ApiKey   string
}

func (TranslationService) Name

func (d TranslationService) Name() string

func (TranslationService) Translate

func (d TranslationService) Translate(text string, source string, target string) (backend.TranslationResponse, error)

func (TranslationService) Usage

Jump to

Keyboard shortcuts

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