translate

package
v0.0.0-...-20002e4 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KitexUnusedProtection = struct{}{}

KitexUnusedProtection is used to prevent 'imported and not used' error.

Functions

This section is empty.

Types

type DetectLanguageReq

type DetectLanguageReq struct {
	SourceText string                `thrift:"SourceText,1" frugal:"1,default,string" json:"SourceText"`
	Type       TranslatePlatformType `thrift:"type,2" frugal:"2,default,TranslatePlatformType" json:"type"`
}
var TranslateServiceDetectLanguageArgs_Req_DEFAULT *DetectLanguageReq

func NewDetectLanguageReq

func NewDetectLanguageReq() *DetectLanguageReq

func (*DetectLanguageReq) BLength

func (p *DetectLanguageReq) BLength() int

func (*DetectLanguageReq) DeepEqual

func (p *DetectLanguageReq) DeepEqual(ano *DetectLanguageReq) bool

func (*DetectLanguageReq) FastRead

func (p *DetectLanguageReq) FastRead(buf []byte) (int, error)

func (*DetectLanguageReq) FastReadField1

func (p *DetectLanguageReq) FastReadField1(buf []byte) (int, error)

func (*DetectLanguageReq) FastReadField2

func (p *DetectLanguageReq) FastReadField2(buf []byte) (int, error)

func (*DetectLanguageReq) FastWrite

func (p *DetectLanguageReq) FastWrite(buf []byte) int

for compatibility

func (*DetectLanguageReq) FastWriteNocopy

func (p *DetectLanguageReq) FastWriteNocopy(buf []byte, binaryWriter bthrift.BinaryWriter) int

func (*DetectLanguageReq) Field1DeepEqual

func (p *DetectLanguageReq) Field1DeepEqual(src string) bool

func (*DetectLanguageReq) Field2DeepEqual

func (p *DetectLanguageReq) Field2DeepEqual(src TranslatePlatformType) bool

func (*DetectLanguageReq) GetSourceText

func (p *DetectLanguageReq) GetSourceText() (v string)

func (*DetectLanguageReq) GetType

func (p *DetectLanguageReq) GetType() (v TranslatePlatformType)

func (*DetectLanguageReq) InitDefault

func (p *DetectLanguageReq) InitDefault()

func (*DetectLanguageReq) Read

func (p *DetectLanguageReq) Read(iprot thrift.TProtocol) (err error)

func (*DetectLanguageReq) ReadField1

func (p *DetectLanguageReq) ReadField1(iprot thrift.TProtocol) error

func (*DetectLanguageReq) ReadField2

func (p *DetectLanguageReq) ReadField2(iprot thrift.TProtocol) error

func (*DetectLanguageReq) SetSourceText

func (p *DetectLanguageReq) SetSourceText(val string)

func (*DetectLanguageReq) SetType

func (p *DetectLanguageReq) SetType(val TranslatePlatformType)

func (*DetectLanguageReq) String

func (p *DetectLanguageReq) String() string

func (*DetectLanguageReq) Write

func (p *DetectLanguageReq) Write(oprot thrift.TProtocol) (err error)

type DetectLanguageResp

type DetectLanguageResp struct {
	DetectedLanguage string `thrift:"DetectedLanguage,1" frugal:"1,default,string" json:"DetectedLanguage"`
}
var TranslateServiceDetectLanguageResult_Success_DEFAULT *DetectLanguageResp

func NewDetectLanguageResp

func NewDetectLanguageResp() *DetectLanguageResp

func (*DetectLanguageResp) BLength

func (p *DetectLanguageResp) BLength() int

func (*DetectLanguageResp) DeepEqual

func (p *DetectLanguageResp) DeepEqual(ano *DetectLanguageResp) bool

func (*DetectLanguageResp) FastRead

func (p *DetectLanguageResp) FastRead(buf []byte) (int, error)

func (*DetectLanguageResp) FastReadField1

func (p *DetectLanguageResp) FastReadField1(buf []byte) (int, error)

func (*DetectLanguageResp) FastWrite

func (p *DetectLanguageResp) FastWrite(buf []byte) int

for compatibility

func (*DetectLanguageResp) FastWriteNocopy

func (p *DetectLanguageResp) FastWriteNocopy(buf []byte, binaryWriter bthrift.BinaryWriter) int

func (*DetectLanguageResp) Field1DeepEqual

func (p *DetectLanguageResp) Field1DeepEqual(src string) bool

func (*DetectLanguageResp) GetDetectedLanguage

