fast

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MockTestResult_Success_DEFAULT string

Functions

This section is empty.

Types

type Mock

type Mock interface {
	Test(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) Test

func (p *MockClient) Test(ctx context.Context, req *MockReq) (r string, 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 MockTestArgs_Req_DEFAULT *MockReq

func NewMockReq

func NewMockReq() *MockReq

func (*MockReq) BLength

func (p *MockReq) BLength() int

func (*MockReq) DeepEqual

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

func (*MockReq) FastRead

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

func (*MockReq) FastReadField1

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

func (*MockReq) FastReadField2

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

func (*MockReq) FastReadField3

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

func (*MockReq) FastWrite

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

for compatibility

func (*MockReq) FastWriteNocopy

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

func (*MockReq) Field1DeepEqual

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

func (*MockReq) Field2DeepEqual

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

func (*MockReq) Field3DeepEqual

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

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) BLength

func (p *MockTestArgs) BLength() int

func (*MockTestArgs) DeepEqual

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

func (*MockTestArgs) FastRead

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

func (*MockTestArgs) FastReadField1

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

func (*MockTestArgs) FastWrite

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

for compatibility

func (*MockTestArgs) FastWriteNocopy

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

func (*MockTestArgs) Field1DeepEqual

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

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) BLength

func (p *MockTestResult) BLength() int

func (*MockTestResult) DeepEqual

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

func (*MockTestResult) FastRead

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

func (*MockTestResult) FastReadField0

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

func (*MockTestResult) FastWrite

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

for compatibility

func (*MockTestResult) FastWriteNocopy

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

func (*MockTestResult) Field0DeepEqual

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

func (p *MockTestResult) String() string

func (*MockTestResult) Write

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

Jump to

Keyboard shortcuts

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