github.com/m3db/m3@v1.5.0/src/dbnode/persist/persist_mock.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/m3db/m3/src/dbnode/persist/types.go 3 4 // Copyright (c) 2021 Uber Technologies, Inc. 5 // 6 // Permission is hereby granted, free of charge, to any person obtaining a copy 7 // of this software and associated documentation files (the "Software"), to deal 8 // in the Software without restriction, including without limitation the rights 9 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 // copies of the Software, and to permit persons to whom the Software is 11 // furnished to do so, subject to the following conditions: 12 // 13 // The above copyright notice and this permission notice shall be included in 14 // all copies or substantial portions of the Software. 15 // 16 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 // THE SOFTWARE. 23 24 // Package persist is a generated GoMock package. 25 package persist 26 27 import ( 28 "reflect" 29 30 "github.com/golang/mock/gomock" 31 "github.com/pborman/uuid" 32 ) 33 34 // MockManager is a mock of Manager interface. 35 type MockManager struct { 36 ctrl *gomock.Controller 37 recorder *MockManagerMockRecorder 38 } 39 40 // MockManagerMockRecorder is the mock recorder for MockManager. 41 type MockManagerMockRecorder struct { 42 mock *MockManager 43 } 44 45 // NewMockManager creates a new mock instance. 46 func NewMockManager(ctrl *gomock.Controller) *MockManager { 47 mock := &MockManager{ctrl: ctrl} 48 mock.recorder = &MockManagerMockRecorder{mock} 49 return mock 50 } 51 52 // EXPECT returns an object that allows the caller to indicate expected use. 53 func (m *MockManager) EXPECT() *MockManagerMockRecorder { 54 return m.recorder 55 } 56 57 // Close mocks base method. 58 func (m *MockManager) Close() { 59 m.ctrl.T.Helper() 60 m.ctrl.Call(m, "Close") 61 } 62 63 // Close indicates an expected call of Close. 64 func (mr *MockManagerMockRecorder) Close() *gomock.Call { 65 mr.mock.ctrl.T.Helper() 66 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockManager)(nil).Close)) 67 } 68 69 // StartFlushPersist mocks base method. 70 func (m *MockManager) StartFlushPersist() (FlushPreparer, error) { 71 m.ctrl.T.Helper() 72 ret := m.ctrl.Call(m, "StartFlushPersist") 73 ret0, _ := ret[0].(FlushPreparer) 74 ret1, _ := ret[1].(error) 75 return ret0, ret1 76 } 77 78 // StartFlushPersist indicates an expected call of StartFlushPersist. 79 func (mr *MockManagerMockRecorder) StartFlushPersist() *gomock.Call { 80 mr.mock.ctrl.T.Helper() 81 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartFlushPersist", reflect.TypeOf((*MockManager)(nil).StartFlushPersist)) 82 } 83 84 // StartIndexPersist mocks base method. 85 func (m *MockManager) StartIndexPersist() (IndexFlush, error) { 86 m.ctrl.T.Helper() 87 ret := m.ctrl.Call(m, "StartIndexPersist") 88 ret0, _ := ret[0].(IndexFlush) 89 ret1, _ := ret[1].(error) 90 return ret0, ret1 91 } 92 93 // StartIndexPersist indicates an expected call of StartIndexPersist. 94 func (mr *MockManagerMockRecorder) StartIndexPersist() *gomock.Call { 95 mr.mock.ctrl.T.Helper() 96 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartIndexPersist", reflect.TypeOf((*MockManager)(nil).StartIndexPersist)) 97 } 98 99 // StartSnapshotPersist mocks base method. 100 func (m *MockManager) StartSnapshotPersist(snapshotID uuid.UUID) (SnapshotPreparer, error) { 101 m.ctrl.T.Helper() 102 ret := m.ctrl.Call(m, "StartSnapshotPersist", snapshotID) 103 ret0, _ := ret[0].(SnapshotPreparer) 104 ret1, _ := ret[1].(error) 105 return ret0, ret1 106 } 107 108 // StartSnapshotPersist indicates an expected call of StartSnapshotPersist. 109 func (mr *MockManagerMockRecorder) StartSnapshotPersist(snapshotID interface{}) *gomock.Call { 110 mr.mock.ctrl.T.Helper() 111 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartSnapshotPersist", reflect.TypeOf((*MockManager)(nil).StartSnapshotPersist), snapshotID) 112 } 113 114 // MockPreparer is a mock of Preparer interface. 115 type MockPreparer struct { 116 ctrl *gomock.Controller 117 recorder *MockPreparerMockRecorder 118 } 119 120 // MockPreparerMockRecorder is the mock recorder for MockPreparer. 121 type MockPreparerMockRecorder struct { 122 mock *MockPreparer 123 } 124 125 // NewMockPreparer creates a new mock instance. 126 func NewMockPreparer(ctrl *gomock.Controller) *MockPreparer { 127 mock := &MockPreparer{ctrl: ctrl} 128 mock.recorder = &MockPreparerMockRecorder{mock} 129 return mock 130 } 131 132 // EXPECT returns an object that allows the caller to indicate expected use. 133 func (m *MockPreparer) EXPECT() *MockPreparerMockRecorder { 134 return m.recorder 135 } 136 137 // PrepareData mocks base method. 138 func (m *MockPreparer) PrepareData(opts DataPrepareOptions) (PreparedDataPersist, error) { 139 m.ctrl.T.Helper() 140 ret := m.ctrl.Call(m, "PrepareData", opts) 141 ret0, _ := ret[0].(PreparedDataPersist) 142 ret1, _ := ret[1].(error) 143 return ret0, ret1 144 } 145 146 // PrepareData indicates an expected call of PrepareData. 147 func (mr *MockPreparerMockRecorder) PrepareData(opts interface{}) *gomock.Call { 148 mr.mock.ctrl.T.Helper() 149 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareData", reflect.TypeOf((*MockPreparer)(nil).PrepareData), opts) 150 } 151 152 // MockFlushPreparer is a mock of FlushPreparer interface. 153 type MockFlushPreparer struct { 154 ctrl *gomock.Controller 155 recorder *MockFlushPreparerMockRecorder 156 } 157 158 // MockFlushPreparerMockRecorder is the mock recorder for MockFlushPreparer. 159 type MockFlushPreparerMockRecorder struct { 160 mock *MockFlushPreparer 161 } 162 163 // NewMockFlushPreparer creates a new mock instance. 164 func NewMockFlushPreparer(ctrl *gomock.Controller) *MockFlushPreparer { 165 mock := &MockFlushPreparer{ctrl: ctrl} 166 mock.recorder = &MockFlushPreparerMockRecorder{mock} 167 return mock 168 } 169 170 // EXPECT returns an object that allows the caller to indicate expected use. 171 func (m *MockFlushPreparer) EXPECT() *MockFlushPreparerMockRecorder { 172 return m.recorder 173 } 174 175 // DoneFlush mocks base method. 176 func (m *MockFlushPreparer) DoneFlush() error { 177 m.ctrl.T.Helper() 178 ret := m.ctrl.Call(m, "DoneFlush") 179 ret0, _ := ret[0].(error) 180 return ret0 181 } 182 183 // DoneFlush indicates an expected call of DoneFlush. 184 func (mr *MockFlushPreparerMockRecorder) DoneFlush() *gomock.Call { 185 mr.mock.ctrl.T.Helper() 186 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DoneFlush", reflect.TypeOf((*MockFlushPreparer)(nil).DoneFlush)) 187 } 188 189 // PrepareData mocks base method. 190 func (m *MockFlushPreparer) PrepareData(opts DataPrepareOptions) (PreparedDataPersist, error) { 191 m.ctrl.T.Helper() 192 ret := m.ctrl.Call(m, "PrepareData", opts) 193 ret0, _ := ret[0].(PreparedDataPersist) 194 ret1, _ := ret[1].(error) 195 return ret0, ret1 196 } 197 198 // PrepareData indicates an expected call of PrepareData. 199 func (mr *MockFlushPreparerMockRecorder) PrepareData(opts interface{}) *gomock.Call { 200 mr.mock.ctrl.T.Helper() 201 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareData", reflect.TypeOf((*MockFlushPreparer)(nil).PrepareData), opts) 202 } 203 204 // MockSnapshotPreparer is a mock of SnapshotPreparer interface. 205 type MockSnapshotPreparer struct { 206 ctrl *gomock.Controller 207 recorder *MockSnapshotPreparerMockRecorder 208 } 209 210 // MockSnapshotPreparerMockRecorder is the mock recorder for MockSnapshotPreparer. 211 type MockSnapshotPreparerMockRecorder struct { 212 mock *MockSnapshotPreparer 213 } 214 215 // NewMockSnapshotPreparer creates a new mock instance. 216 func NewMockSnapshotPreparer(ctrl *gomock.Controller) *MockSnapshotPreparer { 217 mock := &MockSnapshotPreparer{ctrl: ctrl} 218 mock.recorder = &MockSnapshotPreparerMockRecorder{mock} 219 return mock 220 } 221 222 // EXPECT returns an object that allows the caller to indicate expected use. 223 func (m *MockSnapshotPreparer) EXPECT() *MockSnapshotPreparerMockRecorder { 224 return m.recorder 225 } 226 227 // DoneSnapshot mocks base method. 228 func (m *MockSnapshotPreparer) DoneSnapshot(snapshotUUID uuid.UUID, commitLogIdentifier CommitLogFile) error { 229 m.ctrl.T.Helper() 230 ret := m.ctrl.Call(m, "DoneSnapshot", snapshotUUID, commitLogIdentifier) 231 ret0, _ := ret[0].(error) 232 return ret0 233 } 234 235 // DoneSnapshot indicates an expected call of DoneSnapshot. 236 func (mr *MockSnapshotPreparerMockRecorder) DoneSnapshot(snapshotUUID, commitLogIdentifier interface{}) *gomock.Call { 237 mr.mock.ctrl.T.Helper() 238 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DoneSnapshot", reflect.TypeOf((*MockSnapshotPreparer)(nil).DoneSnapshot), snapshotUUID, commitLogIdentifier) 239 } 240 241 // PrepareData mocks base method. 242 func (m *MockSnapshotPreparer) PrepareData(opts DataPrepareOptions) (PreparedDataPersist, error) { 243 m.ctrl.T.Helper() 244 ret := m.ctrl.Call(m, "PrepareData", opts) 245 ret0, _ := ret[0].(PreparedDataPersist) 246 ret1, _ := ret[1].(error) 247 return ret0, ret1 248 } 249 250 // PrepareData indicates an expected call of PrepareData. 251 func (mr *MockSnapshotPreparerMockRecorder) PrepareData(opts interface{}) *gomock.Call { 252 mr.mock.ctrl.T.Helper() 253 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareData", reflect.TypeOf((*MockSnapshotPreparer)(nil).PrepareData), opts) 254 } 255 256 // MockIndexFlush is a mock of IndexFlush interface. 257 type MockIndexFlush struct { 258 ctrl *gomock.Controller 259 recorder *MockIndexFlushMockRecorder 260 } 261 262 // MockIndexFlushMockRecorder is the mock recorder for MockIndexFlush. 263 type MockIndexFlushMockRecorder struct { 264 mock *MockIndexFlush 265 } 266 267 // NewMockIndexFlush creates a new mock instance. 268 func NewMockIndexFlush(ctrl *gomock.Controller) *MockIndexFlush { 269 mock := &MockIndexFlush{ctrl: ctrl} 270 mock.recorder = &MockIndexFlushMockRecorder{mock} 271 return mock 272 } 273 274 // EXPECT returns an object that allows the caller to indicate expected use. 275 func (m *MockIndexFlush) EXPECT() *MockIndexFlushMockRecorder { 276 return m.recorder 277 } 278 279 // DoneIndex mocks base method. 280 func (m *MockIndexFlush) DoneIndex() error { 281 m.ctrl.T.Helper() 282 ret := m.ctrl.Call(m, "DoneIndex") 283 ret0, _ := ret[0].(error) 284 return ret0 285 } 286 287 // DoneIndex indicates an expected call of DoneIndex. 288 func (mr *MockIndexFlushMockRecorder) DoneIndex() *gomock.Call { 289 mr.mock.ctrl.T.Helper() 290 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DoneIndex", reflect.TypeOf((*MockIndexFlush)(nil).DoneIndex)) 291 } 292 293 // PrepareIndex mocks base method. 294 func (m *MockIndexFlush) PrepareIndex(opts IndexPrepareOptions) (PreparedIndexPersist, error) { 295 m.ctrl.T.Helper() 296 ret := m.ctrl.Call(m, "PrepareIndex", opts) 297 ret0, _ := ret[0].(PreparedIndexPersist) 298 ret1, _ := ret[1].(error) 299 return ret0, ret1 300 } 301 302 // PrepareIndex indicates an expected call of PrepareIndex. 303 func (mr *MockIndexFlushMockRecorder) PrepareIndex(opts interface{}) *gomock.Call { 304 mr.mock.ctrl.T.Helper() 305 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareIndex", reflect.TypeOf((*MockIndexFlush)(nil).PrepareIndex), opts) 306 } 307 308 // MockOnFlushSeries is a mock of OnFlushSeries interface. 309 type MockOnFlushSeries struct { 310 ctrl *gomock.Controller 311 recorder *MockOnFlushSeriesMockRecorder 312 } 313 314 // MockOnFlushSeriesMockRecorder is the mock recorder for MockOnFlushSeries. 315 type MockOnFlushSeriesMockRecorder struct { 316 mock *MockOnFlushSeries 317 } 318 319 // NewMockOnFlushSeries creates a new mock instance. 320 func NewMockOnFlushSeries(ctrl *gomock.Controller) *MockOnFlushSeries { 321 mock := &MockOnFlushSeries{ctrl: ctrl} 322 mock.recorder = &MockOnFlushSeriesMockRecorder{mock} 323 return mock 324 } 325 326 // EXPECT returns an object that allows the caller to indicate expected use. 327 func (m *MockOnFlushSeries) EXPECT() *MockOnFlushSeriesMockRecorder { 328 return m.recorder 329 } 330 331 // CheckpointAndMaybeCompact mocks base method. 332 func (m *MockOnFlushSeries) CheckpointAndMaybeCompact() error { 333 m.ctrl.T.Helper() 334 ret := m.ctrl.Call(m, "CheckpointAndMaybeCompact") 335 ret0, _ := ret[0].(error) 336 return ret0 337 } 338 339 // CheckpointAndMaybeCompact indicates an expected call of CheckpointAndMaybeCompact. 340 func (mr *MockOnFlushSeriesMockRecorder) CheckpointAndMaybeCompact() *gomock.Call { 341 mr.mock.ctrl.T.Helper() 342 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckpointAndMaybeCompact", reflect.TypeOf((*MockOnFlushSeries)(nil).CheckpointAndMaybeCompact)) 343 } 344 345 // OnFlushNewSeries mocks base method. 346 func (m *MockOnFlushSeries) OnFlushNewSeries(arg0 OnFlushNewSeriesEvent) error { 347 m.ctrl.T.Helper() 348 ret := m.ctrl.Call(m, "OnFlushNewSeries", arg0) 349 ret0, _ := ret[0].(error) 350 return ret0 351 } 352 353 // OnFlushNewSeries indicates an expected call of OnFlushNewSeries. 354 func (mr *MockOnFlushSeriesMockRecorder) OnFlushNewSeries(arg0 interface{}) *gomock.Call { 355 mr.mock.ctrl.T.Helper() 356 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnFlushNewSeries", reflect.TypeOf((*MockOnFlushSeries)(nil).OnFlushNewSeries), arg0) 357 }