func (p *DetectLanguageResp) GetDetectedLanguage() (v string)

func (*DetectLanguageResp) InitDefault

func (p *DetectLanguageResp) InitDefault()

func (*DetectLanguageResp) Read

func (p *DetectLanguageResp) Read(iprot thrift.TProtocol) (err error)

func (*DetectLanguageResp) ReadField1

func (p *DetectLanguageResp) ReadField1(iprot thrift.TProtocol) error

func (*DetectLanguageResp) SetDetectedLanguage

func (p *DetectLanguageResp) SetDetectedLanguage(val string)

func (*DetectLanguageResp) String

func (p *DetectLanguageResp) String() string

func (*DetectLanguageResp) Write

func (p *DetectLanguageResp) Write(oprot thrift.TProtocol) (err error)

type TranslatePlatformType

type TranslatePlatformType int64
const (
	TranslatePlatformType_UNKNOWN TranslatePlatformType = 0
	TranslatePlatformType_ALI_YUN TranslatePlatformType = 1
)

func TranslatePlatformTypeFromString

func TranslatePlatformTypeFromString(s string) (TranslatePlatformType, error)

func (*TranslatePlatformType) Scan

func (p *TranslatePlatformType) Scan(value interface{}) (err error)

func (TranslatePlatformType) String

func (p TranslatePlatformType) String() string

func (*TranslatePlatformType) Value

func (p *TranslatePlatformType) Value() (driver.Value, error)

type TranslateReq

type TranslateReq struct {
	SourceText     string                `thrift:"SourceText,1" frugal:"1,default,string" json:"SourceText"`
	SourceLanguage string                `thrift:"SourceLanguage,2" frugal:"2,default,string" json:"SourceLanguage"`
	TargetLanguage string                `thrift:"TargetLanguage,3" frugal:"3,default,string" json:"TargetLanguage"`
	Type           TranslatePlatformType `thrift:"type,4" frugal:"4,default,TranslatePlatformType" json:"type"`
}
var TranslateServiceTranslateArgs_Req_DEFAULT *TranslateReq

func NewTranslateReq

func NewTranslateReq() *TranslateReq

func (*TranslateReq) BLength

func (p *TranslateReq) BLength() int

func (*TranslateReq) DeepEqual

func (p *TranslateReq) DeepEqual(ano *TranslateReq) bool

func (*TranslateReq) FastRead

func (p *TranslateReq) FastRead(buf []byte) (int, error)

func (*TranslateReq) FastReadField1

func (p *TranslateReq) FastReadField1(buf []byte) (int, error)

func (*TranslateReq) FastReadField2

func (p *TranslateReq) FastReadField2(buf []byte) (int, error)

func (*TranslateReq) FastReadField3

func (p *TranslateReq) FastReadField3(buf []byte) (int, error)

func (*TranslateReq) FastReadField4

func (p *TranslateReq) FastReadField4(buf []byte) (int, error)

func (*TranslateReq) FastWrite

func (p *TranslateReq) FastWrite(buf []byte) int

for compatibility

func (*TranslateReq) FastWriteNocopy

func (p *TranslateReq) FastWriteNocopy(buf []byte, binaryWriter bthrift.BinaryWriter) int

func (*TranslateReq) Field1DeepEqual

func (p *TranslateReq) Field1DeepEqual(src string) bool

func (*TranslateReq) Field2DeepEqual

func (p *TranslateReq) Field2DeepEqual(src string) bool

func (*TranslateReq) Field3DeepEqual

func (p *TranslateReq) Field3DeepEqual(src string) bool

func (*TranslateReq) Field4DeepEqual

func (p *TranslateReq) Field4DeepEqual(src TranslatePlatformType) bool

func (*TranslateReq) GetSourceLanguage

func (p *TranslateReq) GetSourceLanguage() (v string)

func (*TranslateReq) GetSourceText

func (p *TranslateReq) GetSourceText() (v string)

func (*TranslateReq) GetTargetLanguage

func (p *TranslateReq) GetTargetLanguage() (v string)

func (*TranslateReq) GetType

func (p *TranslateReq) GetType() (v TranslatePlatformType)

func (*TranslateReq) InitDefault

func (p *TranslateReq) InitDefault()

func (*TranslateReq) Read

func (p *TranslateReq) Read(iprot thrift.TProtocol) (err error)

func (*TranslateReq) ReadField1

func (p *TranslateReq) ReadField1(iprot thrift.TProtocol) error

func (*TranslateReq) ReadField2

