github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/engine/pkg/orm/mock/client_mock.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/pingcap/tiflow/engine/pkg/orm (interfaces: Client) 3 4 // Package mock is a generated GoMock package. 5 package mock 6 7 import ( 8 context "context" 9 reflect "reflect" 10 11 gomock "github.com/golang/mock/gomock" 12 model "github.com/pingcap/tiflow/engine/framework/model" 13 model0 "github.com/pingcap/tiflow/engine/model" 14 model1 "github.com/pingcap/tiflow/engine/pkg/externalresource/model" 15 orm "github.com/pingcap/tiflow/engine/pkg/orm" 16 model2 "github.com/pingcap/tiflow/engine/pkg/orm/model" 17 ) 18 19 // MockClient is a mock of Client interface. 20 type MockClient struct { 21 ctrl *gomock.Controller 22 recorder *MockClientMockRecorder 23 } 24 25 // MockClientMockRecorder is the mock recorder for MockClient. 26 type MockClientMockRecorder struct { 27 mock *MockClient 28 } 29 30 // NewMockClient creates a new mock instance. 31 func NewMockClient(ctrl *gomock.Controller) *MockClient { 32 mock := &MockClient{ctrl: ctrl} 33 mock.recorder = &MockClientMockRecorder{mock} 34 return mock 35 } 36 37 // EXPECT returns an object that allows the caller to indicate expected use. 38 func (m *MockClient) EXPECT() *MockClientMockRecorder { 39 return m.recorder 40 } 41 42 // Close mocks base method. 43 func (m *MockClient) Close() error { 44 m.ctrl.T.Helper() 45 ret := m.ctrl.Call(m, "Close") 46 ret0, _ := ret[0].(error) 47 return ret0 48 } 49 50 // Close indicates an expected call of Close. 51 func (mr *MockClientMockRecorder) Close() *gomock.Call { 52 mr.mock.ctrl.T.Helper() 53 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockClient)(nil).Close)) 54 } 55 56 // CreateExecutor mocks base method. 57 func (m *MockClient) CreateExecutor(arg0 context.Context, arg1 *model2.Executor) error { 58 m.ctrl.T.Helper() 59 ret := m.ctrl.Call(m, "CreateExecutor", arg0, arg1) 60 ret0, _ := ret[0].(error) 61 return ret0 62 } 63 64 // CreateExecutor indicates an expected call of CreateExecutor. 65 func (mr *MockClientMockRecorder) CreateExecutor(arg0, arg1 interface{}) *gomock.Call { 66 mr.mock.ctrl.T.Helper() 67 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateExecutor", reflect.TypeOf((*MockClient)(nil).CreateExecutor), arg0, arg1) 68 } 69 70 // CreateProject mocks base method. 71 func (m *MockClient) CreateProject(arg0 context.Context, arg1 *model2.ProjectInfo) error { 72 m.ctrl.T.Helper() 73 ret := m.ctrl.Call(m, "CreateProject", arg0, arg1) 74 ret0, _ := ret[0].(error) 75 return ret0 76 } 77 78 // CreateProject indicates an expected call of CreateProject. 79 func (mr *MockClientMockRecorder) CreateProject(arg0, arg1 interface{}) *gomock.Call { 80 mr.mock.ctrl.T.Helper() 81 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateProject", reflect.TypeOf((*MockClient)(nil).CreateProject), arg0, arg1) 82 } 83 84 // CreateProjectOperation mocks base method. 85 func (m *MockClient) CreateProjectOperation(arg0 context.Context, arg1 *model2.ProjectOperation) error { 86 m.ctrl.T.Helper() 87 ret := m.ctrl.Call(m, "CreateProjectOperation", arg0, arg1) 88 ret0, _ := ret[0].(error) 89 return ret0 90 } 91 92 // CreateProjectOperation indicates an expected call of CreateProjectOperation. 93 func (mr *MockClientMockRecorder) CreateProjectOperation(arg0, arg1 interface{}) *gomock.Call { 94 mr.mock.ctrl.T.Helper() 95 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateProjectOperation", reflect.TypeOf((*MockClient)(nil).CreateProjectOperation), arg0, arg1) 96 } 97 98 // CreateResource mocks base method. 99 func (m *MockClient) CreateResource(arg0 context.Context, arg1 *model1.ResourceMeta) error { 100 m.ctrl.T.Helper() 101 ret := m.ctrl.Call(m, "CreateResource", arg0, arg1) 102 ret0, _ := ret[0].(error) 103 return ret0 104 } 105 106 // CreateResource indicates an expected call of CreateResource. 107 func (mr *MockClientMockRecorder) CreateResource(arg0, arg1 interface{}) *gomock.Call { 108 mr.mock.ctrl.T.Helper() 109 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateResource", reflect.TypeOf((*MockClient)(nil).CreateResource), arg0, arg1) 110 } 111 112 // DeleteExecutor mocks base method. 113 func (m *MockClient) DeleteExecutor(arg0 context.Context, arg1 model0.DeployNodeID) error { 114 m.ctrl.T.Helper() 115 ret := m.ctrl.Call(m, "DeleteExecutor", arg0, arg1) 116 ret0, _ := ret[0].(error) 117 return ret0 118 } 119 120 // DeleteExecutor indicates an expected call of DeleteExecutor. 121 func (mr *MockClientMockRecorder) DeleteExecutor(arg0, arg1 interface{}) *gomock.Call { 122 mr.mock.ctrl.T.Helper() 123 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteExecutor", reflect.TypeOf((*MockClient)(nil).DeleteExecutor), arg0, arg1) 124 } 125 126 // DeleteJob mocks base method. 127 func (m *MockClient) DeleteJob(arg0 context.Context, arg1 string) (orm.Result, error) { 128 m.ctrl.T.Helper() 129 ret := m.ctrl.Call(m, "DeleteJob", arg0, arg1) 130 ret0, _ := ret[0].(orm.Result) 131 ret1, _ := ret[1].(error) 132 return ret0, ret1 133 } 134 135 // DeleteJob indicates an expected call of DeleteJob. 136 func (mr *MockClientMockRecorder) DeleteJob(arg0, arg1 interface{}) *gomock.Call { 137 mr.mock.ctrl.T.Helper() 138 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteJob", reflect.TypeOf((*MockClient)(nil).DeleteJob), arg0, arg1) 139 } 140 141 // DeleteProject mocks base method. 142 func (m *MockClient) DeleteProject(arg0 context.Context, arg1 string) error { 143 m.ctrl.T.Helper() 144 ret := m.ctrl.Call(m, "DeleteProject", arg0, arg1) 145 ret0, _ := ret[0].(error) 146 return ret0 147 } 148 149 // DeleteProject indicates an expected call of DeleteProject. 150 func (mr *MockClientMockRecorder) DeleteProject(arg0, arg1 interface{}) *gomock.Call { 151 mr.mock.ctrl.T.Helper() 152 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteProject", reflect.TypeOf((*MockClient)(nil).DeleteProject), arg0, arg1) 153 } 154 155 // DeleteResource mocks base method. 156 func (m *MockClient) DeleteResource(arg0 context.Context, arg1 model1.ResourceKey) (orm.Result, error) { 157 m.ctrl.T.Helper() 158 ret := m.ctrl.Call(m, "DeleteResource", arg0, arg1) 159 ret0, _ := ret[0].(orm.Result) 160 ret1, _ := ret[1].(error) 161 return ret0, ret1 162 } 163 164 // DeleteResource indicates an expected call of DeleteResource. 165 func (mr *MockClientMockRecorder) DeleteResource(arg0, arg1 interface{}) *gomock.Call { 166 mr.mock.ctrl.T.Helper() 167 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteResource", reflect.TypeOf((*MockClient)(nil).DeleteResource), arg0, arg1) 168 } 169 170 // DeleteResourcesByTypeAndExecutorIDs mocks base method. 171 func (m *MockClient) DeleteResourcesByTypeAndExecutorIDs(arg0 context.Context, arg1 model1.ResourceType, arg2 ...model0.DeployNodeID) (orm.Result, error) { 172 m.ctrl.T.Helper() 173 varargs := []interface{}{arg0, arg1} 174 for _, a := range arg2 { 175 varargs = append(varargs, a) 176 } 177 ret := m.ctrl.Call(m, "DeleteResourcesByTypeAndExecutorIDs", varargs...) 178 ret0, _ := ret[0].(orm.Result) 179 ret1, _ := ret[1].(error) 180 return ret0, ret1 181 } 182 183 // DeleteResourcesByTypeAndExecutorIDs indicates an expected call of DeleteResourcesByTypeAndExecutorIDs. 184 func (mr *MockClientMockRecorder) DeleteResourcesByTypeAndExecutorIDs(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { 185 mr.mock.ctrl.T.Helper() 186 varargs := append([]interface{}{arg0, arg1}, arg2...) 187 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteResourcesByTypeAndExecutorIDs", reflect.TypeOf((*MockClient)(nil).DeleteResourcesByTypeAndExecutorIDs), varargs...) 188 } 189 190 // DeleteWorker mocks base method. 191 func (m *MockClient) DeleteWorker(arg0 context.Context, arg1, arg2 string) (orm.Result, error) { 192 m.ctrl.T.Helper() 193 ret := m.ctrl.Call(m, "DeleteWorker", arg0, arg1, arg2) 194 ret0, _ := ret[0].(orm.Result) 195 ret1, _ := ret[1].(error) 196 return ret0, ret1 197 } 198 199 // DeleteWorker indicates an expected call of DeleteWorker. 200 func (mr *MockClientMockRecorder) DeleteWorker(arg0, arg1, arg2 interface{}) *gomock.Call { 201 mr.mock.ctrl.T.Helper() 202 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteWorker", reflect.TypeOf((*MockClient)(nil).DeleteWorker), arg0, arg1, arg2) 203 } 204 205 // GenEpoch mocks base method. 206 func (m *MockClient) GenEpoch(arg0 context.Context) (int64, error) { 207 m.ctrl.T.Helper() 208 ret := m.ctrl.Call(m, "GenEpoch", arg0) 209 ret0, _ := ret[0].(int64) 210 ret1, _ := ret[1].(error) 211 return ret0, ret1 212 } 213 214 // GenEpoch indicates an expected call of GenEpoch. 215 func (mr *MockClientMockRecorder) GenEpoch(arg0 interface{}) *gomock.Call { 216 mr.mock.ctrl.T.Helper() 217 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GenEpoch", reflect.TypeOf((*MockClient)(nil).GenEpoch), arg0) 218 } 219 220 // GetJobByID mocks base method. 221 func (m *MockClient) GetJobByID(arg0 context.Context, arg1 string) (*model.MasterMeta, error) { 222 m.ctrl.T.Helper() 223 ret := m.ctrl.Call(m, "GetJobByID", arg0, arg1) 224 ret0, _ := ret[0].(*model.MasterMeta) 225 ret1, _ := ret[1].(error) 226 return ret0, ret1 227 } 228 229 // GetJobByID indicates an expected call of GetJobByID. 230 func (mr *MockClientMockRecorder) GetJobByID(arg0, arg1 interface{}) *gomock.Call { 231 mr.mock.ctrl.T.Helper() 232 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetJobByID", reflect.TypeOf((*MockClient)(nil).GetJobByID), arg0, arg1) 233 } 234 235 // GetOneResourceForGC mocks base method. 236 func (m *MockClient) GetOneResourceForGC(arg0 context.Context) (*model1.ResourceMeta, error) { 237 m.ctrl.T.Helper() 238 ret := m.ctrl.Call(m, "GetOneResourceForGC", arg0) 239 ret0, _ := ret[0].(*model1.ResourceMeta) 240 ret1, _ := ret[1].(error) 241 return ret0, ret1 242 } 243 244 // GetOneResourceForGC indicates an expected call of GetOneResourceForGC. 245 func (mr *MockClientMockRecorder) GetOneResourceForGC(arg0 interface{}) *gomock.Call { 246 mr.mock.ctrl.T.Helper() 247 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOneResourceForGC", reflect.TypeOf((*MockClient)(nil).GetOneResourceForGC), arg0) 248 } 249 250 // GetProjectByID mocks base method. 251 func (m *MockClient) GetProjectByID(arg0 context.Context, arg1 string) (*model2.ProjectInfo, error) { 252 m.ctrl.T.Helper() 253 ret := m.ctrl.Call(m, "GetProjectByID", arg0, arg1) 254 ret0, _ := ret[0].(*model2.ProjectInfo) 255 ret1, _ := ret[1].(error) 256 return ret0, ret1 257 } 258 259 // GetProjectByID indicates an expected call of GetProjectByID. 260 func (mr *MockClientMockRecorder) GetProjectByID(arg0, arg1 interface{}) *gomock.Call { 261 mr.mock.ctrl.T.Helper() 262 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProjectByID", reflect.TypeOf((*MockClient)(nil).GetProjectByID), arg0, arg1) 263 } 264 265 // GetResourceByID mocks base method. 266 func (m *MockClient) GetResourceByID(arg0 context.Context, arg1 model1.ResourceKey) (*model1.ResourceMeta, error) { 267 m.ctrl.T.Helper() 268 ret := m.ctrl.Call(m, "GetResourceByID", arg0, arg1) 269 ret0, _ := ret[0].(*model1.ResourceMeta) 270 ret1, _ := ret[1].(error) 271 return ret0, ret1 272 } 273 274 // GetResourceByID indicates an expected call of GetResourceByID. 275 func (mr *MockClientMockRecorder) GetResourceByID(arg0, arg1 interface{}) *gomock.Call { 276 mr.mock.ctrl.T.Helper() 277 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetResourceByID", reflect.TypeOf((*MockClient)(nil).GetResourceByID), arg0, arg1) 278 } 279 280 // GetWorkerByID mocks base method. 281 func (m *MockClient) GetWorkerByID(arg0 context.Context, arg1, arg2 string) (*model.WorkerStatus, error) { 282 m.ctrl.T.Helper() 283 ret := m.ctrl.Call(m, "GetWorkerByID", arg0, arg1, arg2) 284 ret0, _ := ret[0].(*model.WorkerStatus) 285 ret1, _ := ret[1].(error) 286 return ret0, ret1 287 } 288 289 // GetWorkerByID indicates an expected call of GetWorkerByID. 290 func (mr *MockClientMockRecorder) GetWorkerByID(arg0, arg1, arg2 interface{}) *gomock.Call { 291 mr.mock.ctrl.T.Helper() 292 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetWorkerByID", reflect.TypeOf((*MockClient)(nil).GetWorkerByID), arg0, arg1, arg2) 293 } 294 295 // InsertJob mocks base method. 296 func (m *MockClient) InsertJob(arg0 context.Context, arg1 *model.MasterMeta) error { 297 m.ctrl.T.Helper() 298 ret := m.ctrl.Call(m, "InsertJob", arg0, arg1) 299 ret0, _ := ret[0].(error) 300 return ret0 301 } 302 303 // InsertJob indicates an expected call of InsertJob. 304 func (mr *MockClientMockRecorder) InsertJob(arg0, arg1 interface{}) *gomock.Call { 305 mr.mock.ctrl.T.Helper() 306 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InsertJob", reflect.TypeOf((*MockClient)(nil).InsertJob), arg0, arg1) 307 } 308 309 // QueryExecutors mocks base method. 310 func (m *MockClient) QueryExecutors(arg0 context.Context) ([]*model2.Executor, error) { 311 m.ctrl.T.Helper() 312 ret := m.ctrl.Call(m, "QueryExecutors", arg0) 313 ret0, _ := ret[0].([]*model2.Executor) 314 ret1, _ := ret[1].(error) 315 return ret0, ret1 316 } 317 318 // QueryExecutors indicates an expected call of QueryExecutors. 319 func (mr *MockClientMockRecorder) QueryExecutors(arg0 interface{}) *gomock.Call { 320 mr.mock.ctrl.T.Helper() 321 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryExecutors", reflect.TypeOf((*MockClient)(nil).QueryExecutors), arg0) 322 } 323 324 // QueryJobOp mocks base method. 325 func (m *MockClient) QueryJobOp(arg0 context.Context, arg1 string) (*model2.JobOp, error) { 326 m.ctrl.T.Helper() 327 ret := m.ctrl.Call(m, "QueryJobOp", arg0, arg1) 328 ret0, _ := ret[0].(*model2.JobOp) 329 ret1, _ := ret[1].(error) 330 return ret0, ret1 331 } 332 333 // QueryJobOp indicates an expected call of QueryJobOp. 334 func (mr *MockClientMockRecorder) QueryJobOp(arg0, arg1 interface{}) *gomock.Call { 335 mr.mock.ctrl.T.Helper() 336 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryJobOp", reflect.TypeOf((*MockClient)(nil).QueryJobOp), arg0, arg1) 337 } 338 339 // QueryJobOpsByStatus mocks base method. 340 func (m *MockClient) QueryJobOpsByStatus(arg0 context.Context, arg1 model2.JobOpStatus) ([]*model2.JobOp, error) { 341 m.ctrl.T.Helper() 342 ret := m.ctrl.Call(m, "QueryJobOpsByStatus", arg0, arg1) 343 ret0, _ := ret[0].([]*model2.JobOp) 344 ret1, _ := ret[1].(error) 345 return ret0, ret1 346 } 347 348 // QueryJobOpsByStatus indicates an expected call of QueryJobOpsByStatus. 349 func (mr *MockClientMockRecorder) QueryJobOpsByStatus(arg0, arg1 interface{}) *gomock.Call { 350 mr.mock.ctrl.T.Helper() 351 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryJobOpsByStatus", reflect.TypeOf((*MockClient)(nil).QueryJobOpsByStatus), arg0, arg1) 352 } 353 354 // QueryJobs mocks base method. 355 func (m *MockClient) QueryJobs(arg0 context.Context) ([]*model.MasterMeta, error) { 356 m.ctrl.T.Helper() 357 ret := m.ctrl.Call(m, "QueryJobs", arg0) 358 ret0, _ := ret[0].([]*model.MasterMeta) 359 ret1, _ := ret[1].(error) 360 return ret0, ret1 361 } 362 363 // QueryJobs indicates an expected call of QueryJobs. 364 func (mr *MockClientMockRecorder) QueryJobs(arg0 interface{}) *gomock.Call { 365 mr.mock.ctrl.T.Helper() 366 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryJobs", reflect.TypeOf((*MockClient)(nil).QueryJobs), arg0) 367 } 368 369 // QueryJobsByProjectID mocks base method. 370 func (m *MockClient) QueryJobsByProjectID(arg0 context.Context, arg1 string) ([]*model.MasterMeta, error) { 371 m.ctrl.T.Helper() 372 ret := m.ctrl.Call(m, "QueryJobsByProjectID", arg0, arg1) 373 ret0, _ := ret[0].([]*model.MasterMeta) 374 ret1, _ := ret[1].(error) 375 return ret0, ret1 376 } 377 378 // QueryJobsByProjectID indicates an expected call of QueryJobsByProjectID. 379 func (mr *MockClientMockRecorder) QueryJobsByProjectID(arg0, arg1 interface{}) *gomock.Call { 380 mr.mock.ctrl.T.Helper() 381 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryJobsByProjectID", reflect.TypeOf((*MockClient)(nil).QueryJobsByProjectID), arg0, arg1) 382 } 383 384 // QueryJobsByState mocks base method. 385 func (m *MockClient) QueryJobsByState(arg0 context.Context, arg1 string, arg2 int) ([]*model.MasterMeta, error) { 386 m.ctrl.T.Helper() 387 ret := m.ctrl.Call(m, "QueryJobsByState", arg0, arg1, arg2) 388 ret0, _ := ret[0].([]*model.MasterMeta) 389 ret1, _ := ret[1].(error) 390 return ret0, ret1 391 } 392 393 // QueryJobsByState indicates an expected call of QueryJobsByState. 394 func (mr *MockClientMockRecorder) QueryJobsByState(arg0, arg1, arg2 interface{}) *gomock.Call { 395 mr.mock.ctrl.T.Helper() 396 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryJobsByState", reflect.TypeOf((*MockClient)(nil).QueryJobsByState), arg0, arg1, arg2) 397 } 398 399 // QueryProjectOperations mocks base method. 400 func (m *MockClient) QueryProjectOperations(arg0 context.Context, arg1 string) ([]*model2.ProjectOperation, error) { 401 m.ctrl.T.Helper() 402 ret := m.ctrl.Call(m, "QueryProjectOperations", arg0, arg1) 403 ret0, _ := ret[0].([]*model2.ProjectOperation) 404 ret1, _ := ret[1].(error) 405 return ret0, ret1 406 } 407 408 // QueryProjectOperations indicates an expected call of QueryProjectOperations. 409 func (mr *MockClientMockRecorder) QueryProjectOperations(arg0, arg1 interface{}) *gomock.Call { 410 mr.mock.ctrl.T.Helper() 411 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryProjectOperations", reflect.TypeOf((*MockClient)(nil).QueryProjectOperations), arg0, arg1) 412 } 413 414 // QueryProjectOperationsByTimeRange mocks base method. 415 func (m *MockClient) QueryProjectOperationsByTimeRange(arg0 context.Context, arg1 string, arg2 orm.TimeRange) ([]*model2.ProjectOperation, error) { 416 m.ctrl.T.Helper() 417 ret := m.ctrl.Call(m, "QueryProjectOperationsByTimeRange", arg0, arg1, arg2) 418 ret0, _ := ret[0].([]*model2.ProjectOperation) 419 ret1, _ := ret[1].(error) 420 return ret0, ret1 421 } 422 423 // QueryProjectOperationsByTimeRange indicates an expected call of QueryProjectOperationsByTimeRange. 424 func (mr *MockClientMockRecorder) QueryProjectOperationsByTimeRange(arg0, arg1, arg2 interface{}) *gomock.Call { 425 mr.mock.ctrl.T.Helper() 426 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryProjectOperationsByTimeRange", reflect.TypeOf((*MockClient)(nil).QueryProjectOperationsByTimeRange), arg0, arg1, arg2) 427 } 428 429 // QueryProjects mocks base method. 430 func (m *MockClient) QueryProjects(arg0 context.Context) ([]*model2.ProjectInfo, error) { 431 m.ctrl.T.Helper() 432 ret := m.ctrl.Call(m, "QueryProjects", arg0) 433 ret0, _ := ret[0].([]*model2.ProjectInfo) 434 ret1, _ := ret[1].(error) 435 return ret0, ret1 436 } 437 438 // QueryProjects indicates an expected call of QueryProjects. 439 func (mr *MockClientMockRecorder) QueryProjects(arg0 interface{}) *gomock.Call { 440 mr.mock.ctrl.T.Helper() 441 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryProjects", reflect.TypeOf((*MockClient)(nil).QueryProjects), arg0) 442 } 443 444 // QueryResources mocks base method. 445 func (m *MockClient) QueryResources(arg0 context.Context) ([]*model1.ResourceMeta, error) { 446 m.ctrl.T.Helper() 447 ret := m.ctrl.Call(m, "QueryResources", arg0) 448 ret0, _ := ret[0].([]*model1.ResourceMeta) 449 ret1, _ := ret[1].(error) 450 return ret0, ret1 451 } 452 453 // QueryResources indicates an expected call of QueryResources. 454 func (mr *MockClientMockRecorder) QueryResources(arg0 interface{}) *gomock.Call { 455 mr.mock.ctrl.T.Helper() 456 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryResources", reflect.TypeOf((*MockClient)(nil).QueryResources), arg0) 457 } 458 459 // QueryResourcesByExecutorIDs mocks base method. 460 func (m *MockClient) QueryResourcesByExecutorIDs(arg0 context.Context, arg1 ...model0.DeployNodeID) ([]*model1.ResourceMeta, error) { 461 m.ctrl.T.Helper() 462 varargs := []interface{}{arg0} 463 for _, a := range arg1 { 464 varargs = append(varargs, a) 465 } 466 ret := m.ctrl.Call(m, "QueryResourcesByExecutorIDs", varargs...) 467 ret0, _ := ret[0].([]*model1.ResourceMeta) 468 ret1, _ := ret[1].(error) 469 return ret0, ret1 470 } 471 472 // QueryResourcesByExecutorIDs indicates an expected call of QueryResourcesByExecutorIDs. 473 func (mr *MockClientMockRecorder) QueryResourcesByExecutorIDs(arg0 interface{}, arg1 ...interface{}) *gomock.Call { 474 mr.mock.ctrl.T.Helper() 475 varargs := append([]interface{}{arg0}, arg1...) 476 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryResourcesByExecutorIDs", reflect.TypeOf((*MockClient)(nil).QueryResourcesByExecutorIDs), varargs...) 477 } 478 479 // QueryResourcesByJobID mocks base method. 480 func (m *MockClient) QueryResourcesByJobID(arg0 context.Context, arg1 string) ([]*model1.ResourceMeta, error) { 481 m.ctrl.T.Helper() 482 ret := m.ctrl.Call(m, "QueryResourcesByJobID", arg0, arg1) 483 ret0, _ := ret[0].([]*model1.ResourceMeta) 484 ret1, _ := ret[1].(error) 485 return ret0, ret1 486 } 487 488 // QueryResourcesByJobID indicates an expected call of QueryResourcesByJobID. 489 func (mr *MockClientMockRecorder) QueryResourcesByJobID(arg0, arg1 interface{}) *gomock.Call { 490 mr.mock.ctrl.T.Helper() 491 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryResourcesByJobID", reflect.TypeOf((*MockClient)(nil).QueryResourcesByJobID), arg0, arg1) 492 } 493 494 // QueryWorkersByMasterID mocks base method. 495 func (m *MockClient) QueryWorkersByMasterID(arg0 context.Context, arg1 string) ([]*model.WorkerStatus, error) { 496 m.ctrl.T.Helper() 497 ret := m.ctrl.Call(m, "QueryWorkersByMasterID", arg0, arg1) 498 ret0, _ := ret[0].([]*model.WorkerStatus) 499 ret1, _ := ret[1].(error) 500 return ret0, ret1 501 } 502 503 // QueryWorkersByMasterID indicates an expected call of QueryWorkersByMasterID. 504 func (mr *MockClientMockRecorder) QueryWorkersByMasterID(arg0, arg1 interface{}) *gomock.Call { 505 mr.mock.ctrl.T.Helper() 506 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryWorkersByMasterID", reflect.TypeOf((*MockClient)(nil).QueryWorkersByMasterID), arg0, arg1) 507 } 508 509 // QueryWorkersByState mocks base method. 510 func (m *MockClient) QueryWorkersByState(arg0 context.Context, arg1 string, arg2 int) ([]*model.WorkerStatus, error) { 511 m.ctrl.T.Helper() 512 ret := m.ctrl.Call(m, "QueryWorkersByState", arg0, arg1, arg2) 513 ret0, _ := ret[0].([]*model.WorkerStatus) 514 ret1, _ := ret[1].(error) 515 return ret0, ret1 516 } 517 518 // QueryWorkersByState indicates an expected call of QueryWorkersByState. 519 func (mr *MockClientMockRecorder) QueryWorkersByState(arg0, arg1, arg2 interface{}) *gomock.Call { 520 mr.mock.ctrl.T.Helper() 521 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryWorkersByState", reflect.TypeOf((*MockClient)(nil).QueryWorkersByState), arg0, arg1, arg2) 522 } 523 524 // SetGCPendingByJobs mocks base method. 525 func (m *MockClient) SetGCPendingByJobs(arg0 context.Context, arg1 ...string) error { 526 m.ctrl.T.Helper() 527 varargs := []interface{}{arg0} 528 for _, a := range arg1 { 529 varargs = append(varargs, a) 530 } 531 ret := m.ctrl.Call(m, "SetGCPendingByJobs", varargs...) 532 ret0, _ := ret[0].(error) 533 return ret0 534 } 535 536 // SetGCPendingByJobs indicates an expected call of SetGCPendingByJobs. 537 func (mr *MockClientMockRecorder) SetGCPendingByJobs(arg0 interface{}, arg1 ...interface{}) *gomock.Call { 538 mr.mock.ctrl.T.Helper() 539 varargs := append([]interface{}{arg0}, arg1...) 540 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetGCPendingByJobs", reflect.TypeOf((*MockClient)(nil).SetGCPendingByJobs), varargs...) 541 } 542 543 // SetJobCanceled mocks base method. 544 func (m *MockClient) SetJobCanceled(arg0 context.Context, arg1 string) (orm.Result, error) { 545 m.ctrl.T.Helper() 546 ret := m.ctrl.Call(m, "SetJobCanceled", arg0, arg1) 547 ret0, _ := ret[0].(orm.Result) 548 ret1, _ := ret[1].(error) 549 return ret0, ret1 550 } 551 552 // SetJobCanceled indicates an expected call of SetJobCanceled. 553 func (mr *MockClientMockRecorder) SetJobCanceled(arg0, arg1 interface{}) *gomock.Call { 554 mr.mock.ctrl.T.Helper() 555 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetJobCanceled", reflect.TypeOf((*MockClient)(nil).SetJobCanceled), arg0, arg1) 556 } 557 558 // SetJobCanceling mocks base method. 559 func (m *MockClient) SetJobCanceling(arg0 context.Context, arg1 string) (orm.Result, error) { 560 m.ctrl.T.Helper() 561 ret := m.ctrl.Call(m, "SetJobCanceling", arg0, arg1) 562 ret0, _ := ret[0].(orm.Result) 563 ret1, _ := ret[1].(error) 564 return ret0, ret1 565 } 566 567 // SetJobCanceling indicates an expected call of SetJobCanceling. 568 func (mr *MockClientMockRecorder) SetJobCanceling(arg0, arg1 interface{}) *gomock.Call { 569 mr.mock.ctrl.T.Helper() 570 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetJobCanceling", reflect.TypeOf((*MockClient)(nil).SetJobCanceling), arg0, arg1) 571 } 572 573 // SetJobNoop mocks base method. 574 func (m *MockClient) SetJobNoop(arg0 context.Context, arg1 string) (orm.Result, error) { 575 m.ctrl.T.Helper() 576 ret := m.ctrl.Call(m, "SetJobNoop", arg0, arg1) 577 ret0, _ := ret[0].(orm.Result) 578 ret1, _ := ret[1].(error) 579 return ret0, ret1 580 } 581 582 // SetJobNoop indicates an expected call of SetJobNoop. 583 func (mr *MockClientMockRecorder) SetJobNoop(arg0, arg1 interface{}) *gomock.Call { 584 mr.mock.ctrl.T.Helper() 585 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetJobNoop", reflect.TypeOf((*MockClient)(nil).SetJobNoop), arg0, arg1) 586 } 587 588 // UpdateExecutor mocks base method. 589 func (m *MockClient) UpdateExecutor(arg0 context.Context, arg1 *model2.Executor) error { 590 m.ctrl.T.Helper() 591 ret := m.ctrl.Call(m, "UpdateExecutor", arg0, arg1) 592 ret0, _ := ret[0].(error) 593 return ret0 594 } 595 596 // UpdateExecutor indicates an expected call of UpdateExecutor. 597 func (mr *MockClientMockRecorder) UpdateExecutor(arg0, arg1 interface{}) *gomock.Call { 598 mr.mock.ctrl.T.Helper() 599 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateExecutor", reflect.TypeOf((*MockClient)(nil).UpdateExecutor), arg0, arg1) 600 } 601 602 // UpdateJob mocks base method. 603 func (m *MockClient) UpdateJob(arg0 context.Context, arg1 string, arg2 map[string]interface{}) error { 604 m.ctrl.T.Helper() 605 ret := m.ctrl.Call(m, "UpdateJob", arg0, arg1, arg2) 606 ret0, _ := ret[0].(error) 607 return ret0 608 } 609 610 // UpdateJob indicates an expected call of UpdateJob. 611 func (mr *MockClientMockRecorder) UpdateJob(arg0, arg1, arg2 interface{}) *gomock.Call { 612 mr.mock.ctrl.T.Helper() 613 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateJob", reflect.TypeOf((*MockClient)(nil).UpdateJob), arg0, arg1, arg2) 614 } 615 616 // UpdateResource mocks base method. 617 func (m *MockClient) UpdateResource(arg0 context.Context, arg1 *model1.ResourceMeta) error { 618 m.ctrl.T.Helper() 619 ret := m.ctrl.Call(m, "UpdateResource", arg0, arg1) 620 ret0, _ := ret[0].(error) 621 return ret0 622 } 623 624 // UpdateResource indicates an expected call of UpdateResource. 625 func (mr *MockClientMockRecorder) UpdateResource(arg0, arg1 interface{}) *gomock.Call { 626 mr.mock.ctrl.T.Helper() 627 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateResource", reflect.TypeOf((*MockClient)(nil).UpdateResource), arg0, arg1) 628 } 629 630 // UpdateWorker mocks base method. 631 func (m *MockClient) UpdateWorker(arg0 context.Context, arg1 *model.WorkerStatus) error { 632 m.ctrl.T.Helper() 633 ret := m.ctrl.Call(m, "UpdateWorker", arg0, arg1) 634 ret0, _ := ret[0].(error) 635 return ret0 636 } 637 638 // UpdateWorker indicates an expected call of UpdateWorker. 639 func (mr *MockClientMockRecorder) UpdateWorker(arg0, arg1 interface{}) *gomock.Call { 640 mr.mock.ctrl.T.Helper() 641 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateWorker", reflect.TypeOf((*MockClient)(nil).UpdateWorker), arg0, arg1) 642 } 643 644 // UpsertJob mocks base method. 645 func (m *MockClient) UpsertJob(arg0 context.Context, arg1 *model.MasterMeta) error { 646 m.ctrl.T.Helper() 647 ret := m.ctrl.Call(m, "UpsertJob", arg0, arg1) 648 ret0, _ := ret[0].(error) 649 return ret0 650 } 651 652 // UpsertJob indicates an expected call of UpsertJob. 653 func (mr *MockClientMockRecorder) UpsertJob(arg0, arg1 interface{}) *gomock.Call { 654 mr.mock.ctrl.T.Helper() 655 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpsertJob", reflect.TypeOf((*MockClient)(nil).UpsertJob), arg0, arg1) 656 } 657 658 // UpsertResource mocks base method. 659 func (m *MockClient) UpsertResource(arg0 context.Context, arg1 *model1.ResourceMeta) error { 660 m.ctrl.T.Helper() 661 ret := m.ctrl.Call(m, "UpsertResource", arg0, arg1) 662 ret0, _ := ret[0].(error) 663 return ret0 664 } 665 666 // UpsertResource indicates an expected call of UpsertResource. 667 func (mr *MockClientMockRecorder) UpsertResource(arg0, arg1 interface{}) *gomock.Call { 668 mr.mock.ctrl.T.Helper() 669 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpsertResource", reflect.TypeOf((*MockClient)(nil).UpsertResource), arg0, arg1) 670 } 671 672 // UpsertWorker mocks base method. 673 func (m *MockClient) UpsertWorker(arg0 context.Context, arg1 *model.WorkerStatus) error { 674 m.ctrl.T.Helper() 675 ret := m.ctrl.Call(m, "UpsertWorker", arg0, arg1) 676 ret0, _ := ret[0].(error) 677 return ret0 678 } 679 680 // UpsertWorker indicates an expected call of UpsertWorker. 681 func (mr *MockClientMockRecorder) UpsertWorker(arg0, arg1 interface{}) *gomock.Call { 682 mr.mock.ctrl.T.Helper() 683 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpsertWorker", reflect.TypeOf((*MockClient)(nil).UpsertWorker), arg0, arg1) 684 }