Documentation ¶
Overview ¶
Package clientmock is a generated GoMock package.
Index ¶
- type Call
- type ClientFixture
- type MockClient
- func (m *MockClient) EXPECT() *MockClientMockRecorder
- func (m *MockClient) HTTPClient() *zanzibar.HTTPClient
- func (m *MockClient) SaveContacts(arg0 context.Context, arg1 map[string]string, ...) (context.Context, *contacts.SaveContactsResponse, map[string]string, error)
- func (m *MockClient) TestURLURL(arg0 context.Context, arg1 map[string]string) (context.Context, string, map[string]string, error)
- type MockClientMockRecorder
- type MockClientWithFixture
- type SaveContactsFixture
- type SaveContactsMock
- type SaveContactsScenarios
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Call ¶
type Call struct {
// contains filtered or unexported fields
}
Call is a thin wrapper around gomock.Call for exposing the methods that do not mutate the fixture related information like Return().
type ClientFixture ¶
type ClientFixture struct {
SaveContacts *SaveContactsScenarios
}
ClientFixture defines the client fixture type
type MockClient ¶
type MockClient struct {
// contains filtered or unexported fields
}
MockClient is a mock of Client interface.
func NewMockClient ¶
func NewMockClient(ctrl *gomock.Controller) *MockClient
NewMockClient creates a new mock instance.
func (*MockClient) EXPECT ¶
func (m *MockClient) EXPECT() *MockClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockClient) HTTPClient ¶
func (m *MockClient) HTTPClient() *zanzibar.HTTPClient
HTTPClient mocks base method.
func (*MockClient) SaveContacts ¶
func (m *MockClient) SaveContacts(arg0 context.Context, arg1 map[string]string, arg2 *contacts.Contacts_SaveContacts_Args) (context.Context, *contacts.SaveContactsResponse, map[string]string, error)
SaveContacts mocks base method.
type MockClientMockRecorder ¶
type MockClientMockRecorder struct {
// contains filtered or unexported fields
}
MockClientMockRecorder is the mock recorder for MockClient.
func (*MockClientMockRecorder) HTTPClient ¶
func (mr *MockClientMockRecorder) HTTPClient() *gomock.Call
HTTPClient indicates an expected call of HTTPClient.
func (*MockClientMockRecorder) SaveContacts ¶
func (mr *MockClientMockRecorder) SaveContacts(arg0, arg1, arg2 interface{}) *gomock.Call
SaveContacts indicates an expected call of SaveContacts.
func (*MockClientMockRecorder) TestURLURL ¶
func (mr *MockClientMockRecorder) TestURLURL(arg0, arg1 interface{}) *gomock.Call
TestURLURL indicates an expected call of TestURLURL.
type MockClientWithFixture ¶
type MockClientWithFixture struct { *MockClient // contains filtered or unexported fields }
MockClientWithFixture is a mock of Client interface with preset fixture
func New ¶
func New(ctrl *gomock.Controller, fixture *ClientFixture) *MockClientWithFixture
New creates a new mock instance
func (*MockClientWithFixture) EXPECT ¶
func (m *MockClientWithFixture) EXPECT()
EXPECT shadows the EXPECT method on the underlying mock client. It should not be called directly.
func (*MockClientWithFixture) ExpectSaveContacts ¶
func (m *MockClientWithFixture) ExpectSaveContacts() *SaveContactsMock
ExpectSaveContacts returns an object that allows the caller to choose expected scenario for SaveContacts
type SaveContactsFixture ¶
type SaveContactsFixture struct { Arg0 context.Context Arg1 map[string]string Arg2 *contacts.Contacts_SaveContacts_Args // Arg{n}Any indicates the nth argument could be gomock.Any Arg0Any bool Arg1Any bool Arg2Any bool Ret0 context.Context Ret1 *contacts.SaveContactsResponse Ret2 map[string]string Ret3 error }
SaveContactsFixture defines the fixture type for SaveContacts
type SaveContactsMock ¶
type SaveContactsMock struct {
// contains filtered or unexported fields
}
SaveContactsMock mocks the SaveContacts method
func (*SaveContactsMock) Success ¶
func (s *SaveContactsMock) Success() Call
Success sets the expected scenario as defined in the concrete fixture package github.com/uber/zanzibar/v2/examples/example-gateway/clients/contacts/fixture
type SaveContactsScenarios ¶
type SaveContactsScenarios struct {
Success *SaveContactsFixture `scenario:"success"`
}
SaveContactsScenarios defines all fixture scenarios for SaveContacts