func (p *TranslateReq) ReadField2(iprot thrift.TProtocol) error

func (*TranslateReq) ReadField3

func (p *TranslateReq) ReadField3(iprot thrift.TProtocol) error

func (*TranslateReq) ReadField4

func (p *TranslateReq) ReadField4(iprot thrift.TProtocol) error

func (*TranslateReq) SetSourceLanguage

func (p *TranslateReq) SetSourceLanguage(val string)

func (*TranslateReq) SetSourceText

func (p *TranslateReq) SetSourceText(val string)

func (*TranslateReq) SetTargetLanguage

func (p *TranslateReq) SetTargetLanguage(val string)

func (*TranslateReq) SetType

func (p *TranslateReq) SetType(val TranslatePlatformType)

func (*TranslateReq) String

func (p *TranslateReq) String() string

func (*TranslateReq) Write

func (p *TranslateReq) Write(oprot thrift.TProtocol) (err error)

type TranslateResp

type TranslateResp struct {
	TranslateResult_ string `thrift:"translateResult,1" frugal:"1,default,string" json:"translateResult"`
}
var TranslateServiceTranslateResult_Success_DEFAULT *TranslateResp

func NewTranslateResp

func NewTranslateResp() *TranslateResp

func (*TranslateResp) BLength

func (p *TranslateResp) BLength() int

func (*TranslateResp) DeepEqual

func (p *TranslateResp) DeepEqual(ano *TranslateResp) bool

func (*TranslateResp) FastRead

func (p *TranslateResp) FastRead(buf []byte) (int, error)

func (*TranslateResp) FastReadField1

func (p *TranslateResp) FastReadField1(buf []byte) (int, error)

func (*TranslateResp) FastWrite

func (p *TranslateResp) FastWrite(buf []byte) int

for compatibility

func (*TranslateResp) FastWriteNocopy

func (p *TranslateResp) FastWriteNocopy(buf []byte, binaryWriter bthrift.BinaryWriter) int

func (*TranslateResp) Field1DeepEqual

func (p *TranslateResp) Field1DeepEqual(src string) bool

func (*TranslateResp) GetTranslateResult_

func (p *TranslateResp) GetTranslateResult_() (v string)

func (*TranslateResp) InitDefault

func (p *TranslateResp) InitDefault()

func (*TranslateResp) Read

func (p *TranslateResp) Read(iprot thrift.TProtocol) (err error)

func (*TranslateResp) ReadField1

func (p *TranslateResp) ReadField1(iprot thrift.TProtocol) error

func (*TranslateResp) SetTranslateResult_

func (p *TranslateResp) SetTranslateResult_(val string)

func (*TranslateResp) String

func (p *TranslateResp) String() string

func (*TranslateResp) Write

func (p *TranslateResp) Write(oprot thrift.TProtocol) (err error)

type TranslateService

type TranslateService interface {
	DetectLanguage(ctx context.Context, req *DetectLanguageReq) (r *DetectLanguageResp, err error)

	Translate(ctx context.Context, req *TranslateReq) (r *TranslateResp, err error)
}

type TranslateServiceClient

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

func NewTranslateServiceClient

func NewTranslateServiceClient(c thrift.TClient) *TranslateServiceClient

func NewTranslateServiceClientProtocol

func NewTranslateServiceClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *TranslateServiceClient

func (*TranslateServiceClient) Client_

func (p *TranslateServiceClient) Client_() thrift.TClient

func (*TranslateServiceClient) DetectLanguage

func (p *TranslateServiceClient) DetectLanguage(ctx context.Context, req *DetectLanguageReq) (r *DetectLanguageResp, err error)

func (*TranslateServiceClient) Translate

func (p *TranslateServiceClient) Translate(ctx context.Context, req *TranslateReq) (r *TranslateResp, err error)

type TranslateServiceDetectLanguageArgs

type TranslateServiceDetectLanguageArgs struct {
	Req *DetectLanguageReq `thrift:"req,1" frugal:"1,default,DetectLanguageReq" json:"req"`
}

func NewTranslateServiceDetectLanguageArgs

func NewTranslateServiceDetectLanguageArgs() *TranslateServiceDetectLanguageArgs

func (*TranslateServiceDetectLanguageArgs) BLength

func (*TranslateServiceDetectLanguageArgs) DeepEqual

func (*TranslateServiceDetectLanguageArgs) FastRead

func (p *TranslateServiceDetectLanguageArgs) FastRead(buf []byte) (int, error)

func (*TranslateServiceDetectLanguageArgs) FastReadField1

