keyvaluetest

package
v1.22.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2017 License: MIT Imports: 4 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 KeyValue.

func NewMockClient

func NewMockClient(ctrl *gomock.Controller) *MockClient

Build a new mock client for service KeyValue.

mockCtrl := gomock.NewController(t)
client := keyvaluetest.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 KeyValue mock client.

func (*MockClient) GetValue

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

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

func (*MockClient) SetValue

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

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

Jump to

Keyboard shortcuts

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