Documentation ¶
Index ¶
- Variables
- type MockProcessor
- func (p *MockProcessor) AddToProcessorMap(key string, processorFunc thrift.TProcessorFunction)
- func (p *MockProcessor) GetProcessorFunction(key string) (processorFunc thrift.TProcessorFunction, ok bool)
- func (p *MockProcessor) Process(ctx context.Context, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException)
- type MockProcessorFunction
- type MockResult
Constants ¶
This section is empty.
Variables ¶
View Source
var HelloServiceSayHelloResult_Success_DEFAULT thrift.TStruct
Functions ¶
This section is empty.
Types ¶
type MockProcessor ¶
type MockProcessor struct {
// contains filtered or unexported fields
}
MockProcessor is a mock thrift processor. It implementes thrift's TProcessor interface.
func NewMockProcessor ¶
func NewMockProcessor() *MockProcessor
func (*MockProcessor) AddToProcessorMap ¶
func (p *MockProcessor) AddToProcessorMap(key string, processorFunc thrift.TProcessorFunction)
AddToProcessorMap adds a processor function to the processor's map which maps a string key to a thrift processor function
func (*MockProcessor) GetProcessorFunction ¶
func (p *MockProcessor) GetProcessorFunction(key string) (processorFunc thrift.TProcessorFunction, ok bool)
GetProcessorFunction gets the thrift processor function by its string key
func (*MockProcessor) Process ¶
func (p *MockProcessor) Process(ctx context.Context, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException)
Process operates upon an input stream and writes to a output stream
type MockProcessorFunction ¶
MockProcessorFunction is a mock thrift processor function. It implements thrift's TProcessorFunction
type MockResult ¶
type MockResult struct { Success thrift.TStruct `thrift:"success,0" db:"success" json:"success,omitempty"` // contains filtered or unexported fields }
func NewMockResult ¶
func NewMockResult(funcName string, success thrift.TStruct) *MockResult
func (*MockResult) GetSuccess ¶
func (p *MockResult) GetSuccess() thrift.TStruct
func (*MockResult) IsSetSuccess ¶
func (p *MockResult) IsSetSuccess() bool
func (*MockResult) String ¶
func (p *MockResult) String() string
Click to show internal directories.
Click to hide internal directories.