func (p *TranslateServiceDetectLanguageArgs) FastReadField1(buf []byte) (int, error)

func (*TranslateServiceDetectLanguageArgs) FastWrite

func (p *TranslateServiceDetectLanguageArgs) FastWrite(buf []byte) int

for compatibility

func (*TranslateServiceDetectLanguageArgs) FastWriteNocopy

func (p *TranslateServiceDetectLanguageArgs) FastWriteNocopy(buf []byte, binaryWriter bthrift.BinaryWriter) int

func (*TranslateServiceDetectLanguageArgs) Field1DeepEqual

func (*TranslateServiceDetectLanguageArgs) GetFirstArgument

func (p *TranslateServiceDetectLanguageArgs) GetFirstArgument() interface{}

func (*TranslateServiceDetectLanguageArgs) GetReq

func (*TranslateServiceDetectLanguageArgs) InitDefault

func (p *TranslateServiceDetectLanguageArgs) InitDefault()

func (*TranslateServiceDetectLanguageArgs) IsSetReq

func (*TranslateServiceDetectLanguageArgs) Read

func (*TranslateServiceDetectLanguageArgs) ReadField1

func (*TranslateServiceDetectLanguageArgs) SetReq

func (*TranslateServiceDetectLanguageArgs) String

func (*TranslateServiceDetectLanguageArgs) Write

type TranslateServiceDetectLanguageResult

type TranslateServiceDetectLanguageResult struct {
	Success *DetectLanguageResp `thrift:"success,0,optional" frugal:"0,optional,DetectLanguageResp" json:"success,omitempty"`
}

func NewTranslateServiceDetectLanguageResult

func NewTranslateServiceDetectLanguageResult() *TranslateServiceDetectLanguageResult

func (*TranslateServiceDetectLanguageResult) BLength

func (*TranslateServiceDetectLanguageResult) DeepEqual

func (*TranslateServiceDetectLanguageResult) FastRead

func (p *TranslateServiceDetectLanguageResult) FastRead(buf []byte) (int, error)

func (*TranslateServiceDetectLanguageResult) FastReadField0

func (p *TranslateServiceDetectLanguageResult) FastReadField0(buf []byte) (int, error)

func (*TranslateServiceDetectLanguageResult) FastWrite

func (p *TranslateServiceDetectLanguageResult) FastWrite(buf []byte) int

for compatibility

func (*TranslateServiceDetectLanguageResult) FastWriteNocopy

func (p *TranslateServiceDetectLanguageResult) FastWriteNocopy(buf []byte, binaryWriter bthrift.BinaryWriter) int

func (*TranslateServiceDetectLanguageResult) Field0DeepEqual

func (*TranslateServiceDetectLanguageResult) GetResult

func (p *TranslateServiceDetectLanguageResult) GetResult() interface{}

func (*TranslateServiceDetectLanguageResult) GetSuccess

func (*TranslateServiceDetectLanguageResult) InitDefault

func (p *TranslateServiceDetectLanguageResult) InitDefault()

func (*TranslateServiceDetectLanguageResult) IsSetSuccess

func (p *TranslateServiceDetectLanguageResult) IsSetSuccess() bool

func (*TranslateServiceDetectLanguageResult) Read

func (*TranslateServiceDetectLanguageResult) ReadField0

func (*TranslateServiceDetectLanguageResult) SetSuccess

func (p *TranslateServiceDetectLanguageResult) SetSuccess(x interface{})

func (*TranslateServiceDetectLanguageResult) String

func (*TranslateServiceDetectLanguageResult) Write

type TranslateServiceProcessor

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

func NewTranslateServiceProcessor

func NewTranslateServiceProcessor(handler TranslateService) *TranslateServiceProcessor

func (*TranslateServiceProcessor) AddToProcessorMap

func (p *TranslateServiceProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction)

func (*TranslateServiceProcessor) GetProcessorFunction

func (p *TranslateServiceProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool)

func (*TranslateServiceProcessor) Process

func (p *TranslateServiceProcessor) Process(ctx context.Context, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException)

func (*TranslateServiceProcessor) ProcessorMap

type TranslateServiceTranslateArgs

type TranslateServiceTranslateArgs struct {
	Req *TranslateReq `thrift:"req,1" frugal:"1,default,TranslateReq" json:"req"`
}

func NewTranslateServiceTranslateArgs

func NewTranslateServiceTranslateArgs() *TranslateServiceTranslateArgs

func (*TranslateServiceTranslateArgs) BLength

