go.temporal.io/server@v1.23.0/common/persistence/nosql/nosqlplugin/cassandra/gocql/interfaces_mock.go (about) 1 // The MIT License 2 // 3 // Copyright (c) 2020 Temporal Technologies Inc. All rights reserved. 4 // 5 // Copyright (c) 2020 Uber Technologies, Inc. 6 // 7 // Permission is hereby granted, free of charge, to any person obtaining a copy 8 // of this software and associated documentation files (the "Software"), to deal 9 // in the Software without restriction, including without limitation the rights 10 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 // copies of the Software, and to permit persons to whom the Software is 12 // furnished to do so, subject to the following conditions: 13 // 14 // The above copyright notice and this permission notice shall be included in 15 // all copies or substantial portions of the Software. 16 // 17 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 // THE SOFTWARE. 24 25 // Code generated by MockGen. DO NOT EDIT. 26 // Source: interfaces.go 27 28 // Package gocql is a generated GoMock package. 29 package gocql 30 31 import ( 32 context "context" 33 reflect "reflect" 34 35 gomock "github.com/golang/mock/gomock" 36 ) 37 38 // MockSession is a mock of Session interface. 39 type MockSession struct { 40 ctrl *gomock.Controller 41 recorder *MockSessionMockRecorder 42 } 43 44 // MockSessionMockRecorder is the mock recorder for MockSession. 45 type MockSessionMockRecorder struct { 46 mock *MockSession 47 } 48 49 // NewMockSession creates a new mock instance. 50 func NewMockSession(ctrl *gomock.Controller) *MockSession { 51 mock := &MockSession{ctrl: ctrl} 52 mock.recorder = &MockSessionMockRecorder{mock} 53 return mock 54 } 55 56 // EXPECT returns an object that allows the caller to indicate expected use. 57 func (m *MockSession) EXPECT() *MockSessionMockRecorder { 58 return m.recorder 59 } 60 61 // AwaitSchemaAgreement mocks base method. 62 func (m *MockSession) AwaitSchemaAgreement(ctx context.Context) error { 63 m.ctrl.T.Helper() 64 ret := m.ctrl.Call(m, "AwaitSchemaAgreement", ctx) 65 ret0, _ := ret[0].(error) 66 return ret0 67 } 68 69 // AwaitSchemaAgreement indicates an expected call of AwaitSchemaAgreement. 70 func (mr *MockSessionMockRecorder) AwaitSchemaAgreement(ctx interface{}) *gomock.Call { 71 mr.mock.ctrl.T.Helper() 72 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AwaitSchemaAgreement", reflect.TypeOf((*MockSession)(nil).AwaitSchemaAgreement), ctx) 73 } 74 75 // Close mocks base method. 76 func (m *MockSession) Close() { 77 m.ctrl.T.Helper() 78 m.ctrl.Call(m, "Close") 79 } 80 81 // Close indicates an expected call of Close. 82 func (mr *MockSessionMockRecorder) Close() *gomock.Call { 83 mr.mock.ctrl.T.Helper() 84 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockSession)(nil).Close)) 85 } 86 87 // ExecuteBatch mocks base method. 88 func (m *MockSession) ExecuteBatch(arg0 Batch) error { 89 m.ctrl.T.Helper() 90 ret := m.ctrl.Call(m, "ExecuteBatch", arg0) 91 ret0, _ := ret[0].(error) 92 return ret0 93 } 94 95 // ExecuteBatch indicates an expected call of ExecuteBatch. 96 func (mr *MockSessionMockRecorder) ExecuteBatch(arg0 interface{}) *gomock.Call { 97 mr.mock.ctrl.T.Helper() 98 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecuteBatch", reflect.TypeOf((*MockSession)(nil).ExecuteBatch), arg0) 99 } 100 101 // MapExecuteBatchCAS mocks base method. 102 func (m *MockSession) MapExecuteBatchCAS(arg0 Batch, arg1 map[string]interface{}) (bool, Iter, error) { 103 m.ctrl.T.Helper() 104 ret := m.ctrl.Call(m, "MapExecuteBatchCAS", arg0, arg1) 105 ret0, _ := ret[0].(bool) 106 ret1, _ := ret[1].(Iter) 107 ret2, _ := ret[2].(error) 108 return ret0, ret1, ret2 109 } 110 111 // MapExecuteBatchCAS indicates an expected call of MapExecuteBatchCAS. 112 func (mr *MockSessionMockRecorder) MapExecuteBatchCAS(arg0, arg1 interface{}) *gomock.Call { 113 mr.mock.ctrl.T.Helper() 114 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MapExecuteBatchCAS", reflect.TypeOf((*MockSession)(nil).MapExecuteBatchCAS), arg0, arg1) 115 } 116 117 // NewBatch mocks base method. 118 func (m *MockSession) NewBatch(arg0 BatchType) Batch { 119 m.ctrl.T.Helper() 120 ret := m.ctrl.Call(m, "NewBatch", arg0) 121 ret0, _ := ret[0].(Batch) 122 return ret0 123 } 124 125 // NewBatch indicates an expected call of NewBatch. 126 func (mr *MockSessionMockRecorder) NewBatch(arg0 interface{}) *gomock.Call { 127 mr.mock.ctrl.T.Helper() 128 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewBatch", reflect.TypeOf((*MockSession)(nil).NewBatch), arg0) 129 } 130 131 // Query mocks base method. 132 func (m *MockSession) Query(arg0 string, arg1 ...interface{}) Query { 133 m.ctrl.T.Helper() 134 varargs := []interface{}{arg0} 135 for _, a := range arg1 { 136 varargs = append(varargs, a) 137 } 138 ret := m.ctrl.Call(m, "Query", varargs...) 139 ret0, _ := ret[0].(Query) 140 return ret0 141 } 142 143 // Query indicates an expected call of Query. 144 func (mr *MockSessionMockRecorder) Query(arg0 interface{}, arg1 ...interface{}) *gomock.Call { 145 mr.mock.ctrl.T.Helper() 146 varargs := append([]interface{}{arg0}, arg1...) 147 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Query", reflect.TypeOf((*MockSession)(nil).Query), varargs...) 148 } 149 150 // MockQuery is a mock of Query interface. 151 type MockQuery struct { 152 ctrl *gomock.Controller 153 recorder *MockQueryMockRecorder 154 } 155 156 // MockQueryMockRecorder is the mock recorder for MockQuery. 157 type MockQueryMockRecorder struct { 158 mock *MockQuery 159 } 160 161 // NewMockQuery creates a new mock instance. 162 func NewMockQuery(ctrl *gomock.Controller) *MockQuery { 163 mock := &MockQuery{ctrl: ctrl} 164 mock.recorder = &MockQueryMockRecorder{mock} 165 return mock 166 } 167 168 // EXPECT returns an object that allows the caller to indicate expected use. 169 func (m *MockQuery) EXPECT() *MockQueryMockRecorder { 170 return m.recorder 171 } 172 173 // Bind mocks base method. 174 func (m *MockQuery) Bind(arg0 ...interface{}) Query { 175 m.ctrl.T.Helper() 176 varargs := []interface{}{} 177 for _, a := range arg0 { 178 varargs = append(varargs, a) 179 } 180 ret := m.ctrl.Call(m, "Bind", varargs...) 181 ret0, _ := ret[0].(Query) 182 return ret0 183 } 184 185 // Bind indicates an expected call of Bind. 186 func (mr *MockQueryMockRecorder) Bind(arg0 ...interface{}) *gomock.Call { 187 mr.mock.ctrl.T.Helper() 188 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bind", reflect.TypeOf((*MockQuery)(nil).Bind), arg0...) 189 } 190 191 // Consistency mocks base method. 192 func (m *MockQuery) Consistency(arg0 Consistency) Query { 193 m.ctrl.T.Helper() 194 ret := m.ctrl.Call(m, "Consistency", arg0) 195 ret0, _ := ret[0].(Query) 196 return ret0 197 } 198 199 // Consistency indicates an expected call of Consistency. 200 func (mr *MockQueryMockRecorder) Consistency(arg0 interface{}) *gomock.Call { 201 mr.mock.ctrl.T.Helper() 202 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Consistency", reflect.TypeOf((*MockQuery)(nil).Consistency), arg0) 203 } 204 205 // Exec mocks base method. 206 func (m *MockQuery) Exec() error { 207 m.ctrl.T.Helper() 208 ret := m.ctrl.Call(m, "Exec") 209 ret0, _ := ret[0].(error) 210 return ret0 211 } 212 213 // Exec indicates an expected call of Exec. 214 func (mr *MockQueryMockRecorder) Exec() *gomock.Call { 215 mr.mock.ctrl.T.Helper() 216 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exec", reflect.TypeOf((*MockQuery)(nil).Exec)) 217 } 218 219 // Iter mocks base method. 220 func (m *MockQuery) Iter() Iter { 221 m.ctrl.T.Helper() 222 ret := m.ctrl.Call(m, "Iter") 223 ret0, _ := ret[0].(Iter) 224 return ret0 225 } 226 227 // Iter indicates an expected call of Iter. 228 func (mr *MockQueryMockRecorder) Iter() *gomock.Call { 229 mr.mock.ctrl.T.Helper() 230 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Iter", reflect.TypeOf((*MockQuery)(nil).Iter)) 231 } 232 233 // MapScan mocks base method. 234 func (m *MockQuery) MapScan(arg0 map[string]interface{}) error { 235 m.ctrl.T.Helper() 236 ret := m.ctrl.Call(m, "MapScan", arg0) 237 ret0, _ := ret[0].(error) 238 return ret0 239 } 240 241 // MapScan indicates an expected call of MapScan. 242 func (mr *MockQueryMockRecorder) MapScan(arg0 interface{}) *gomock.Call { 243 mr.mock.ctrl.T.Helper() 244 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MapScan", reflect.TypeOf((*MockQuery)(nil).MapScan), arg0) 245 } 246 247 // MapScanCAS mocks base method. 248 func (m *MockQuery) MapScanCAS(arg0 map[string]interface{}) (bool, error) { 249 m.ctrl.T.Helper() 250 ret := m.ctrl.Call(m, "MapScanCAS", arg0) 251 ret0, _ := ret[0].(bool) 252 ret1, _ := ret[1].(error) 253 return ret0, ret1 254 } 255 256 // MapScanCAS indicates an expected call of MapScanCAS. 257 func (mr *MockQueryMockRecorder) MapScanCAS(arg0 interface{}) *gomock.Call { 258 mr.mock.ctrl.T.Helper() 259 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MapScanCAS", reflect.TypeOf((*MockQuery)(nil).MapScanCAS), arg0) 260 } 261 262 // PageSize mocks base method. 263 func (m *MockQuery) PageSize(arg0 int) Query { 264 m.ctrl.T.Helper() 265 ret := m.ctrl.Call(m, "PageSize", arg0) 266 ret0, _ := ret[0].(Query) 267 return ret0 268 } 269 270 // PageSize indicates an expected call of PageSize. 271 func (mr *MockQueryMockRecorder) PageSize(arg0 interface{}) *gomock.Call { 272 mr.mock.ctrl.T.Helper() 273 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PageSize", reflect.TypeOf((*MockQuery)(nil).PageSize), arg0) 274 } 275 276 // PageState mocks base method. 277 func (m *MockQuery) PageState(arg0 []byte) Query { 278 m.ctrl.T.Helper() 279 ret := m.ctrl.Call(m, "PageState", arg0) 280 ret0, _ := ret[0].(Query) 281 return ret0 282 } 283 284 // PageState indicates an expected call of PageState. 285 func (mr *MockQueryMockRecorder) PageState(arg0 interface{}) *gomock.Call { 286 mr.mock.ctrl.T.Helper() 287 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PageState", reflect.TypeOf((*MockQuery)(nil).PageState), arg0) 288 } 289 290 // Scan mocks base method. 291 func (m *MockQuery) Scan(arg0 ...interface{}) error { 292 m.ctrl.T.Helper() 293 varargs := []interface{}{} 294 for _, a := range arg0 { 295 varargs = append(varargs, a) 296 } 297 ret := m.ctrl.Call(m, "Scan", varargs...) 298 ret0, _ := ret[0].(error) 299 return ret0 300 } 301 302 // Scan indicates an expected call of Scan. 303 func (mr *MockQueryMockRecorder) Scan(arg0 ...interface{}) *gomock.Call { 304 mr.mock.ctrl.T.Helper() 305 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Scan", reflect.TypeOf((*MockQuery)(nil).Scan), arg0...) 306 } 307 308 // ScanCAS mocks base method. 309 func (m *MockQuery) ScanCAS(arg0 ...interface{}) (bool, error) { 310 m.ctrl.T.Helper() 311 varargs := []interface{}{} 312 for _, a := range arg0 { 313 varargs = append(varargs, a) 314 } 315 ret := m.ctrl.Call(m, "ScanCAS", varargs...) 316 ret0, _ := ret[0].(bool) 317 ret1, _ := ret[1].(error) 318 return ret0, ret1 319 } 320 321 // ScanCAS indicates an expected call of ScanCAS. 322 func (mr *MockQueryMockRecorder) ScanCAS(arg0 ...interface{}) *gomock.Call { 323 mr.mock.ctrl.T.Helper() 324 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ScanCAS", reflect.TypeOf((*MockQuery)(nil).ScanCAS), arg0...) 325 } 326 327 // WithContext mocks base method. 328 func (m *MockQuery) WithContext(arg0 context.Context) Query { 329 m.ctrl.T.Helper() 330 ret := m.ctrl.Call(m, "WithContext", arg0) 331 ret0, _ := ret[0].(Query) 332 return ret0 333 } 334 335 // WithContext indicates an expected call of WithContext. 336 func (mr *MockQueryMockRecorder) WithContext(arg0 interface{}) *gomock.Call { 337 mr.mock.ctrl.T.Helper() 338 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WithContext", reflect.TypeOf((*MockQuery)(nil).WithContext), arg0) 339 } 340 341 // WithTimestamp mocks base method. 342 func (m *MockQuery) WithTimestamp(arg0 int64) Query { 343 m.ctrl.T.Helper() 344 ret := m.ctrl.Call(m, "WithTimestamp", arg0) 345 ret0, _ := ret[0].(Query) 346 return ret0 347 } 348 349 // WithTimestamp indicates an expected call of WithTimestamp. 350 func (mr *MockQueryMockRecorder) WithTimestamp(arg0 interface{}) *gomock.Call { 351 mr.mock.ctrl.T.Helper() 352 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WithTimestamp", reflect.TypeOf((*MockQuery)(nil).WithTimestamp), arg0) 353 } 354 355 // MockBatch is a mock of Batch interface. 356 type MockBatch struct { 357 ctrl *gomock.Controller 358 recorder *MockBatchMockRecorder 359 } 360 361 // MockBatchMockRecorder is the mock recorder for MockBatch. 362 type MockBatchMockRecorder struct { 363 mock *MockBatch 364 } 365 366 // NewMockBatch creates a new mock instance. 367 func NewMockBatch(ctrl *gomock.Controller) *MockBatch { 368 mock := &MockBatch{ctrl: ctrl} 369 mock.recorder = &MockBatchMockRecorder{mock} 370 return mock 371 } 372 373 // EXPECT returns an object that allows the caller to indicate expected use. 374 func (m *MockBatch) EXPECT() *MockBatchMockRecorder { 375 return m.recorder 376 } 377 378 // Query mocks base method. 379 func (m *MockBatch) Query(arg0 string, arg1 ...interface{}) { 380 m.ctrl.T.Helper() 381 varargs := []interface{}{arg0} 382 for _, a := range arg1 { 383 varargs = append(varargs, a) 384 } 385 m.ctrl.Call(m, "Query", varargs...) 386 } 387 388 // Query indicates an expected call of Query. 389 func (mr *MockBatchMockRecorder) Query(arg0 interface{}, arg1 ...interface{}) *gomock.Call { 390 mr.mock.ctrl.T.Helper() 391 varargs := append([]interface{}{arg0}, arg1...) 392 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Query", reflect.TypeOf((*MockBatch)(nil).Query), varargs...) 393 } 394 395 // WithContext mocks base method. 396 func (m *MockBatch) WithContext(arg0 context.Context) Batch { 397 m.ctrl.T.Helper() 398 ret := m.ctrl.Call(m, "WithContext", arg0) 399 ret0, _ := ret[0].(Batch) 400 return ret0 401 } 402 403 // WithContext indicates an expected call of WithContext. 404 func (mr *MockBatchMockRecorder) WithContext(arg0 interface{}) *gomock.Call { 405 mr.mock.ctrl.T.Helper() 406 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WithContext", reflect.TypeOf((*MockBatch)(nil).WithContext), arg0) 407 } 408 409 // WithTimestamp mocks base method. 410 func (m *MockBatch) WithTimestamp(arg0 int64) Batch { 411 m.ctrl.T.Helper() 412 ret := m.ctrl.Call(m, "WithTimestamp", arg0) 413 ret0, _ := ret[0].(Batch) 414 return ret0 415 } 416 417 // WithTimestamp indicates an expected call of WithTimestamp. 418 func (mr *MockBatchMockRecorder) WithTimestamp(arg0 interface{}) *gomock.Call { 419 mr.mock.ctrl.T.Helper() 420 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WithTimestamp", reflect.TypeOf((*MockBatch)(nil).WithTimestamp), arg0) 421 } 422 423 // MockIter is a mock of Iter interface. 424 type MockIter struct { 425 ctrl *gomock.Controller 426 recorder *MockIterMockRecorder 427 } 428 429 // MockIterMockRecorder is the mock recorder for MockIter. 430 type MockIterMockRecorder struct { 431 mock *MockIter 432 } 433 434 // NewMockIter creates a new mock instance. 435 func NewMockIter(ctrl *gomock.Controller) *MockIter { 436 mock := &MockIter{ctrl: ctrl} 437 mock.recorder = &MockIterMockRecorder{mock} 438 return mock 439 } 440 441 // EXPECT returns an object that allows the caller to indicate expected use. 442 func (m *MockIter) EXPECT() *MockIterMockRecorder { 443 return m.recorder 444 } 445 446 // Close mocks base method. 447 func (m *MockIter) Close() error { 448 m.ctrl.T.Helper() 449 ret := m.ctrl.Call(m, "Close") 450 ret0, _ := ret[0].(error) 451 return ret0 452 } 453 454 // Close indicates an expected call of Close. 455 func (mr *MockIterMockRecorder) Close() *gomock.Call { 456 mr.mock.ctrl.T.Helper() 457 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockIter)(nil).Close)) 458 } 459 460 // MapScan mocks base method. 461 func (m *MockIter) MapScan(arg0 map[string]interface{}) bool { 462 m.ctrl.T.Helper() 463 ret := m.ctrl.Call(m, "MapScan", arg0) 464 ret0, _ := ret[0].(bool) 465 return ret0 466 } 467 468 // MapScan indicates an expected call of MapScan. 469 func (mr *MockIterMockRecorder) MapScan(arg0 interface{}) *gomock.Call { 470 mr.mock.ctrl.T.Helper() 471 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MapScan", reflect.TypeOf((*MockIter)(nil).MapScan), arg0) 472 } 473 474 // PageState mocks base method. 475 func (m *MockIter) PageState() []byte { 476 m.ctrl.T.Helper() 477 ret := m.ctrl.Call(m, "PageState") 478 ret0, _ := ret[0].([]byte) 479 return ret0 480 } 481 482 // PageState indicates an expected call of PageState. 483 func (mr *MockIterMockRecorder) PageState() *gomock.Call { 484 mr.mock.ctrl.T.Helper() 485 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PageState", reflect.TypeOf((*MockIter)(nil).PageState)) 486 } 487 488 // Scan mocks base method. 489 func (m *MockIter) Scan(arg0 ...interface{}) bool { 490 m.ctrl.T.Helper() 491 varargs := []interface{}{} 492 for _, a := range arg0 { 493 varargs = append(varargs, a) 494 } 495 ret := m.ctrl.Call(m, "Scan", varargs...) 496 ret0, _ := ret[0].(bool) 497 return ret0 498 } 499 500 // Scan indicates an expected call of Scan. 501 func (mr *MockIterMockRecorder) Scan(arg0 ...interface{}) *gomock.Call { 502 mr.mock.ctrl.T.Helper() 503 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Scan", reflect.TypeOf((*MockIter)(nil).Scan), arg0...) 504 }