thrifttesttest

package
v1.26.2 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockClient

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

MockClient implements a gomock-compatible mock client for service ThriftTest.

func NewMockClient

func NewMockClient(ctrl *gomock.Controller) *MockClient

Build a new mock client for service ThriftTest.

mockCtrl := gomock.NewController(t)
client := thrifttesttest.NewMockClient(mockCtrl)

Use EXPECT() to set expectations on the mock.

func (*MockClient) EXPECT

func (m *MockClient) EXPECT() *_MockClientRecorder

EXPECT returns an object that allows you to define an expectation on the ThriftTest mock client.

func (*MockClient) TestBinary

func (m *MockClient) TestBinary(
	ctx context.Context,
	_Thing []byte,
	opts ...yarpc.CallOption,
) (success []byte, err error)

TestBinary responds to a TestBinary call based on the mock expectations. This call will fail if the mock does not expect this call. Use EXPECT to expect a call to this function.

client.EXPECT().TestBinary(gomock.Any(), ...).Return(...)
... := client.TestBinary(...)

func (*MockClient) TestByte

func (m *MockClient) TestByte(
	ctx context.Context,
	_Thing *int8,
	opts ...yarpc.CallOption,
) (success int8, err error)

TestByte responds to a TestByte call based on the mock expectations. This call will fail if the mock does not expect this call. Use EXPECT to expect a call to this function.

client.EXPECT().TestByte(gomock.Any(), ...).Return(...)
... := client.TestByte(...)

func (*MockClient) TestDouble

func (m *MockClient) TestDouble(
	ctx context.Context,
	_Thing *float64,
	opts ...yarpc.CallOption,
) (success float64, err error)

TestDouble responds to a TestDouble call based on the mock expectations. This call will fail if the mock does not expect this call. Use EXPECT to expect a call to this function.

client.EXPECT().TestDouble(gomock.Any(), ...).Return(...)
... := client.TestDouble(...)

func (*MockClient) TestEnum

func (m *MockClient) TestEnum(
	ctx context.Context,
	_Thing *gauntlet.Numberz,
	opts ...yarpc.CallOption,
) (success gauntlet.Numberz, err error)

TestEnum responds to a TestEnum call based on the mock expectations. This call will fail if the mock does not expect this call. Use EXPECT to expect a call to this function.

client.EXPECT().TestEnum(gomock.Any(), ...).Return(...)
... := client.TestEnum(...)

func (*MockClient) TestException

func (m *MockClient) TestException(
	ctx context.Context,
	_Arg *string,
	opts ...yarpc.CallOption,
) (err error)

TestException responds to a TestException call based on the mock expectations. This call will fail if the mock does not expect this call. Use EXPECT to expect a call to this function.

client.EXPECT().TestException(gomock.Any(), ...).Return(...)
... := client.TestException(...)

func (*MockClient) TestI32

func (m *MockClient) TestI32(
	ctx context.Context,
	_Thing *int32,
	opts ...yarpc.CallOption,
) (success int32, err error)

TestI32 responds to a TestI32 call based on the mock expectations. This call will fail if the mock does not expect this call. Use EXPECT to expect a call to this function.

client.EXPECT().TestI32(gomock.Any(), ...).Return(...)
... := client.TestI32(...)

func (*MockClient) TestI64

func (m *MockClient) TestI64(
	ctx context.Context,
	_Thing *int64,
	opts ...yarpc.CallOption,
) (success int64, err error)

TestI64 responds to a TestI64 call based on the mock expectations. This call will fail if the mock does not expect this call. Use EXPECT to expect a call to this function.

client.EXPECT().TestI64(gomock.Any(), ...).Return(...)
... := client.TestI64(...)

func (*MockClient) TestInsanity

func (m *MockClient) TestInsanity(
	ctx context.Context,
	_Argument *gauntlet.Insanity,
	opts ...yarpc.CallOption,
) (success map[gauntlet.UserId]map[gauntlet.Numberz]*gauntlet.Insanity, err error)

TestInsanity responds to a TestInsanity call based on the mock expectations. This call will fail if the mock does not expect this call. Use EXPECT to expect a call to this function.

client.EXPECT().TestInsanity(gomock.Any(), ...).Return(...)
... := client.TestInsanity(...)

func (*MockClient) TestList

func (m *MockClient) TestList(
	ctx context.Context,
	_Thing []int32,
	opts ...yarpc.CallOption,
) (success []int32, err error)

TestList responds to a TestList call based on the mock expectations. This call will fail if the mock does not expect this call. Use EXPECT to expect a call to this function.

client.EXPECT().TestList(gomock.Any(), ...).Return(...)
... := client.TestList(...)

func (*MockClient) TestMap

func (m *MockClient) TestMap(
	ctx context.Context,
	_Thing map[int32]int32,
	opts ...yarpc.CallOption,
) (success map[int32]int32, err error)

TestMap responds to a TestMap call based on the mock expectations. This call will fail if the mock does not expect this call. Use EXPECT to expect a call to this function.

client.EXPECT().TestMap(gomock.Any(), ...).Return(...)
... := client.TestMap(...)

func (*MockClient) TestMapMap

func (m *MockClient) TestMapMap(
	ctx context.Context,
	_Hello *int32,
	opts ...yarpc.CallOption,
) (success map[int32]map[int32]int32, err error)

