github.com/polarismesh/polaris@v1.17.8/store/mock/admin_mock.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: mysql/admin.go 3 4 // Package mock is a generated GoMock package. 5 package mock 6 7 import ( 8 reflect "reflect" 9 10 gomock "github.com/golang/mock/gomock" 11 model "github.com/polarismesh/polaris/common/model" 12 ) 13 14 // MockLeaderElectionStore is a mock of LeaderElectionStore interface. 15 type MockLeaderElectionStore struct { 16 ctrl *gomock.Controller 17 recorder *MockLeaderElectionStoreMockRecorder 18 } 19 20 // MockLeaderElectionStoreMockRecorder is the mock recorder for MockLeaderElectionStore. 21 type MockLeaderElectionStoreMockRecorder struct { 22 mock *MockLeaderElectionStore 23 } 24 25 // NewMockLeaderElectionStore creates a new mock instance. 26 func NewMockLeaderElectionStore(ctrl *gomock.Controller) *MockLeaderElectionStore { 27 mock := &MockLeaderElectionStore{ctrl: ctrl} 28 mock.recorder = &MockLeaderElectionStoreMockRecorder{mock} 29 return mock 30 } 31 32 // EXPECT returns an object that allows the caller to indicate expected use. 33 func (m *MockLeaderElectionStore) EXPECT() *MockLeaderElectionStoreMockRecorder { 34 return m.recorder 35 } 36 37 // CheckMtimeExpired mocks base method. 38 func (m *MockLeaderElectionStore) CheckMtimeExpired(key string, leaseTime int32) (string, bool, error) { 39 m.ctrl.T.Helper() 40 ret := m.ctrl.Call(m, "CheckMtimeExpired", key, leaseTime) 41 ret0, _ := ret[0].(string) 42 ret1, _ := ret[1].(bool) 43 ret2, _ := ret[2].(error) 44 return ret0, ret1, ret2 45 } 46 47 // CheckMtimeExpired indicates an expected call of CheckMtimeExpired. 48 func (mr *MockLeaderElectionStoreMockRecorder) CheckMtimeExpired(key, leaseTime interface{}) *gomock.Call { 49 mr.mock.ctrl.T.Helper() 50 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckMtimeExpired", reflect.TypeOf((*MockLeaderElectionStore)(nil).CheckMtimeExpired), key, leaseTime) 51 } 52 53 // CompareAndSwapVersion mocks base method. 54 func (m *MockLeaderElectionStore) CompareAndSwapVersion(key string, curVersion, newVersion int64, leader string) (bool, error) { 55 m.ctrl.T.Helper() 56 ret := m.ctrl.Call(m, "CompareAndSwapVersion", key, curVersion, newVersion, leader) 57 ret0, _ := ret[0].(bool) 58 ret1, _ := ret[1].(error) 59 return ret0, ret1 60 } 61 62 // CompareAndSwapVersion indicates an expected call of CompareAndSwapVersion. 63 func (mr *MockLeaderElectionStoreMockRecorder) CompareAndSwapVersion(key, curVersion, newVersion, leader interface{}) *gomock.Call { 64 mr.mock.ctrl.T.Helper() 65 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CompareAndSwapVersion", reflect.TypeOf((*MockLeaderElectionStore)(nil).CompareAndSwapVersion), key, curVersion, newVersion, leader) 66 } 67 68 // CreateLeaderElection mocks base method. 69 func (m *MockLeaderElectionStore) CreateLeaderElection(key string) error { 70 m.ctrl.T.Helper() 71 ret := m.ctrl.Call(m, "CreateLeaderElection", key) 72 ret0, _ := ret[0].(error) 73 return ret0 74 } 75 76 // CreateLeaderElection indicates an expected call of CreateLeaderElection. 77 func (mr *MockLeaderElectionStoreMockRecorder) CreateLeaderElection(key interface{}) *gomock.Call { 78 mr.mock.ctrl.T.Helper() 79 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateLeaderElection", reflect.TypeOf((*MockLeaderElectionStore)(nil).CreateLeaderElection), key) 80 } 81 82 // GetVersion mocks base method. 83 func (m *MockLeaderElectionStore) GetVersion(key string) (int64, error) { 84 m.ctrl.T.Helper() 85 ret := m.ctrl.Call(m, "GetVersion", key) 86 ret0, _ := ret[0].(int64) 87 ret1, _ := ret[1].(error) 88 return ret0, ret1 89 } 90 91 // GetVersion indicates an expected call of GetVersion. 92 func (mr *MockLeaderElectionStoreMockRecorder) GetVersion(key interface{}) *gomock.Call { 93 mr.mock.ctrl.T.Helper() 94 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVersion", reflect.TypeOf((*MockLeaderElectionStore)(nil).GetVersion), key) 95 } 96 97 // ListLeaderElections mocks base method. 98 func (m *MockLeaderElectionStore) ListLeaderElections() ([]*model.LeaderElection, error) { 99 m.ctrl.T.Helper() 100 ret := m.ctrl.Call(m, "ListLeaderElections") 101 ret0, _ := ret[0].([]*model.LeaderElection) 102 ret1, _ := ret[1].(error) 103 return ret0, ret1 104 } 105 106 // ListLeaderElections indicates an expected call of ListLeaderElections. 107 func (mr *MockLeaderElectionStoreMockRecorder) ListLeaderElections() *gomock.Call { 108 mr.mock.ctrl.T.Helper() 109 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListLeaderElections", reflect.TypeOf((*MockLeaderElectionStore)(nil).ListLeaderElections)) 110 }