gdeeplx

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2023 License: MIT Imports: 12 Imported by: 2

README

gdeeplx

Documentation

Overview

* @Author: Vincent Young * @Date: 2023-07-23 19:57:34 * @LastEditors: Vincent Young * @LastEditTime: 2023-07-23 20:16:27 * @FilePath: /gdeeplx/gdeeplx.go * @Telegram: https://t.me/missuo * * Copyright © 2023 by Vincent, All Rights Reserved.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Translate

func Translate(translateText string, sourceLang string, targetLang string, numberAlternative int) (interface{}, error)

Types

type CommonJobParams

type CommonJobParams struct {
	WasSpoken    bool   `json:"wasSpoken"`
	TranscribeAS string `json:"transcribe_as"`
}

type Lang

type Lang struct {
	SourceLangUserSelected string `json:"source_lang_user_selected"`
	TargetLang             string `json:"target_lang"`
}

type Params

type Params struct {
	Texts           []Text          `json:"texts"`
	Splitting       string          `json:"splitting"`
	Lang            Lang            `json:"lang"`
	Timestamp       int64           `json:"timestamp"`
	CommonJobParams CommonJobParams `json:"commonJobParams"`
}

type PostData

type PostData struct {
	Jsonrpc string `json:"jsonrpc"`
	Method  string `json:"method"`
	ID      int64  `json:"id"`
	Params  Params `json:"params"`
}

type ResData

type ResData struct {
	TransText  string `json:"text"`
	SourceLang string `json:"source_lang"`
	TargetLang string `json:"target_lang"`
}

type Text

type Text struct {
	Text                string `json:"text"`
	RequestAlternatives int    `json:"requestAlternatives"`
}

Jump to

Keyboard shortcuts

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