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

     1  // Code generated by thriftrw-plugin-yarpc
     2  // @generated
     3  
     4  package storetest
     5  
     6  import (
     7  	context "context"
     8  	gomock "github.com/golang/mock/gomock"
     9  	yarpc "go.uber.org/yarpc"
    10  	atomic "go.uber.org/yarpc/encoding/thrift/thriftrw-plugin-yarpc/internal/tests/atomic"
    11  	storeclient "go.uber.org/yarpc/encoding/thrift/thriftrw-plugin-yarpc/internal/tests/atomic/storeclient"
    12  )
    13  
    14  // MockClient implements a gomock-compatible mock client for service
    15  // Store.
    16  type MockClient struct {
    17  	ctrl     *gomock.Controller
    18  	recorder *_MockClientRecorder
    19  }
    20  
    21  var _ storeclient.Interface = (*MockClient)(nil)
    22  
    23  type _MockClientRecorder struct {
    24  	mock *MockClient
    25  }
    26  
    27  // Build a new mock client for service Store.
    28  //
    29  //	mockCtrl := gomock.NewController(t)
    30  //	client := storetest.NewMockClient(mockCtrl)
    31  //
    32  // Use EXPECT() to set expectations on the mock.
    33  func NewMockClient(ctrl *gomock.Controller) *MockClient {
    34  	mock := &MockClient{ctrl: ctrl}
    35  	mock.recorder = &_MockClientRecorder{mock}
    36  	return mock
    37  }
    38  
    39  // EXPECT returns an object that allows you to define an expectation on the
    40  // Store mock client.
    41  func (m *MockClient) EXPECT() *_MockClientRecorder {
    42  	return m.recorder
    43  }
    44  
    45  // CompareAndSwap responds to a CompareAndSwap call based on the mock expectations. This
    46  // call will fail if the mock does not expect this call. Use EXPECT to expect
    47  // a call to this function.
    48  //
    49  //	client.EXPECT().CompareAndSwap(gomock.Any(), ...).Return(...)
    50  //	... := client.CompareAndSwap(...)
    51  func (m *MockClient) CompareAndSwap(
    52  	ctx context.Context,
    53  	_Request *atomic.CompareAndSwap,
    54  	opts ...yarpc.CallOption,
    55  ) (err error) {
    56  
    57  	args := []interface{}{ctx, _Request}
    58  	for _, o := range opts {
    59  		args = append(args, o)
    60  	}
    61  	i := 0
    62  	ret := m.ctrl.Call(m, "CompareAndSwap", args...)
    63  	err, _ = ret[i].(error)
    64  	return
    65  }
    66  
    67  func (mr *_MockClientRecorder) CompareAndSwap(
    68  	ctx interface{},
    69  	_Request interface{},
    70  	opts ...interface{},
    71  ) *gomock.Call {
    72  	args := append([]interface{}{ctx, _Request}, opts...)
    73  	return mr.mock.ctrl.RecordCall(mr.mock, "CompareAndSwap", args...)
    74  }
    75  
    76  // Forget responds to a Forget call based on the mock expectations. This
    77  // call will fail if the mock does not expect this call. Use EXPECT to expect
    78  // a call to this function.
    79  //
    80  //	client.EXPECT().Forget(gomock.Any(), ...).Return(...)
    81  //	... := client.Forget(...)
    82  func (m *MockClient) Forget(
    83  	ctx context.Context,
    84  	_Key *string,
    85  	opts ...yarpc.CallOption,
    86  ) (ack yarpc.Ack, err error) {
    87  
    88  	args := []interface{}{ctx, _Key}
    89  	for _, o := range opts {
    90  		args = append(args, o)
    91  	}
    92  	i := 0
    93  	ret := m.ctrl.Call(m, "Forget", args...)
    94  	ack, _ = ret[i].(yarpc.Ack)
    95  	i++
    96  	err, _ = ret[i].(error)
    97  	return
    98  }
    99  
   100  func (mr *_MockClientRecorder) Forget(
   101  	ctx interface{},
   102  	_Key interface{},
   103  	opts ...interface{},
   104  ) *gomock.Call {
   105  	args := append([]interface{}{ctx, _Key}, opts...)
   106  	return mr.mock.ctrl.RecordCall(mr.mock, "Forget", args...)
   107  }
   108  
   109  // Increment responds to a Increment call based on the mock expectations. This
   110  // call will fail if the mock does not expect this call. Use EXPECT to expect
   111  // a call to this function.
   112  //
   113  //	client.EXPECT().Increment(gomock.Any(), ...).Return(...)
   114  //	... := client.Increment(...)
   115  func (m *MockClient) Increment(
   116  	ctx context.Context,
   117  	_Key *string,
   118  	_Value *int64,
   119  	opts ...yarpc.CallOption,
   120  ) (err error) {
   121  
   122  	args := []interface{}{ctx, _Key, _Value}
   123  	for _, o := range opts {
   124  		args = append(args, o)
   125  	}
   126  	i := 0
   127  	ret := m.ctrl.Call(m, "Increment", args...)
   128  	err, _ = ret[i].(error)
   129  	return
   130  }
   131  
   132  func (mr *_MockClientRecorder) Increment(
   133  	ctx interface{},
   134  	_Key interface{},
   135  	_Value interface{},
   136  	opts ...interface{},
   137  ) *gomock.Call {
   138  	args := append([]interface{}{ctx, _Key, _Value}, opts...)
   139  	return mr.mock.ctrl.RecordCall(mr.mock, "Increment", args...)
   140  }
   141  
   142  // Integer responds to a Integer call based on the mock expectations. This
   143  // call will fail if the mock does not expect this call. Use EXPECT to expect
   144  // a call to this function.
   145  //
   146  //	client.EXPECT().Integer(gomock.Any(), ...).Return(...)
   147  //	... := client.Integer(...)
   148  func (m *MockClient) Integer(
   149  	ctx context.Context,
   150  	_Key *string,
   151  	opts ...yarpc.CallOption,
   152  ) (success int64, err error) {
   153  
   154  	args := []interface{}{ctx, _Key}
   155  	for _, o := range opts {
   156  		args = append(args, o)
   157  	}
   158  	i := 0
   159  	ret := m.ctrl.Call(m, "Integer", args...)
   160  	success, _ = ret[i].(int64)
   161  	i++
   162  	err, _ = ret[i].(error)
   163  	return
   164  }
   165  
   166  func (mr *_MockClientRecorder) Integer(
   167  	ctx interface{},
   168  	_Key interface{},
   169  	opts ...interface{},
   170  ) *gomock.Call {
   171  	args := append([]interface{}{ctx, _Key}, opts...)
   172  	return mr.mock.ctrl.RecordCall(mr.mock, "Integer", args...)
   173  }
   174  
   175  // Healthy responds to a Healthy call based on the mock expectations. This
   176  // call will fail if the mock does not expect this call. Use EXPECT to expect
   177  // a call to this function.
   178  //
   179  //	client.EXPECT().Healthy(gomock.Any(), ...).Return(...)
   180  //	... := client.Healthy(...)
   181  func (m *MockClient) Healthy(
   182  	ctx context.Context,
   183  	opts ...yarpc.CallOption,
   184  ) (success bool, err error) {
   185  
   186  	args := []interface{}{ctx}
   187  	for _, o := range opts {
   188  		args = append(args, o)
   189  	}
   190  	i := 0
   191  	ret := m.ctrl.Call(m, "Healthy", args...)
   192  	success, _ = ret[i].(bool)
   193  	i++
   194  	err, _ = ret[i].(error)
   195  	return
   196  }
   197  
   198  func (mr *_MockClientRecorder) Healthy(
   199  	ctx interface{},
   200  	opts ...interface{},
   201  ) *gomock.Call {
   202  	args := append([]interface{}{ctx}, opts...)
   203  	return mr.mock.ctrl.RecordCall(mr.mock, "Healthy", args...)
   204  }