TestMapMap responds to a TestMapMap call based on the mock expectations. This call will fail if the mock does not expect this call. Use EXPECT to expect a call to this function.

client.EXPECT().TestMapMap(gomock.Any(), ...).Return(...)
... := client.TestMapMap(...)

func (*MockClient) TestMulti

func (m *MockClient) TestMulti(
	ctx context.Context,
	_Arg0 *int8,
	_Arg1 *int32,
	_Arg2 *int64,
	_Arg3 map[int16]string,
	_Arg4 *gauntlet.Numberz,
	_Arg5 *gauntlet.UserId,
	opts ...yarpc.CallOption,
) (success *gauntlet.Xtruct, err error)

TestMulti responds to a TestMulti call based on the mock expectations. This call will fail if the mock does not expect this call. Use EXPECT to expect a call to this function.

client.EXPECT().TestMulti(gomock.Any(), ...).Return(...)
... := client.TestMulti(...)

func (*MockClient) TestMultiException

func (m *MockClient) TestMultiException(
	ctx context.Context,
	_Arg0 *string,
	_Arg1 *string,
	opts ...yarpc.CallOption,
) (success *gauntlet.Xtruct, err error)

TestMultiException responds to a TestMultiException call based on the mock expectations. This call will fail if the mock does not expect this call. Use EXPECT to expect a call to this function.

client.EXPECT().TestMultiException(gomock.Any(), ...).Return(...)
... := client.TestMultiException(...)

func (*MockClient) TestNest

func (m *MockClient) TestNest(
	ctx context.Context,
	_Thing *gauntlet.Xtruct2,
	opts ...yarpc.CallOption,
) (success *gauntlet.Xtruct2, err error)

TestNest responds to a TestNest call based on the mock expectations. This call will fail if the mock does not expect this call. Use EXPECT to expect a call to this function.

client.EXPECT().TestNest(gomock.Any(), ...).Return(...)
... := client.TestNest(...)

func (*MockClient) TestOneway

func (m *MockClient) TestOneway(
	ctx context.Context,
	_SecondsToSleep *int32,
	opts ...yarpc.CallOption,
) (ack yarpc.Ack, err error)

TestOneway responds to a TestOneway call based on the mock expectations. This call will fail if the mock does not expect this call. Use EXPECT to expect a call to this function.

client.EXPECT().TestOneway(gomock.Any(), ...).Return(...)
... := client.TestOneway(...)

func (*MockClient) TestSet

func (m *MockClient) TestSet(
	ctx context.Context,
	_Thing map[int32]struct{},
	opts ...yarpc.CallOption,
) (success map[int32]struct{}, err error)

TestSet responds to a TestSet call based on the mock expectations. This call will fail if the mock does not expect this call. Use EXPECT to expect a call to this function.

client.EXPECT().TestSet(gomock.Any(), ...).Return(...)
... := client.TestSet(...)

func (*MockClient) TestString

func (m *MockClient) TestString(
	ctx context.Context,
	_Thing *string,
	opts ...yarpc.CallOption,
) (success string, err error)

TestString responds to a TestString call based on the mock expectations. This call will fail if the mock does not expect this call. Use EXPECT to expect a call to this function.

client.EXPECT().TestString(gomock.Any(), ...).Return(...)
... := client.TestString(...)

func (*MockClient) TestStringMap

func (m *MockClient) TestStringMap(
	ctx context.Context,
	_Thing map[string]string,
	opts ...yarpc.CallOption,
) (success map[string]string, err error)

TestStringMap responds to a TestStringMap call based on the mock expectations. This call will fail if the mock does not expect this call. Use EXPECT to expect a call to this function.

client.EXPECT().TestStringMap(gomock.Any(), ...).Return(...)
... := client.TestStringMap(...)

func (*MockClient) TestStruct

func (m *MockClient) TestStruct(
	ctx context.Context,
	_Thing *gauntlet.Xtruct,
	opts ...yarpc.CallOption,
) (success *gauntlet.Xtruct, err error)

TestStruct responds to a TestStruct call based on the mock expectations. This call will fail if the mock does not expect this call. Use EXPECT to expect a call to this function.

client.EXPECT().TestStruct(gomock.Any(), ...).Return(...)
... := client.TestStruct(...)

func (*MockClient) TestTypedef

func (m *MockClient) TestTypedef(
	ctx context.Context,
	_Thing *gauntlet.UserId,
	opts ...yarpc.CallOption,
) (success gauntlet.UserId, err error)

TestTypedef responds to a TestTypedef call based on the mock expectations. This call will fail if the mock does not expect this call. Use EXPECT to expect a call to this function.

client.EXPECT().TestTypedef(gomock.Any(), ...).Return(...)
... := client.TestTypedef(...)

func (*MockClient) TestVoid

func (m *MockClient) TestVoid(
	ctx context.Context,
	opts ...yarpc.CallOption,
) (err error)

TestVoid responds to a TestVoid call based on the mock expectations. This call will fail if the mock does not expect this call. Use EXPECT to expect a call to this function.

client.EXPECT().TestVoid(gomock.Any(), ...).Return(...)
... := client.TestVoid(...)

Jump to

Keyboard shortcuts

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