thrift

package
v0.9.1-rc1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MockExceptionTestResult_Success_DEFAULT string
View Source
var MockTestResult_Success_DEFAULT string

Functions

This section is empty.

Types

type Exception added in v0.7.0

type Exception struct {
	Code int32  `thrift:"code,1" json:"code"`
	Msg  string `thrift:"msg,255" json:"msg"`
}
var MockExceptionTestResult_Err_DEFAULT *Exception

func NewException added in v0.7.0

func NewException() *Exception

func (*Exception) DeepEqual added in v0.7.0

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

func (*Exception) Error added in v0.7.0

func (p *Exception) Error() string

func (*Exception) Field1DeepEqual added in v0.7.0

func (p *Exception) Field1DeepEqual(src int32) bool

func (*Exception) Field255DeepEqual added in v0.7.0

func (p *Exception) Field255DeepEqual(src string) bool

func (*Exception) GetCode added in v0.7.0

func (p *Exception) GetCode() (v int32)

func (*Exception) GetMsg added in v0.7.0

func (p *Exception) GetMsg() (v string)

func (*Exception) Read added in v0.7.0

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

func (*Exception) ReadField1 added in v0.7.0

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

func (*Exception) ReadField255 added in v0.7.0

func (p *Exception) ReadField255(iprot thrift.TProtocol) error

func (*Exception) SetCode added in v0.7.0

func (p *Exception) SetCode(val int32)

func (*Exception) SetMsg added in v0.7.0

func (p *Exception) SetMsg(val string)

func (*Exception) String added in v0.7.0

func (p *Exception) String() string

func (*Exception) Write added in v0.7.0

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

type Mock

type Mock interface {
	Test(ctx context.Context, req *MockReq) (r string, err error)

	ExceptionTest(ctx context.Context, req *MockReq) (r string, err error)
}

type MockClient

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

func NewMockClient

func NewMockClient(c thrift.TClient) *MockClient

func NewMockClientProtocol

func NewMockClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *MockClient

func (*MockClient) Client_

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

func (*MockClient) ExceptionTest added in v0.7.0

func (p *MockClient) ExceptionTest(ctx context.Context, req *MockReq) (r string, err error)

func (*MockClient) Test

func (p *MockClient) Test(ctx context.Context, req *MockReq) (r string, err error)

type MockExceptionTestArgs added in v0.7.0

type MockExceptionTestArgs struct {
	Req *MockReq `thrift:"req,1" json:"req"`
}

func NewMockExceptionTestArgs added in v0.7.0

func NewMockExceptionTestArgs() *MockExceptionTestArgs

func (*MockExceptionTestArgs) DeepEqual added in v0.7.0

func (*MockExceptionTestArgs) Field1DeepEqual added in v0.7.0

func (p *MockExceptionTestArgs) Field1DeepEqual(src *MockReq) bool

func (*MockExceptionTestArgs) GetReq added in v0.7.0

func (p *MockExceptionTestArgs) GetReq() (v *MockReq)

func (*MockExceptionTestArgs) IsSetReq added in v0.7.0

func (p *MockExceptionTestArgs) IsSetReq() bool

func (*MockExceptionTestArgs) Read added in v0.7.0

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

func (*MockExceptionTestArgs) ReadField1 added in v0.7.0

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

func (*MockExceptionTestArgs) SetReq added in v0.7.0

func (p *MockExceptionTestArgs) SetReq(val *MockReq)

func (*MockExceptionTestArgs) String added in v0.7.0

func (p *MockExceptionTestArgs) String() string

func (*MockExceptionTestArgs) Write added in v0.7.0

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

type MockExceptionTestResult added in v0.7.0

type MockExceptionTestResult struct {
	Success *string    `thrift:"success,0,optional" json:"success,omitempty"`
	Err     *Exception `thrift:"err,1,optional" json:"err,omitempty"`
}

func NewMockExceptionTestResult added in v0.7.0

func NewMockExceptionTestResult() *MockExceptionTestResult

func (*MockExceptionTestResult) DeepEqual added in v0.7.0

func (*MockExceptionTestResult) Field0DeepEqual added in v0.7.0

func (p *MockExceptionTestResult) Field0DeepEqual(src *string) bool

func (*MockExceptionTestResult) Field1DeepEqual added in v0.7.0

func (p *MockExceptionTestResult) Field1DeepEqual(src *Exception) bool

func (*MockExceptionTestResult) GetErr added in v0.7.0

func (p *MockExceptionTestResult) GetErr() (v *Exception)

func (*MockExceptionTestResult) GetSuccess added in v0.7.0

func (p *MockExceptionTestResult) GetSuccess() (v string)

func (*MockExceptionTestResult) IsSetErr added in v0.7.0

func (p *MockExceptionTestResult) IsSetErr() bool

func (*MockExceptionTestResult) IsSetSuccess added in v0.7.0

