larktranslation

package
v3.0.0-beta-6 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 License: MIT Imports: 3 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DetectTextPathReqBodyBuilder

type DetectTextPathReqBodyBuilder struct {
	// contains filtered or unexported fields
}

上传文件path开始

func NewDetectTextPathReqBodyBuilder

func NewDetectTextPathReqBodyBuilder() *DetectTextPathReqBodyBuilder

func (*DetectTextPathReqBodyBuilder) Build

func (*DetectTextPathReqBodyBuilder) Text

type DetectTextReq

type DetectTextReq struct {
	Body *DetectTextReqBody `body:""`
	// contains filtered or unexported fields
}

type DetectTextReqBody

type DetectTextReqBody struct {
	Text *string `json:"text,omitempty"`
}

type DetectTextReqBodyBuilder

type DetectTextReqBodyBuilder struct {
	// contains filtered or unexported fields
}

func NewDetectTextReqBodyBuilder

func NewDetectTextReqBodyBuilder() *DetectTextReqBodyBuilder

生成body的New构造器

func (*DetectTextReqBodyBuilder) Build

func (builder *DetectTextReqBodyBuilder) Build() *DetectTextReqBody

1.3 生成body的build方法

func (*DetectTextReqBodyBuilder) Text

1.2 生成body的builder属性方法

type DetectTextReqBuilder

type DetectTextReqBuilder struct {
	// contains filtered or unexported fields
}

1.4 生成请求的builder结构体

func NewDetectTextReqBuilder

func NewDetectTextReqBuilder() *DetectTextReqBuilder

生成请求的New构造器

func (*DetectTextReqBuilder) Body

1.5 生成请求的builder属性方法

func (*DetectTextReqBuilder) Build

func (builder *DetectTextReqBuilder) Build() *DetectTextReq

1.5 生成请求的builder的build方法

type DetectTextResp

type DetectTextResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *DetectTextRespData `json:"data"`
}

func (*DetectTextResp) Success

func (resp *DetectTextResp) Success() bool

type DetectTextRespData

type DetectTextRespData struct {
	Language *string `json:"language,omitempty"`
}

type Term

type Term struct {
	From *string `json:"from,omitempty"`
	To   *string `json:"to,omitempty"`
}

type TermBuilder

type TermBuilder struct {
	// contains filtered or unexported fields
}

builder开始

func NewTermBuilder

func NewTermBuilder() *TermBuilder

func (*TermBuilder) Build

func (builder *TermBuilder) Build() *Term

func (*TermBuilder) From

func (builder *TermBuilder) From(from string) *TermBuilder

func (*TermBuilder) To

func (builder *TermBuilder) To(to string) *TermBuilder

type Text

type Text struct {
}

type TranslateTextPathReqBodyBuilder

type TranslateTextPathReqBodyBuilder struct {
	// contains filtered or unexported fields
}

上传文件path开始

func NewTranslateTextPathReqBodyBuilder

func NewTranslateTextPathReqBodyBuilder() *TranslateTextPathReqBodyBuilder

func (*TranslateTextPathReqBodyBuilder) Build

func (*TranslateTextPathReqBodyBuilder) Glossary

func (*TranslateTextPathReqBodyBuilder) SourceLanguage

func (builder *TranslateTextPathReqBodyBuilder) SourceLanguage(sourceLanguage string) *TranslateTextPathReqBodyBuilder

func (*TranslateTextPathReqBodyBuilder) TargetLanguage

func (builder *TranslateTextPathReqBodyBuilder) TargetLanguage(targetLanguage string) *TranslateTextPathReqBodyBuilder

func (*TranslateTextPathReqBodyBuilder) Text

type TranslateTextReq

type TranslateTextReq struct {
	Body *TranslateTextReqBody `body:""`
	// contains filtered or unexported fields
}

type TranslateTextReqBody

type TranslateTextReqBody struct {
	SourceLanguage *string `json:"source_language,omitempty"`
	Text           *string `json:"text,omitempty"`
	TargetLanguage *string `json:"target_language,omitempty"`
	Glossary       []*Term `json:"glossary,omitempty"`
}

type TranslateTextReqBodyBuilder

type TranslateTextReqBodyBuilder struct {
	// contains filtered or unexported fields
}

func NewTranslateTextReqBodyBuilder

func NewTranslateTextReqBodyBuilder() *TranslateTextReqBodyBuilder

生成body的New构造器

func (*TranslateTextReqBodyBuilder) Build

1.3 生成body的build方法

func (*TranslateTextReqBodyBuilder) Glossary

func (builder *TranslateTextReqBodyBuilder) Glossary(glossary []*Term) *TranslateTextReqBodyBuilder

func (*TranslateTextReqBodyBuilder) SourceLanguage

func (builder *TranslateTextReqBodyBuilder) SourceLanguage(sourceLanguage string) *TranslateTextReqBodyBuilder

1.2 生成body的builder属性方法

func (*TranslateTextReqBodyBuilder) TargetLanguage

func (builder *TranslateTextReqBodyBuilder) TargetLanguage(targetLanguage string) *TranslateTextReqBodyBuilder

func (*TranslateTextReqBodyBuilder) Text

type TranslateTextReqBuilder

type TranslateTextReqBuilder struct {
	// contains filtered or unexported fields
}

1.4 生成请求的builder结构体

func NewTranslateTextReqBuilder

func NewTranslateTextReqBuilder() *TranslateTextReqBuilder

生成请求的New构造器

func (*TranslateTextReqBuilder) Body

1.5 生成请求的builder属性方法

func (*TranslateTextReqBuilder) Build

func (builder *TranslateTextReqBuilder) Build() *TranslateTextReq

1.5 生成请求的builder的build方法

type TranslateTextResp

type TranslateTextResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *TranslateTextRespData `json:"data"`
}

func (*TranslateTextResp) Success

func (resp *TranslateTextResp) Success() bool

type TranslateTextRespData

type TranslateTextRespData struct {
	Text *string `json:"text,omitempty"`
}

type TranslationService

type TranslationService struct {
	Text *text
	// contains filtered or unexported fields
}

业务域服务定义

func NewService

func NewService(config *larkcore.Config) *TranslationService

构建业务域服务实例

Jump to

Keyboard shortcuts

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