func (p *TranslateServiceTranslateArgs) BLength() int

func (*TranslateServiceTranslateArgs) DeepEqual

func (*TranslateServiceTranslateArgs) FastRead

func (p *TranslateServiceTranslateArgs) FastRead(buf []byte) (int, error)

func (*TranslateServiceTranslateArgs) FastReadField1

func (p *TranslateServiceTranslateArgs) FastReadField1(buf []byte) (int, error)

func (*TranslateServiceTranslateArgs) FastWrite

func (p *TranslateServiceTranslateArgs) FastWrite(buf []byte) int

for compatibility

func (*TranslateServiceTranslateArgs) FastWriteNocopy

func (p *TranslateServiceTranslateArgs) FastWriteNocopy(buf []byte, binaryWriter bthrift.BinaryWriter) int

func (*TranslateServiceTranslateArgs) Field1DeepEqual

func (p *TranslateServiceTranslateArgs) Field1DeepEqual(src *TranslateReq) bool

func (*TranslateServiceTranslateArgs) GetFirstArgument

func (p *TranslateServiceTranslateArgs) GetFirstArgument() interface{}

func (*TranslateServiceTranslateArgs) GetReq

func (*TranslateServiceTranslateArgs) InitDefault

func (p *TranslateServiceTranslateArgs) InitDefault()

func (*TranslateServiceTranslateArgs) IsSetReq

func (p *TranslateServiceTranslateArgs) IsSetReq() bool

func (*TranslateServiceTranslateArgs) Read

func (p *TranslateServiceTranslateArgs) Read(iprot thrift.TProtocol) (err error)

func (*TranslateServiceTranslateArgs) ReadField1

func (p *TranslateServiceTranslateArgs) ReadField1(iprot thrift.TProtocol) error

func (*TranslateServiceTranslateArgs) SetReq

func (*TranslateServiceTranslateArgs) String

func (*TranslateServiceTranslateArgs) Write

func (p *TranslateServiceTranslateArgs) Write(oprot thrift.TProtocol) (err error)

type TranslateServiceTranslateResult

type TranslateServiceTranslateResult struct {
	Success *TranslateResp `thrift:"success,0,optional" frugal:"0,optional,TranslateResp" json:"success,omitempty"`
}

func NewTranslateServiceTranslateResult

func NewTranslateServiceTranslateResult() *TranslateServiceTranslateResult

func (*TranslateServiceTranslateResult) BLength

func (p *TranslateServiceTranslateResult) BLength() int

func (*TranslateServiceTranslateResult) DeepEqual

func (*TranslateServiceTranslateResult) FastRead

func (p *TranslateServiceTranslateResult) FastRead(buf []byte) (int, error)

func (*TranslateServiceTranslateResult) FastReadField0

func (p *TranslateServiceTranslateResult) FastReadField0(buf []byte) (int, error)

func (*TranslateServiceTranslateResult) FastWrite

func (p *TranslateServiceTranslateResult) FastWrite(buf []byte) int

for compatibility

func (*TranslateServiceTranslateResult) FastWriteNocopy

func (p *TranslateServiceTranslateResult) FastWriteNocopy(buf []byte, binaryWriter bthrift.BinaryWriter) int

func (*TranslateServiceTranslateResult) Field0DeepEqual

func (p *TranslateServiceTranslateResult) Field0DeepEqual(src *TranslateResp) bool

func (*TranslateServiceTranslateResult) GetResult

func (p *TranslateServiceTranslateResult) GetResult() interface{}

func (*TranslateServiceTranslateResult) GetSuccess

func (p *TranslateServiceTranslateResult) GetSuccess() (v *TranslateResp)

func (*TranslateServiceTranslateResult) InitDefault

func (p *TranslateServiceTranslateResult) InitDefault()

func (*TranslateServiceTranslateResult) IsSetSuccess

func (p *TranslateServiceTranslateResult) IsSetSuccess() bool

func (*TranslateServiceTranslateResult) Read

func (*TranslateServiceTranslateResult) ReadField0

func (*TranslateServiceTranslateResult) SetSuccess

func (p *TranslateServiceTranslateResult) SetSuccess(x interface{})

func (*TranslateServiceTranslateResult) String

func (*TranslateServiceTranslateResult) Write

func (p *TranslateServiceTranslateResult) Write(oprot thrift.TProtocol) (err error)

Directories

Path Synopsis
Code generated by Kitex v0.4.4.
Code generated by Kitex v0.4.4.

Jump to

Keyboard shortcuts

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