github.com/m3db/m3@v1.5.0/src/query/storage/m3/m3_mock.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/m3db/m3/src/query/storage/m3 (interfaces: Storage,ClusterNamespace,Clusters) 3 4 // Copyright (c) 2022 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 m3 is a generated GoMock package. 25 package m3 26 27 import ( 28 "context" 29 "reflect" 30 "time" 31 32 "github.com/m3db/m3/src/dbnode/client" 33 "github.com/m3db/m3/src/query/block" 34 "github.com/m3db/m3/src/query/storage" 35 "github.com/m3db/m3/src/query/storage/m3/consolidators" 36 "github.com/m3db/m3/src/query/storage/m3/storagemetadata" 37 "github.com/m3db/m3/src/x/ident" 38 39 "github.com/golang/mock/gomock" 40 ) 41 42 // MockStorage is a mock of Storage interface. 43 type MockStorage struct { 44 ctrl *gomock.Controller 45 recorder *MockStorageMockRecorder 46 } 47 48 // MockStorageMockRecorder is the mock recorder for MockStorage. 49 type MockStorageMockRecorder struct { 50 mock *MockStorage 51 } 52 53 // NewMockStorage creates a new mock instance. 54 func NewMockStorage(ctrl *gomock.Controller) *MockStorage { 55 mock := &MockStorage{ctrl: ctrl} 56 mock.recorder = &MockStorageMockRecorder{mock} 57 return mock 58 } 59 60 // EXPECT returns an object that allows the caller to indicate expected use. 61 func (m *MockStorage) EXPECT() *MockStorageMockRecorder { 62 return m.recorder 63 } 64 65 // Close mocks base method. 66 func (m *MockStorage) Close() error { 67 m.ctrl.T.Helper() 68 ret := m.ctrl.Call(m, "Close") 69 ret0, _ := ret[0].(error) 70 return ret0 71 } 72 73 // Close indicates an expected call of Close. 74 func (mr *MockStorageMockRecorder) Close() *gomock.Call { 75 mr.mock.ctrl.T.Helper() 76 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockStorage)(nil).Close)) 77 } 78 79 // CompleteTags mocks base method. 80 func (m *MockStorage) CompleteTags(arg0 context.Context, arg1 *storage.CompleteTagsQuery, arg2 *storage.FetchOptions) (*consolidators.CompleteTagsResult, error) { 81 m.ctrl.T.Helper() 82 ret := m.ctrl.Call(m, "CompleteTags", arg0, arg1, arg2) 83 ret0, _ := ret[0].(*consolidators.CompleteTagsResult) 84 ret1, _ := ret[1].(error) 85 return ret0, ret1 86 } 87 88 // CompleteTags indicates an expected call of CompleteTags. 89 func (mr *MockStorageMockRecorder) CompleteTags(arg0, arg1, arg2 interface{}) *gomock.Call { 90 mr.mock.ctrl.T.Helper() 91 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CompleteTags", reflect.TypeOf((*MockStorage)(nil).CompleteTags), arg0, arg1, arg2) 92 } 93 94 // CompleteTagsCompressed mocks base method. 95 func (m *MockStorage) CompleteTagsCompressed(arg0 context.Context, arg1 *storage.CompleteTagsQuery, arg2 *storage.FetchOptions) (*consolidators.CompleteTagsResult, error) { 96 m.ctrl.T.Helper() 97 ret := m.ctrl.Call(m, "CompleteTagsCompressed", arg0, arg1, arg2) 98 ret0, _ := ret[0].(*consolidators.CompleteTagsResult) 99 ret1, _ := ret[1].(error) 100 return ret0, ret1 101 } 102 103 // CompleteTagsCompressed indicates an expected call of CompleteTagsCompressed. 104 func (mr *MockStorageMockRecorder) CompleteTagsCompressed(arg0, arg1, arg2 interface{}) *gomock.Call { 105 mr.mock.ctrl.T.Helper() 106 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CompleteTagsCompressed", reflect.TypeOf((*MockStorage)(nil).CompleteTagsCompressed), arg0, arg1, arg2) 107 } 108 109 // ErrorBehavior mocks base method. 110 func (m *MockStorage) ErrorBehavior() storage.ErrorBehavior { 111 m.ctrl.T.Helper() 112 ret := m.ctrl.Call(m, "ErrorBehavior") 113 ret0, _ := ret[0].(storage.ErrorBehavior) 114 return ret0 115 } 116 117 // ErrorBehavior indicates an expected call of ErrorBehavior. 118 func (mr *MockStorageMockRecorder) ErrorBehavior() *gomock.Call { 119 mr.mock.ctrl.T.Helper() 120 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ErrorBehavior", reflect.TypeOf((*MockStorage)(nil).ErrorBehavior)) 121 } 122 123 // FetchBlocks mocks base method. 124 func (m *MockStorage) FetchBlocks(arg0 context.Context, arg1 *storage.FetchQuery, arg2 *storage.FetchOptions) (block.Result, error) { 125 m.ctrl.T.Helper() 126 ret := m.ctrl.Call(m, "FetchBlocks", arg0, arg1, arg2) 127 ret0, _ := ret[0].(block.Result) 128 ret1, _ := ret[1].(error) 129 return ret0, ret1 130 } 131 132 // FetchBlocks indicates an expected call of FetchBlocks. 133 func (mr *MockStorageMockRecorder) FetchBlocks(arg0, arg1, arg2 interface{}) *gomock.Call { 134 mr.mock.ctrl.T.Helper() 135 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FetchBlocks", reflect.TypeOf((*MockStorage)(nil).FetchBlocks), arg0, arg1, arg2) 136 } 137 138 // FetchCompressed mocks base method. 139 func (m *MockStorage) FetchCompressed(arg0 context.Context, arg1 *storage.FetchQuery, arg2 *storage.FetchOptions) (consolidators.MultiFetchResult, error) { 140 m.ctrl.T.Helper() 141 ret := m.ctrl.Call(m, "FetchCompressed", arg0, arg1, arg2) 142 ret0, _ := ret[0].(consolidators.MultiFetchResult) 143 ret1, _ := ret[1].(error) 144 return ret0, ret1 145 } 146 147 // FetchCompressed indicates an expected call of FetchCompressed. 148 func (mr *MockStorageMockRecorder) FetchCompressed(arg0, arg1, arg2 interface{}) *gomock.Call { 149 mr.mock.ctrl.T.Helper() 150 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FetchCompressed", reflect.TypeOf((*MockStorage)(nil).FetchCompressed), arg0, arg1, arg2) 151 } 152 153 // FetchCompressedResult mocks base method. 154 func (m *MockStorage) FetchCompressedResult(arg0 context.Context, arg1 *storage.FetchQuery, arg2 *storage.FetchOptions) (consolidators.SeriesFetchResult, Cleanup, error) { 155 m.ctrl.T.Helper() 156 ret := m.ctrl.Call(m, "FetchCompressedResult", arg0, arg1, arg2) 157 ret0, _ := ret[0].(consolidators.SeriesFetchResult) 158 ret1, _ := ret[1].(Cleanup) 159 ret2, _ := ret[2].(error) 160 return ret0, ret1, ret2 161 } 162 163 // FetchCompressedResult indicates an expected call of FetchCompressedResult. 164 func (mr *MockStorageMockRecorder) FetchCompressedResult(arg0, arg1, arg2 interface{}) *gomock.Call { 165 mr.mock.ctrl.T.Helper() 166 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FetchCompressedResult", reflect.TypeOf((*MockStorage)(nil).FetchCompressedResult), arg0, arg1, arg2) 167 } 168 169 // FetchProm mocks base method. 170 func (m *MockStorage) FetchProm(arg0 context.Context, arg1 *storage.FetchQuery, arg2 *storage.FetchOptions) (storage.PromResult, error) { 171 m.ctrl.T.Helper() 172 ret := m.ctrl.Call(m, "FetchProm", arg0, arg1, arg2) 173 ret0, _ := ret[0].(storage.PromResult) 174 ret1, _ := ret[1].(error) 175 return ret0, ret1 176 } 177 178 // FetchProm indicates an expected call of FetchProm. 179 func (mr *MockStorageMockRecorder) FetchProm(arg0, arg1, arg2 interface{}) *gomock.Call { 180 mr.mock.ctrl.T.Helper() 181 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FetchProm", reflect.TypeOf((*MockStorage)(nil).FetchProm), arg0, arg1, arg2) 182 } 183 184 // Name mocks base method. 185 func (m *MockStorage) Name() string { 186 m.ctrl.T.Helper() 187 ret := m.ctrl.Call(m, "Name") 188 ret0, _ := ret[0].(string) 189 return ret0 190 } 191 192 // Name indicates an expected call of Name. 193 func (mr *MockStorageMockRecorder) Name() *gomock.Call { 194 mr.mock.ctrl.T.Helper() 195 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockStorage)(nil).Name)) 196 } 197 198 // QueryStorageMetadataAttributes mocks base method. 199 func (m *MockStorage) QueryStorageMetadataAttributes(arg0 context.Context, arg1, arg2 time.Time, arg3 *storage.FetchOptions) ([]storagemetadata.Attributes, error) { 200 m.ctrl.T.Helper() 201 ret := m.ctrl.Call(m, "QueryStorageMetadataAttributes", arg0, arg1, arg2, arg3) 202 ret0, _ := ret[0].([]storagemetadata.Attributes) 203 ret1, _ := ret[1].(error) 204 return ret0, ret1 205 } 206 207 // QueryStorageMetadataAttributes indicates an expected call of QueryStorageMetadataAttributes. 208 func (mr *MockStorageMockRecorder) QueryStorageMetadataAttributes(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { 209 mr.mock.ctrl.T.Helper() 210 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryStorageMetadataAttributes", reflect.TypeOf((*MockStorage)(nil).QueryStorageMetadataAttributes), arg0, arg1, arg2, arg3) 211 } 212 213 // SearchCompressed mocks base method. 214 func (m *MockStorage) SearchCompressed(arg0 context.Context, arg1 *storage.FetchQuery, arg2 *storage.FetchOptions) (consolidators.TagResult, Cleanup, error) { 215 m.ctrl.T.Helper() 216 ret := m.ctrl.Call(m, "SearchCompressed", arg0, arg1, arg2) 217 ret0, _ := ret[0].(consolidators.TagResult) 218 ret1, _ := ret[1].(Cleanup) 219 ret2, _ := ret[2].(error) 220 return ret0, ret1, ret2 221 } 222 223 // SearchCompressed indicates an expected call of SearchCompressed. 224 func (mr *MockStorageMockRecorder) SearchCompressed(arg0, arg1, arg2 interface{}) *gomock.Call { 225 mr.mock.ctrl.T.Helper() 226 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SearchCompressed", reflect.TypeOf((*MockStorage)(nil).SearchCompressed), arg0, arg1, arg2) 227 } 228 229 // SearchSeries mocks base method. 230 func (m *MockStorage) SearchSeries(arg0 context.Context, arg1 *storage.FetchQuery, arg2 *storage.FetchOptions) (*storage.SearchResults, error) { 231 m.ctrl.T.Helper() 232 ret := m.ctrl.Call(m, "SearchSeries", arg0, arg1, arg2) 233 ret0, _ := ret[0].(*storage.SearchResults) 234 ret1, _ := ret[1].(error) 235 return ret0, ret1 236 } 237 238 // SearchSeries indicates an expected call of SearchSeries. 239 func (mr *MockStorageMockRecorder) SearchSeries(arg0, arg1, arg2 interface{}) *gomock.Call { 240 mr.mock.ctrl.T.Helper() 241 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SearchSeries", reflect.TypeOf((*MockStorage)(nil).SearchSeries), arg0, arg1, arg2) 242 } 243 244 // Type mocks base method. 245 func (m *MockStorage) Type() storage.Type { 246 m.ctrl.T.Helper() 247 ret := m.ctrl.Call(m, "Type") 248 ret0, _ := ret[0].(storage.Type) 249 return ret0 250 } 251 252 // Type indicates an expected call of Type. 253 func (mr *MockStorageMockRecorder) Type() *gomock.Call { 254 mr.mock.ctrl.T.Helper() 255 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockStorage)(nil).Type)) 256 } 257 258 // Write mocks base method. 259 func (m *MockStorage) Write(arg0 context.Context, arg1 *storage.WriteQuery) error { 260 m.ctrl.T.Helper() 261 ret := m.ctrl.Call(m, "Write", arg0, arg1) 262 ret0, _ := ret[0].(error) 263 return ret0 264 } 265 266 // Write indicates an expected call of Write. 267 func (mr *MockStorageMockRecorder) Write(arg0, arg1 interface{}) *gomock.Call { 268 mr.mock.ctrl.T.Helper() 269 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockStorage)(nil).Write), arg0, arg1) 270 } 271 272 // MockClusterNamespace is a mock of ClusterNamespace interface. 273 type MockClusterNamespace struct { 274 ctrl *gomock.Controller 275 recorder *MockClusterNamespaceMockRecorder 276 } 277 278 // MockClusterNamespaceMockRecorder is the mock recorder for MockClusterNamespace. 279 type MockClusterNamespaceMockRecorder struct { 280 mock *MockClusterNamespace 281 } 282 283 // NewMockClusterNamespace creates a new mock instance. 284 func NewMockClusterNamespace(ctrl *gomock.Controller) *MockClusterNamespace { 285 mock := &MockClusterNamespace{ctrl: ctrl} 286 mock.recorder = &MockClusterNamespaceMockRecorder{mock} 287 return mock 288 } 289 290 // EXPECT returns an object that allows the caller to indicate expected use. 291 func (m *MockClusterNamespace) EXPECT() *MockClusterNamespaceMockRecorder { 292 return m.recorder 293 } 294 295 // NamespaceID mocks base method. 296 func (m *MockClusterNamespace) NamespaceID() ident.ID { 297 m.ctrl.T.Helper() 298 ret := m.ctrl.Call(m, "NamespaceID") 299 ret0, _ := ret[0].(ident.ID) 300 return ret0 301 } 302 303 // NamespaceID indicates an expected call of NamespaceID. 304 func (mr *MockClusterNamespaceMockRecorder) NamespaceID() *gomock.Call { 305 mr.mock.ctrl.T.Helper() 306 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NamespaceID", reflect.TypeOf((*MockClusterNamespace)(nil).NamespaceID)) 307 } 308 309 // Options mocks base method. 310 func (m *MockClusterNamespace) Options() ClusterNamespaceOptions { 311 m.ctrl.T.Helper() 312 ret := m.ctrl.Call(m, "Options") 313 ret0, _ := ret[0].(ClusterNamespaceOptions) 314 return ret0 315 } 316 317 // Options indicates an expected call of Options. 318 func (mr *MockClusterNamespaceMockRecorder) Options() *gomock.Call { 319 mr.mock.ctrl.T.Helper() 320 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Options", reflect.TypeOf((*MockClusterNamespace)(nil).Options)) 321 } 322 323 // Session mocks base method. 324 func (m *MockClusterNamespace) Session() client.Session { 325 m.ctrl.T.Helper() 326 ret := m.ctrl.Call(m, "Session") 327 ret0, _ := ret[0].(client.Session) 328 return ret0 329 } 330 331 // Session indicates an expected call of Session. 332 func (mr *MockClusterNamespaceMockRecorder) Session() *gomock.Call { 333 mr.mock.ctrl.T.Helper() 334 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Session", reflect.TypeOf((*MockClusterNamespace)(nil).Session)) 335 } 336 337 // MockClusters is a mock of Clusters interface. 338 type MockClusters struct { 339 ctrl *gomock.Controller 340 recorder *MockClustersMockRecorder 341 } 342 343 // MockClustersMockRecorder is the mock recorder for MockClusters. 344 type MockClustersMockRecorder struct { 345 mock *MockClusters 346 } 347 348 // NewMockClusters creates a new mock instance. 349 func NewMockClusters(ctrl *gomock.Controller) *MockClusters { 350 mock := &MockClusters{ctrl: ctrl} 351 mock.recorder = &MockClustersMockRecorder{mock} 352 return mock 353 } 354 355 // EXPECT returns an object that allows the caller to indicate expected use. 356 func (m *MockClusters) EXPECT() *MockClustersMockRecorder { 357 return m.recorder 358 } 359 360 // AggregatedClusterNamespace mocks base method. 361 func (m *MockClusters) AggregatedClusterNamespace(arg0 RetentionResolution) (ClusterNamespace, bool) { 362 m.ctrl.T.Helper() 363 ret := m.ctrl.Call(m, "AggregatedClusterNamespace", arg0) 364 ret0, _ := ret[0].(ClusterNamespace) 365 ret1, _ := ret[1].(bool) 366 return ret0, ret1 367 } 368 369 // AggregatedClusterNamespace indicates an expected call of AggregatedClusterNamespace. 370 func (mr *MockClustersMockRecorder) AggregatedClusterNamespace(arg0 interface{}) *gomock.Call { 371 mr.mock.ctrl.T.Helper() 372 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AggregatedClusterNamespace", reflect.TypeOf((*MockClusters)(nil).AggregatedClusterNamespace), arg0) 373 } 374 375 // Close mocks base method. 376 func (m *MockClusters) Close() error { 377 m.ctrl.T.Helper() 378 ret := m.ctrl.Call(m, "Close") 379 ret0, _ := ret[0].(error) 380 return ret0 381 } 382 383 // Close indicates an expected call of Close. 384 func (mr *MockClustersMockRecorder) Close() *gomock.Call { 385 mr.mock.ctrl.T.Helper() 386 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockClusters)(nil).Close)) 387 } 388 389 // ClusterNamespaces mocks base method. 390 func (m *MockClusters) ClusterNamespaces() ClusterNamespaces { 391 m.ctrl.T.Helper() 392 ret := m.ctrl.Call(m, "ClusterNamespaces") 393 ret0, _ := ret[0].(ClusterNamespaces) 394 return ret0 395 } 396 397 // ClusterNamespaces indicates an expected call of ClusterNamespaces. 398 func (mr *MockClustersMockRecorder) ClusterNamespaces() *gomock.Call { 399 mr.mock.ctrl.T.Helper() 400 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClusterNamespaces", reflect.TypeOf((*MockClusters)(nil).ClusterNamespaces)) 401 } 402 403 // ConfigType mocks base method. 404 func (m *MockClusters) ConfigType() ClusterConfigType { 405 m.ctrl.T.Helper() 406 ret := m.ctrl.Call(m, "ConfigType") 407 ret0, _ := ret[0].(ClusterConfigType) 408 return ret0 409 } 410 411 // ConfigType indicates an expected call of ConfigType. 412 func (mr *MockClustersMockRecorder) ConfigType() *gomock.Call { 413 mr.mock.ctrl.T.Helper() 414 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigType", reflect.TypeOf((*MockClusters)(nil).ConfigType)) 415 } 416 417 // NonReadyClusterNamespaces mocks base method. 418 func (m *MockClusters) NonReadyClusterNamespaces() ClusterNamespaces { 419 m.ctrl.T.Helper() 420 ret := m.ctrl.Call(m, "NonReadyClusterNamespaces") 421 ret0, _ := ret[0].(ClusterNamespaces) 422 return ret0 423 } 424 425 // NonReadyClusterNamespaces indicates an expected call of NonReadyClusterNamespaces. 426 func (mr *MockClustersMockRecorder) NonReadyClusterNamespaces() *gomock.Call { 427 mr.mock.ctrl.T.Helper() 428 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NonReadyClusterNamespaces", reflect.TypeOf((*MockClusters)(nil).NonReadyClusterNamespaces)) 429 } 430 431 // UnaggregatedClusterNamespace mocks base method. 432 func (m *MockClusters) UnaggregatedClusterNamespace() (ClusterNamespace, bool) { 433 m.ctrl.T.Helper() 434 ret := m.ctrl.Call(m, "UnaggregatedClusterNamespace") 435 ret0, _ := ret[0].(ClusterNamespace) 436 ret1, _ := ret[1].(bool) 437 return ret0, ret1 438 } 439 440 // UnaggregatedClusterNamespace indicates an expected call of UnaggregatedClusterNamespace. 441 func (mr *MockClustersMockRecorder) UnaggregatedClusterNamespace() *gomock.Call { 442 mr.mock.ctrl.T.Helper() 443 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnaggregatedClusterNamespace", reflect.TypeOf((*MockClusters)(nil).UnaggregatedClusterNamespace)) 444 }