go.uber.org/yarpc@v1.72.1/encoding/thrift/thriftrw-plugin-yarpc/internal/tests/atomic/readonlystoretest/client.go (about)

     1  // Code generated by thriftrw-plugin-yarpc
     2  // @generated
     3  
     4  package readonlystoretest
     5  
     6  import (
     7  	context "context"
     8  	gomock "github.com/golang/mock/gomock"
     9  	yarpc "go.uber.org/yarpc"
    10  	readonlystoreclient "go.uber.org/yarpc/encoding/thrift/thriftrw-plugin-yarpc/internal/tests/atomic/readonlystoreclient"
    11  )
    12  
    13  // MockClient implements a gomock-compatible mock client for service
    14  // ReadOnlyStore.
    15  type MockClient struct {
    16  	ctrl     *gomock.Controller
    17  	recorder *_MockClientRecorder
    18  }
    19  
    20  var _ readonlystoreclient.Interface = (*MockClient)(nil)
    21  
    22  type _MockClientRecorder struct {
    23  	mock *MockClient
    24  }
    25  
    26  // Build a new mock client for service ReadOnlyStore.
    27  //
    28  //	mockCtrl := gomock.NewController(t)
    29  //	client := readonlystoretest.NewMockClient(mockCtrl)
    30  //
    31  // Use EXPECT() to set expectations on the mock.
    32  func NewMockClient(ctrl *gomock.Controller) *MockClient {
    33  	mock := &MockClient{ctrl: ctrl}
    34  	mock.recorder = &_MockClientRecorder{mock}
    35  	return mock
    36  }
    37  
    38  // EXPECT returns an object that allows you to define an expectation on the
    39  // ReadOnlyStore mock client.
    40  func (m *MockClient) EXPECT() *_MockClientRecorder {
    41  	return m.recorder
    42  }
    43  
    44  // Integer responds to a Integer call based on the mock expectations. This
    45  // call will fail if the mock does not expect this call. Use EXPECT to expect
    46  // a call to this function.
    47  //
    48  //	client.EXPECT().Integer(gomock.Any(), ...).Return(...)
    49  //	... := client.Integer(...)
    50  func (m *MockClient) Integer(
    51  	ctx context.Context,
    52  	_Key *string,
    53  	opts ...yarpc.CallOption,
    54  ) (success int64, err error) {
    55  
    56  	args := []interface{}{ctx, _Key}
    57  	for _, o := range opts {
    58  		args = append(args, o)
    59  	}
    60  	i := 0
    61  	ret := m.ctrl.Call(m, "Integer", args...)
    62  	success, _ = ret[i].(int64)
    63  	i++
    64  	err, _ = ret[i].(error)
    65  	return
    66  }
    67  
    68  func (mr *_MockClientRecorder) Integer(
    69  	ctx interface{},
    70  	_Key interface{},
    71  	opts ...interface{},
    72  ) *gomock.Call {
    73  	args := append([]interface{}{ctx, _Key}, opts...)
    74  	return mr.mock.ctrl.RecordCall(mr.mock, "Integer", args...)
    75  }
    76  
    77  // Healthy responds to a Healthy call based on the mock expectations. This
    78  // call will fail if the mock does not expect this call. Use EXPECT to expect
    79  // a call to this function.
    80  //
    81  //	client.EXPECT().Healthy(gomock.Any(), ...).Return(...)
    82  //	... := client.Healthy(...)
    83  func (m *MockClient) Healthy(
    84  	ctx context.Context,
    85  	opts ...yarpc.CallOption,
    86  ) (success bool, err error) {
    87  
    88  	args := []interface{}{ctx}
    89  	for _, o := range opts {
    90  		args = append(args, o)
    91  	}
    92  	i := 0
    93  	ret := m.ctrl.Call(m, "Healthy", args...)
    94  	success, _ = ret[i].(bool)
    95  	i++
    96  	err, _ = ret[i].(error)
    97  	return
    98  }
    99  
   100  func (mr *_MockClientRecorder) Healthy(
   101  	ctx interface{},
   102  	opts ...interface{},
   103  ) *gomock.Call {
   104  	args := append([]interface{}{ctx}, opts...)
   105  	return mr.mock.ctrl.RecordCall(mr.mock, "Healthy", args...)
   106  }