github.com/m3db/m3@v1.5.0/src/dbnode/ts/writes/write_batch_mock.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/m3db/m3/src/dbnode/ts/writes/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 writes is a generated GoMock package. 25 package writes 26 27 import ( 28 "reflect" 29 30 "github.com/m3db/m3/src/dbnode/ts" 31 "github.com/m3db/m3/src/x/ident" 32 "github.com/m3db/m3/src/x/time" 33 34 "github.com/golang/mock/gomock" 35 ) 36 37 // MockWriteBatch is a mock of WriteBatch interface. 38 type MockWriteBatch struct { 39 ctrl *gomock.Controller 40 recorder *MockWriteBatchMockRecorder 41 } 42 43 // MockWriteBatchMockRecorder is the mock recorder for MockWriteBatch. 44 type MockWriteBatchMockRecorder struct { 45 mock *MockWriteBatch 46 } 47 48 // NewMockWriteBatch creates a new mock instance. 49 func NewMockWriteBatch(ctrl *gomock.Controller) *MockWriteBatch { 50 mock := &MockWriteBatch{ctrl: ctrl} 51 mock.recorder = &MockWriteBatchMockRecorder{mock} 52 return mock 53 } 54 55 // EXPECT returns an object that allows the caller to indicate expected use. 56 func (m *MockWriteBatch) EXPECT() *MockWriteBatchMockRecorder { 57 return m.recorder 58 } 59 60 // Add mocks base method. 61 func (m *MockWriteBatch) Add(originalIndex int, id ident.ID, timestamp time.UnixNano, value float64, unit time.Unit, annotation []byte) error { 62 m.ctrl.T.Helper() 63 ret := m.ctrl.Call(m, "Add", originalIndex, id, timestamp, value, unit, annotation) 64 ret0, _ := ret[0].(error) 65 return ret0 66 } 67 68 // Add indicates an expected call of Add. 69 func (mr *MockWriteBatchMockRecorder) Add(originalIndex, id, timestamp, value, unit, annotation interface{}) *gomock.Call { 70 mr.mock.ctrl.T.Helper() 71 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockWriteBatch)(nil).Add), originalIndex, id, timestamp, value, unit, annotation) 72 } 73 74 // AddTagged mocks base method. 75 func (m *MockWriteBatch) AddTagged(originalIndex int, id ident.ID, encodedTags ts.EncodedTags, timestamp time.UnixNano, value float64, unit time.Unit, annotation []byte) error { 76 m.ctrl.T.Helper() 77 ret := m.ctrl.Call(m, "AddTagged", originalIndex, id, encodedTags, timestamp, value, unit, annotation) 78 ret0, _ := ret[0].(error) 79 return ret0 80 } 81 82 // AddTagged indicates an expected call of AddTagged. 83 func (mr *MockWriteBatchMockRecorder) AddTagged(originalIndex, id, encodedTags, timestamp, value, unit, annotation interface{}) *gomock.Call { 84 mr.mock.ctrl.T.Helper() 85 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddTagged", reflect.TypeOf((*MockWriteBatch)(nil).AddTagged), originalIndex, id, encodedTags, timestamp, value, unit, annotation) 86 } 87 88 // Finalize mocks base method. 89 func (m *MockWriteBatch) Finalize() { 90 m.ctrl.T.Helper() 91 m.ctrl.Call(m, "Finalize") 92 } 93 94 // Finalize indicates an expected call of Finalize. 95 func (mr *MockWriteBatchMockRecorder) Finalize() *gomock.Call { 96 mr.mock.ctrl.T.Helper() 97 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Finalize", reflect.TypeOf((*MockWriteBatch)(nil).Finalize)) 98 } 99 100 // Iter mocks base method. 101 func (m *MockWriteBatch) Iter() []BatchWrite { 102 m.ctrl.T.Helper() 103 ret := m.ctrl.Call(m, "Iter") 104 ret0, _ := ret[0].([]BatchWrite) 105 return ret0 106 } 107 108 // Iter indicates an expected call of Iter. 109 func (mr *MockWriteBatchMockRecorder) Iter() *gomock.Call { 110 mr.mock.ctrl.T.Helper() 111 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Iter", reflect.TypeOf((*MockWriteBatch)(nil).Iter)) 112 } 113 114 // PendingIndex mocks base method. 115 func (m *MockWriteBatch) PendingIndex() []PendingIndexInsert { 116 m.ctrl.T.Helper() 117 ret := m.ctrl.Call(m, "PendingIndex") 118 ret0, _ := ret[0].([]PendingIndexInsert) 119 return ret0 120 } 121 122 // PendingIndex indicates an expected call of PendingIndex. 123 func (mr *MockWriteBatchMockRecorder) PendingIndex() *gomock.Call { 124 mr.mock.ctrl.T.Helper() 125 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PendingIndex", reflect.TypeOf((*MockWriteBatch)(nil).PendingIndex)) 126 } 127 128 // Reset mocks base method. 129 func (m *MockWriteBatch) Reset(batchSize int, ns ident.ID) { 130 m.ctrl.T.Helper() 131 m.ctrl.Call(m, "Reset", batchSize, ns) 132 } 133 134 // Reset indicates an expected call of Reset. 135 func (mr *MockWriteBatchMockRecorder) Reset(batchSize, ns interface{}) *gomock.Call { 136 mr.mock.ctrl.T.Helper() 137 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reset", reflect.TypeOf((*MockWriteBatch)(nil).Reset), batchSize, ns) 138 } 139 140 // SetError mocks base method. 141 func (m *MockWriteBatch) SetError(idx int, err error) { 142 m.ctrl.T.Helper() 143 m.ctrl.Call(m, "SetError", idx, err) 144 } 145 146 // SetError indicates an expected call of SetError. 147 func (mr *MockWriteBatchMockRecorder) SetError(idx, err interface{}) *gomock.Call { 148 mr.mock.ctrl.T.Helper() 149 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetError", reflect.TypeOf((*MockWriteBatch)(nil).SetError), idx, err) 150 } 151 152 // SetFinalizeAnnotationFn mocks base method. 153 func (m *MockWriteBatch) SetFinalizeAnnotationFn(f FinalizeAnnotationFn) { 154 m.ctrl.T.Helper() 155 m.ctrl.Call(m, "SetFinalizeAnnotationFn", f) 156 } 157 158 // SetFinalizeAnnotationFn indicates an expected call of SetFinalizeAnnotationFn. 159 func (mr *MockWriteBatchMockRecorder) SetFinalizeAnnotationFn(f interface{}) *gomock.Call { 160 mr.mock.ctrl.T.Helper() 161 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetFinalizeAnnotationFn", reflect.TypeOf((*MockWriteBatch)(nil).SetFinalizeAnnotationFn), f) 162 } 163 164 // SetFinalizeEncodedTagsFn mocks base method. 165 func (m *MockWriteBatch) SetFinalizeEncodedTagsFn(f FinalizeEncodedTagsFn) { 166 m.ctrl.T.Helper() 167 m.ctrl.Call(m, "SetFinalizeEncodedTagsFn", f) 168 } 169 170 // SetFinalizeEncodedTagsFn indicates an expected call of SetFinalizeEncodedTagsFn. 171 func (mr *MockWriteBatchMockRecorder) SetFinalizeEncodedTagsFn(f interface{}) *gomock.Call { 172 mr.mock.ctrl.T.Helper() 173 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetFinalizeEncodedTagsFn", reflect.TypeOf((*MockWriteBatch)(nil).SetFinalizeEncodedTagsFn), f) 174 } 175 176 // SetPendingIndex mocks base method. 177 func (m *MockWriteBatch) SetPendingIndex(idx int, pending PendingIndexInsert) { 178 m.ctrl.T.Helper() 179 m.ctrl.Call(m, "SetPendingIndex", idx, pending) 180 } 181 182 // SetPendingIndex indicates an expected call of SetPendingIndex. 183 func (mr *MockWriteBatchMockRecorder) SetPendingIndex(idx, pending interface{}) *gomock.Call { 184 mr.mock.ctrl.T.Helper() 185 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPendingIndex", reflect.TypeOf((*MockWriteBatch)(nil).SetPendingIndex), idx, pending) 186 } 187 188 // SetSeries mocks base method. 189 func (m *MockWriteBatch) SetSeries(idx int, series ts.Series) { 190 m.ctrl.T.Helper() 191 m.ctrl.Call(m, "SetSeries", idx, series) 192 } 193 194 // SetSeries indicates an expected call of SetSeries. 195 func (mr *MockWriteBatchMockRecorder) SetSeries(idx, series interface{}) *gomock.Call { 196 mr.mock.ctrl.T.Helper() 197 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetSeries", reflect.TypeOf((*MockWriteBatch)(nil).SetSeries), idx, series) 198 } 199 200 // SetSkipWrite mocks base method. 201 func (m *MockWriteBatch) SetSkipWrite(idx int) { 202 m.ctrl.T.Helper() 203 m.ctrl.Call(m, "SetSkipWrite", idx) 204 } 205 206 // SetSkipWrite indicates an expected call of SetSkipWrite. 207 func (mr *MockWriteBatchMockRecorder) SetSkipWrite(idx interface{}) *gomock.Call { 208 mr.mock.ctrl.T.Helper() 209 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetSkipWrite", reflect.TypeOf((*MockWriteBatch)(nil).SetSkipWrite), idx) 210 } 211 212 // cap mocks base method. 213 func (m *MockWriteBatch) cap() int { 214 m.ctrl.T.Helper() 215 ret := m.ctrl.Call(m, "cap") 216 ret0, _ := ret[0].(int) 217 return ret0 218 } 219 220 // cap indicates an expected call of cap. 221 func (mr *MockWriteBatchMockRecorder) cap() *gomock.Call { 222 mr.mock.ctrl.T.Helper() 223 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "cap", reflect.TypeOf((*MockWriteBatch)(nil).cap)) 224 } 225 226 // MockBatchWriter is a mock of BatchWriter interface. 227 type MockBatchWriter struct { 228 ctrl *gomock.Controller 229 recorder *MockBatchWriterMockRecorder 230 } 231 232 // MockBatchWriterMockRecorder is the mock recorder for MockBatchWriter. 233 type MockBatchWriterMockRecorder struct { 234 mock *MockBatchWriter 235 } 236 237 // NewMockBatchWriter creates a new mock instance. 238 func NewMockBatchWriter(ctrl *gomock.Controller) *MockBatchWriter { 239 mock := &MockBatchWriter{ctrl: ctrl} 240 mock.recorder = &MockBatchWriterMockRecorder{mock} 241 return mock 242 } 243 244 // EXPECT returns an object that allows the caller to indicate expected use. 245 func (m *MockBatchWriter) EXPECT() *MockBatchWriterMockRecorder { 246 return m.recorder 247 } 248 249 // Add mocks base method. 250 func (m *MockBatchWriter) Add(originalIndex int, id ident.ID, timestamp time.UnixNano, value float64, unit time.Unit, annotation []byte) error { 251 m.ctrl.T.Helper() 252 ret := m.ctrl.Call(m, "Add", originalIndex, id, timestamp, value, unit, annotation) 253 ret0, _ := ret[0].(error) 254 return ret0 255 } 256 257 // Add indicates an expected call of Add. 258 func (mr *MockBatchWriterMockRecorder) Add(originalIndex, id, timestamp, value, unit, annotation interface{}) *gomock.Call { 259 mr.mock.ctrl.T.Helper() 260 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockBatchWriter)(nil).Add), originalIndex, id, timestamp, value, unit, annotation) 261 } 262 263 // AddTagged mocks base method. 264 func (m *MockBatchWriter) AddTagged(originalIndex int, id ident.ID, encodedTags ts.EncodedTags, timestamp time.UnixNano, value float64, unit time.Unit, annotation []byte) error { 265 m.ctrl.T.Helper() 266 ret := m.ctrl.Call(m, "AddTagged", originalIndex, id, encodedTags, timestamp, value, unit, annotation) 267 ret0, _ := ret[0].(error) 268 return ret0 269 } 270 271 // AddTagged indicates an expected call of AddTagged. 272 func (mr *MockBatchWriterMockRecorder) AddTagged(originalIndex, id, encodedTags, timestamp, value, unit, annotation interface{}) *gomock.Call { 273 mr.mock.ctrl.T.Helper() 274 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddTagged", reflect.TypeOf((*MockBatchWriter)(nil).AddTagged), originalIndex, id, encodedTags, timestamp, value, unit, annotation) 275 } 276 277 // SetFinalizeAnnotationFn mocks base method. 278 func (m *MockBatchWriter) SetFinalizeAnnotationFn(f FinalizeAnnotationFn) { 279 m.ctrl.T.Helper() 280 m.ctrl.Call(m, "SetFinalizeAnnotationFn", f) 281 } 282 283 // SetFinalizeAnnotationFn indicates an expected call of SetFinalizeAnnotationFn. 284 func (mr *MockBatchWriterMockRecorder) SetFinalizeAnnotationFn(f interface{}) *gomock.Call { 285 mr.mock.ctrl.T.Helper() 286 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetFinalizeAnnotationFn", reflect.TypeOf((*MockBatchWriter)(nil).SetFinalizeAnnotationFn), f) 287 } 288 289 // SetFinalizeEncodedTagsFn mocks base method. 290 func (m *MockBatchWriter) SetFinalizeEncodedTagsFn(f FinalizeEncodedTagsFn) { 291 m.ctrl.T.Helper() 292 m.ctrl.Call(m, "SetFinalizeEncodedTagsFn", f) 293 } 294 295 // SetFinalizeEncodedTagsFn indicates an expected call of SetFinalizeEncodedTagsFn. 296 func (mr *MockBatchWriterMockRecorder) SetFinalizeEncodedTagsFn(f interface{}) *gomock.Call { 297 mr.mock.ctrl.T.Helper() 298 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetFinalizeEncodedTagsFn", reflect.TypeOf((*MockBatchWriter)(nil).SetFinalizeEncodedTagsFn), f) 299 }