storetest

package
v1.37.1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2019 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 Store.

func NewMockClient

func NewMockClient(ctrl *gomock.Controller) *MockClient

Build a new mock client for service Store.

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

Use EXPECT() to set expectations on the mock.

func (*MockClient) CompareAndSwap

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

CompareAndSwap responds to a CompareAndSwap 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().CompareAndSwap(gomock.Any(), ...).Return(...)
... := client.CompareAndSwap(...)

func (*MockClient) EXPECT

func (m *MockClient) EXPECT() *_MockClientRecorder

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

func (*MockClient) Forget

func (m *MockClient) Forget(
	ctx context.Context,
	_Key *string,
	opts ...yarpc.CallOption,
) (ack yarpc.Ack, err error)

Forget responds to a Forget 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().Forget(gomock.Any(), ...).Return(...)
... := client.Forget(...)

func (*MockClient) Healthy

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

Healthy responds to a Healthy 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().Healthy(gomock.Any(), ...).Return(...)
... := client.Healthy(...)

func (*MockClient) Increment

func (m *MockClient) Increment(
	ctx context.Context,
	_Key *string,
	_Value *int64,
	opts ...yarpc.CallOption,
) (err error)

Increment responds to a Increment 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().Increment(gomock.Any(), ...).Return(...)
... := client.Increment(...)

func (*MockClient) Integer

func (m *MockClient) Integer(
	ctx context.Context,
	_Key *string,
	opts ...yarpc.CallOption,
) (success int64, err error)

Integer responds to a Integer 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().Integer(gomock.Any(), ...).Return(...)
... := client.Integer(...)

Jump to

Keyboard shortcuts

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