github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/cdc/api/v2/api_helpers_mock.go (about)

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: cdc/api/v2/api_helpers.go
     3  
     4  // Package v2 is a generated GoMock package.
     5  package v2
     6  
     7  import (
     8  	context "context"
     9  	tls "crypto/tls"
    10  	reflect "reflect"
    11  
    12  	gomock "github.com/golang/mock/gomock"
    13  	kv "github.com/pingcap/tidb/pkg/kv"
    14  	controller "github.com/pingcap/tiflow/cdc/controller"
    15  	model "github.com/pingcap/tiflow/cdc/model"
    16  	config "github.com/pingcap/tiflow/pkg/config"
    17  	security "github.com/pingcap/tiflow/pkg/security"
    18  	client "github.com/tikv/pd/client"
    19  	v3 "go.etcd.io/etcd/client/v3"
    20  )
    21  
    22  // MockAPIV2Helpers is a mock of APIV2Helpers interface.
    23  type MockAPIV2Helpers struct {
    24  	ctrl     *gomock.Controller
    25  	recorder *MockAPIV2HelpersMockRecorder
    26  }
    27  
    28  // MockAPIV2HelpersMockRecorder is the mock recorder for MockAPIV2Helpers.
    29  type MockAPIV2HelpersMockRecorder struct {
    30  	mock *MockAPIV2Helpers
    31  }
    32  
    33  // NewMockAPIV2Helpers creates a new mock instance.
    34  func NewMockAPIV2Helpers(ctrl *gomock.Controller) *MockAPIV2Helpers {
    35  	mock := &MockAPIV2Helpers{ctrl: ctrl}
    36  	mock.recorder = &MockAPIV2HelpersMockRecorder{mock}
    37  	return mock
    38  }
    39  
    40  // EXPECT returns an object that allows the caller to indicate expected use.
    41  func (m *MockAPIV2Helpers) EXPECT() *MockAPIV2HelpersMockRecorder {
    42  	return m.recorder
    43  }
    44  
    45  // createTiStore mocks base method.
    46  func (m *MockAPIV2Helpers) createTiStore(pdAddrs []string, credential *security.Credential) (kv.Storage, error) {
    47  	m.ctrl.T.Helper()
    48  	ret := m.ctrl.Call(m, "createTiStore", pdAddrs, credential)
    49  	ret0, _ := ret[0].(kv.Storage)
    50  	ret1, _ := ret[1].(error)
    51  	return ret0, ret1
    52  }
    53  
    54  // createTiStore indicates an expected call of createTiStore.
    55  func (mr *MockAPIV2HelpersMockRecorder) createTiStore(pdAddrs, credential interface{}) *gomock.Call {
    56  	mr.mock.ctrl.T.Helper()
    57  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "createTiStore", reflect.TypeOf((*MockAPIV2Helpers)(nil).createTiStore), pdAddrs, credential)
    58  }
    59  
    60  // getEtcdClient mocks base method.
    61  func (m *MockAPIV2Helpers) getEtcdClient(pdAddrs []string, tlsConfig *tls.Config) (*v3.Client, error) {
    62  	m.ctrl.T.Helper()
    63  	ret := m.ctrl.Call(m, "getEtcdClient", pdAddrs, tlsConfig)
    64  	ret0, _ := ret[0].(*v3.Client)
    65  	ret1, _ := ret[1].(error)
    66  	return ret0, ret1
    67  }
    68  
    69  // getEtcdClient indicates an expected call of getEtcdClient.
    70  func (mr *MockAPIV2HelpersMockRecorder) getEtcdClient(pdAddrs, tlsConfig interface{}) *gomock.Call {
    71  	mr.mock.ctrl.T.Helper()
    72  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "getEtcdClient", reflect.TypeOf((*MockAPIV2Helpers)(nil).getEtcdClient), pdAddrs, tlsConfig)
    73  }
    74  
    75  // getPDClient mocks base method.
    76  func (m *MockAPIV2Helpers) getPDClient(ctx context.Context, pdAddrs []string, credential *security.Credential) (client.Client, error) {
    77  	m.ctrl.T.Helper()
    78  	ret := m.ctrl.Call(m, "getPDClient", ctx, pdAddrs, credential)
    79  	ret0, _ := ret[0].(client.Client)
    80  	ret1, _ := ret[1].(error)
    81  	return ret0, ret1
    82  }
    83  
    84  // getPDClient indicates an expected call of getPDClient.
    85  func (mr *MockAPIV2HelpersMockRecorder) getPDClient(ctx, pdAddrs, credential interface{}) *gomock.Call {
    86  	mr.mock.ctrl.T.Helper()
    87  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "getPDClient", reflect.TypeOf((*MockAPIV2Helpers)(nil).getPDClient), ctx, pdAddrs, credential)
    88  }
    89  
    90  // getVerifiedTables mocks base method.
    91  func (m *MockAPIV2Helpers) getVerifiedTables(replicaConfig *config.ReplicaConfig, storage kv.Storage, startTs uint64, scheme, topic string, protocol config.Protocol) ([]model.TableName, []model.TableName, error) {
    92  	m.ctrl.T.Helper()
    93  	ret := m.ctrl.Call(m, "getVerifiedTables", replicaConfig, storage, startTs, scheme, topic, protocol)
    94  	ret0, _ := ret[0].([]model.TableName)
    95  	ret1, _ := ret[1].([]model.TableName)
    96  	ret2, _ := ret[2].(error)
    97  	return ret0, ret1, ret2
    98  }
    99  
   100  // getVerifiedTables indicates an expected call of getVerifiedTables.
   101  func (mr *MockAPIV2HelpersMockRecorder) getVerifiedTables(replicaConfig, storage, startTs, scheme, topic, protocol interface{}) *gomock.Call {
   102  	mr.mock.ctrl.T.Helper()
   103  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "getVerifiedTables", reflect.TypeOf((*MockAPIV2Helpers)(nil).getVerifiedTables), replicaConfig, storage, startTs, scheme, topic, protocol)
   104  }
   105  
   106  // verifyCreateChangefeedConfig mocks base method.
   107  func (m *MockAPIV2Helpers) verifyCreateChangefeedConfig(ctx context.Context, cfg *ChangefeedConfig, pdClient client.Client, ctrl controller.Controller, ensureGCServiceID string, kvStorage kv.Storage) (*model.ChangeFeedInfo, error) {
   108  	m.ctrl.T.Helper()
   109  	ret := m.ctrl.Call(m, "verifyCreateChangefeedConfig", ctx, cfg, pdClient, ctrl, ensureGCServiceID, kvStorage)
   110  	ret0, _ := ret[0].(*model.ChangeFeedInfo)
   111  	ret1, _ := ret[1].(error)
   112  	return ret0, ret1
   113  }
   114  
   115  // verifyCreateChangefeedConfig indicates an expected call of verifyCreateChangefeedConfig.
   116  func (mr *MockAPIV2HelpersMockRecorder) verifyCreateChangefeedConfig(ctx, cfg, pdClient, ctrl, ensureGCServiceID, kvStorage interface{}) *gomock.Call {
   117  	mr.mock.ctrl.T.Helper()
   118  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "verifyCreateChangefeedConfig", reflect.TypeOf((*MockAPIV2Helpers)(nil).verifyCreateChangefeedConfig), ctx, cfg, pdClient, ctrl, ensureGCServiceID, kvStorage)
   119  }
   120  
   121  // verifyResumeChangefeedConfig mocks base method.
   122  func (m *MockAPIV2Helpers) verifyResumeChangefeedConfig(ctx context.Context, pdClient client.Client, gcServiceID string, changefeedID model.ChangeFeedID, overrideCheckpointTs uint64) error {
   123  	m.ctrl.T.Helper()
   124  	ret := m.ctrl.Call(m, "verifyResumeChangefeedConfig", ctx, pdClient, gcServiceID, changefeedID, overrideCheckpointTs)
   125  	ret0, _ := ret[0].(error)
   126  	return ret0
   127  }
   128  
   129  // verifyResumeChangefeedConfig indicates an expected call of verifyResumeChangefeedConfig.
   130  func (mr *MockAPIV2HelpersMockRecorder) verifyResumeChangefeedConfig(ctx, pdClient, gcServiceID, changefeedID, overrideCheckpointTs interface{}) *gomock.Call {
   131  	mr.mock.ctrl.T.Helper()
   132  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "verifyResumeChangefeedConfig", reflect.TypeOf((*MockAPIV2Helpers)(nil).verifyResumeChangefeedConfig), ctx, pdClient, gcServiceID, changefeedID, overrideCheckpointTs)
   133  }
   134  
   135  // verifyUpdateChangefeedConfig mocks base method.
   136  func (m *MockAPIV2Helpers) verifyUpdateChangefeedConfig(ctx context.Context, cfg *ChangefeedConfig, oldInfo *model.ChangeFeedInfo, oldUpInfo *model.UpstreamInfo, kvStorage kv.Storage, checkpointTs uint64) (*model.ChangeFeedInfo, *model.UpstreamInfo, error) {
   137  	m.ctrl.T.Helper()
   138  	ret := m.ctrl.Call(m, "verifyUpdateChangefeedConfig", ctx, cfg, oldInfo, oldUpInfo, kvStorage, checkpointTs)
   139  	ret0, _ := ret[0].(*model.ChangeFeedInfo)
   140  	ret1, _ := ret[1].(*model.UpstreamInfo)
   141  	ret2, _ := ret[2].(error)
   142  	return ret0, ret1, ret2
   143  }
   144  
   145  // verifyUpdateChangefeedConfig indicates an expected call of verifyUpdateChangefeedConfig.
   146  func (mr *MockAPIV2HelpersMockRecorder) verifyUpdateChangefeedConfig(ctx, cfg, oldInfo, oldUpInfo, kvStorage, checkpointTs interface{}) *gomock.Call {
   147  	mr.mock.ctrl.T.Helper()
   148  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "verifyUpdateChangefeedConfig", reflect.TypeOf((*MockAPIV2Helpers)(nil).verifyUpdateChangefeedConfig), ctx, cfg, oldInfo, oldUpInfo, kvStorage, checkpointTs)
   149  }
   150  
   151  // verifyUpstream mocks base method.
   152  func (m *MockAPIV2Helpers) verifyUpstream(ctx context.Context, changefeedConfig *ChangefeedConfig, cfInfo *model.ChangeFeedInfo) error {
   153  	m.ctrl.T.Helper()
   154  	ret := m.ctrl.Call(m, "verifyUpstream", ctx, changefeedConfig, cfInfo)
   155  	ret0, _ := ret[0].(error)
   156  	return ret0
   157  }
   158  
   159  // verifyUpstream indicates an expected call of verifyUpstream.
   160  func (mr *MockAPIV2HelpersMockRecorder) verifyUpstream(ctx, changefeedConfig, cfInfo interface{}) *gomock.Call {
   161  	mr.mock.ctrl.T.Helper()
   162  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "verifyUpstream", reflect.TypeOf((*MockAPIV2Helpers)(nil).verifyUpstream), ctx, changefeedConfig, cfInfo)
   163  }