func (p *MockExceptionTestResult) IsSetSuccess() bool

func (*MockExceptionTestResult) Read added in v0.7.0

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

func (*MockExceptionTestResult) ReadField0 added in v0.7.0

func (p *MockExceptionTestResult) ReadField0(iprot thrift.TProtocol) error

func (*MockExceptionTestResult) ReadField1 added in v0.7.0

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

func (*MockExceptionTestResult) SetErr added in v0.7.0

func (p *MockExceptionTestResult) SetErr(val *Exception)

func (*MockExceptionTestResult) SetSuccess added in v0.7.0

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

func (*MockExceptionTestResult) String added in v0.7.0

func (p *MockExceptionTestResult) String() string

func (*MockExceptionTestResult) Write added in v0.7.0

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

type MockProcessor

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

func NewMockProcessor

func NewMockProcessor(handler Mock) *MockProcessor

func (*MockProcessor) AddToProcessorMap

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

func (*MockProcessor) GetProcessorFunction

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

func (*MockProcessor) Process

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

func (*MockProcessor) ProcessorMap

func (p *MockProcessor) ProcessorMap() map[string]thrift.TProcessorFunction

type MockReq

type MockReq struct {
	Msg     string            `thrift:"Msg,1" json:"Msg"`
	StrMap  map[string]string `thrift:"strMap,2" json:"strMap"`
	StrList []string          `thrift:"strList,3" json:"strList"`
}
var MockExceptionTestArgs_Req_DEFAULT *MockReq
var MockTestArgs_Req_DEFAULT *MockReq

func NewMockReq

func NewMockReq() *MockReq

func (*MockReq) DeepEqual added in v0.4.4

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

func (*MockReq) Field1DeepEqual added in v0.4.4

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

func (*MockReq) Field2DeepEqual added in v0.4.4

func (p *MockReq) Field2DeepEqual(src map[string]string) bool

func (*MockReq) Field3DeepEqual added in v0.4.4

func (p *MockReq) Field3DeepEqual(src []string) bool

func (*MockReq) GetMsg

func (p *MockReq) GetMsg() (v string)

func (*MockReq) GetStrList

func (p *MockReq) GetStrList() (v []string)

func (*MockReq) GetStrMap

func (p *MockReq) GetStrMap() (v map[string]string)

func (*MockReq) Read

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

func (*MockReq) ReadField1

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

func (*MockReq) ReadField2

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

func (*MockReq) ReadField3

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

func (*MockReq) SetMsg

func (p *MockReq) SetMsg(val string)

func (*MockReq) SetStrList

func (p *MockReq) SetStrList(val []string)

func (*MockReq) SetStrMap

func (p *MockReq) SetStrMap(val map[string]string)

func (*MockReq) String added in v0.4.4

func (p *MockReq) String() string

func (*MockReq) Write

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

type MockTestArgs

type MockTestArgs struct {
	Req *MockReq `thrift:"req,1" json:"req"`
}

func NewMockTestArgs

func NewMockTestArgs() *MockTestArgs

func (*MockTestArgs) DeepEqual added in v0.4.4

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

func (*MockTestArgs) Field1DeepEqual added in v0.4.4

func (p *MockTestArgs) Field1DeepEqual(src *MockReq) bool

func (*MockTestArgs) GetFirstArgument

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

func (*MockTestArgs) GetReq

func (p *MockTestArgs) GetReq() (v *MockReq)

func (*MockTestArgs) IsSetReq

func (p *MockTestArgs) IsSetReq() bool

func (*MockTestArgs) Read

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

func (*MockTestArgs) ReadField1

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

func (*MockTestArgs) SetReq

func (p *MockTestArgs) SetReq(val *MockReq)

func (*MockTestArgs) String added in v0.4.4

func (p *MockTestArgs) String() string

func (*MockTestArgs) Write

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

type MockTestResult

type MockTestResult struct {
	Success *string `thrift:"success,0,optional" json:"success,omitempty"`
}

func NewMockTestResult

func NewMockTestResult() *MockTestResult

func (*MockTestResult) DeepEqual added in v0.4.4

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

func (*MockTestResult) Field0DeepEqual added in v0.4.4

func (p *MockTestResult) Field0DeepEqual(src *string) bool

func (*MockTestResult) GetResult

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

func (*MockTestResult) GetSuccess

func (p *MockTestResult) GetSuccess() (v string)

func (*MockTestResult) IsSetSuccess

func (p *MockTestResult) IsSetSuccess() bool

func (*MockTestResult) Read

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

func (*MockTestResult) ReadField0

func (p *MockTestResult) ReadField0(iprot thrift.TProtocol) error

func (*MockTestResult) SetSuccess

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

func (*MockTestResult) String added in v0.4.4

func (p *MockTestResult) String() string

func (*MockTestResult) Write

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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