github.com/projecteru2/core@v0.0.0-20240321043226-06bcc1c23f58/engine/docker/mocks/APIClient.go (about) 1 // Code generated by mockery v2.31.4. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 context "context" 7 8 container "github.com/docker/docker/api/types/container" 9 10 events "github.com/docker/docker/api/types/events" 11 12 filters "github.com/docker/docker/api/types/filters" 13 14 http "net/http" 15 16 image "github.com/docker/docker/api/types/image" 17 18 io "io" 19 20 mock "github.com/stretchr/testify/mock" 21 22 net "net" 23 24 network "github.com/docker/docker/api/types/network" 25 26 registry "github.com/docker/docker/api/types/registry" 27 28 swarm "github.com/docker/docker/api/types/swarm" 29 30 types "github.com/docker/docker/api/types" 31 32 v1 "github.com/opencontainers/image-spec/specs-go/v1" 33 34 volume "github.com/docker/docker/api/types/volume" 35 ) 36 37 // APIClient is an autogenerated mock type for the APIClient type 38 type APIClient struct { 39 mock.Mock 40 } 41 42 // BuildCachePrune provides a mock function with given fields: ctx, opts 43 func (_m *APIClient) BuildCachePrune(ctx context.Context, opts types.BuildCachePruneOptions) (*types.BuildCachePruneReport, error) { 44 ret := _m.Called(ctx, opts) 45 46 var r0 *types.BuildCachePruneReport 47 var r1 error 48 if rf, ok := ret.Get(0).(func(context.Context, types.BuildCachePruneOptions) (*types.BuildCachePruneReport, error)); ok { 49 return rf(ctx, opts) 50 } 51 if rf, ok := ret.Get(0).(func(context.Context, types.BuildCachePruneOptions) *types.BuildCachePruneReport); ok { 52 r0 = rf(ctx, opts) 53 } else { 54 if ret.Get(0) != nil { 55 r0 = ret.Get(0).(*types.BuildCachePruneReport) 56 } 57 } 58 59 if rf, ok := ret.Get(1).(func(context.Context, types.BuildCachePruneOptions) error); ok { 60 r1 = rf(ctx, opts) 61 } else { 62 r1 = ret.Error(1) 63 } 64 65 return r0, r1 66 } 67 68 // BuildCancel provides a mock function with given fields: ctx, id 69 func (_m *APIClient) BuildCancel(ctx context.Context, id string) error { 70 ret := _m.Called(ctx, id) 71 72 var r0 error 73 if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { 74 r0 = rf(ctx, id) 75 } else { 76 r0 = ret.Error(0) 77 } 78 79 return r0 80 } 81 82 // CheckpointCreate provides a mock function with given fields: ctx, _a1, options 83 func (_m *APIClient) CheckpointCreate(ctx context.Context, _a1 string, options types.CheckpointCreateOptions) error { 84 ret := _m.Called(ctx, _a1, options) 85 86 var r0 error 87 if rf, ok := ret.Get(0).(func(context.Context, string, types.CheckpointCreateOptions) error); ok { 88 r0 = rf(ctx, _a1, options) 89 } else { 90 r0 = ret.Error(0) 91 } 92 93 return r0 94 } 95 96 // CheckpointDelete provides a mock function with given fields: ctx, _a1, options 97 func (_m *APIClient) CheckpointDelete(ctx context.Context, _a1 string, options types.CheckpointDeleteOptions) error { 98 ret := _m.Called(ctx, _a1, options) 99 100 var r0 error 101 if rf, ok := ret.Get(0).(func(context.Context, string, types.CheckpointDeleteOptions) error); ok { 102 r0 = rf(ctx, _a1, options) 103 } else { 104 r0 = ret.Error(0) 105 } 106 107 return r0 108 } 109 110 // CheckpointList provides a mock function with given fields: ctx, _a1, options 111 func (_m *APIClient) CheckpointList(ctx context.Context, _a1 string, options types.CheckpointListOptions) ([]types.Checkpoint, error) { 112 ret := _m.Called(ctx, _a1, options) 113 114 var r0 []types.Checkpoint 115 var r1 error 116 if rf, ok := ret.Get(0).(func(context.Context, string, types.CheckpointListOptions) ([]types.Checkpoint, error)); ok { 117 return rf(ctx, _a1, options) 118 } 119 if rf, ok := ret.Get(0).(func(context.Context, string, types.CheckpointListOptions) []types.Checkpoint); ok { 120 r0 = rf(ctx, _a1, options) 121 } else { 122 if ret.Get(0) != nil { 123 r0 = ret.Get(0).([]types.Checkpoint) 124 } 125 } 126 127 if rf, ok := ret.Get(1).(func(context.Context, string, types.CheckpointListOptions) error); ok { 128 r1 = rf(ctx, _a1, options) 129 } else { 130 r1 = ret.Error(1) 131 } 132 133 return r0, r1 134 } 135 136 // ClientVersion provides a mock function with given fields: 137 func (_m *APIClient) ClientVersion() string { 138 ret := _m.Called() 139 140 var r0 string 141 if rf, ok := ret.Get(0).(func() string); ok { 142 r0 = rf() 143 } else { 144 r0 = ret.Get(0).(string) 145 } 146 147 return r0 148 } 149 150 // Close provides a mock function with given fields: 151 func (_m *APIClient) Close() error { 152 ret := _m.Called() 153 154 var r0 error 155 if rf, ok := ret.Get(0).(func() error); ok { 156 r0 = rf() 157 } else { 158 r0 = ret.Error(0) 159 } 160 161 return r0 162 } 163 164 // ConfigCreate provides a mock function with given fields: ctx, config 165 func (_m *APIClient) ConfigCreate(ctx context.Context, config swarm.ConfigSpec) (types.ConfigCreateResponse, error) { 166 ret := _m.Called(ctx, config) 167 168 var r0 types.ConfigCreateResponse 169 var r1 error 170 if rf, ok := ret.Get(0).(func(context.Context, swarm.ConfigSpec) (types.ConfigCreateResponse, error)); ok { 171 return rf(ctx, config) 172 } 173 if rf, ok := ret.Get(0).(func(context.Context, swarm.ConfigSpec) types.ConfigCreateResponse); ok { 174 r0 = rf(ctx, config) 175 } else { 176 r0 = ret.Get(0).(types.ConfigCreateResponse) 177 } 178 179 if rf, ok := ret.Get(1).(func(context.Context, swarm.ConfigSpec) error); ok { 180 r1 = rf(ctx, config) 181 } else { 182 r1 = ret.Error(1) 183 } 184 185 return r0, r1 186 } 187 188 // ConfigInspectWithRaw provides a mock function with given fields: ctx, name 189 func (_m *APIClient) ConfigInspectWithRaw(ctx context.Context, name string) (swarm.Config, []byte, error) { 190 ret := _m.Called(ctx, name) 191 192 var r0 swarm.Config 193 var r1 []byte 194 var r2 error 195 if rf, ok := ret.Get(0).(func(context.Context, string) (swarm.Config, []byte, error)); ok { 196 return rf(ctx, name) 197 } 198 if rf, ok := ret.Get(0).(func(context.Context, string) swarm.Config); ok { 199 r0 = rf(ctx, name) 200 } else { 201 r0 = ret.Get(0).(swarm.Config) 202 } 203 204 if rf, ok := ret.Get(1).(func(context.Context, string) []byte); ok { 205 r1 = rf(ctx, name) 206 } else { 207 if ret.Get(1) != nil { 208 r1 = ret.Get(1).([]byte) 209 } 210 } 211 212 if rf, ok := ret.Get(2).(func(context.Context, string) error); ok { 213 r2 = rf(ctx, name) 214 } else { 215 r2 = ret.Error(2) 216 } 217 218 return r0, r1, r2 219 } 220 221 // ConfigList provides a mock function with given fields: ctx, options 222 func (_m *APIClient) ConfigList(ctx context.Context, options types.ConfigListOptions) ([]swarm.Config, error) { 223 ret := _m.Called(ctx, options) 224 225 var r0 []swarm.Config 226 var r1 error 227 if rf, ok := ret.Get(0).(func(context.Context, types.ConfigListOptions) ([]swarm.Config, error)); ok { 228 return rf(ctx, options) 229 } 230 if rf, ok := ret.Get(0).(func(context.Context, types.ConfigListOptions) []swarm.Config); ok { 231 r0 = rf(ctx, options) 232 } else { 233 if ret.Get(0) != nil { 234 r0 = ret.Get(0).([]swarm.Config) 235 } 236 } 237 238 if rf, ok := ret.Get(1).(func(context.Context, types.ConfigListOptions) error); ok { 239 r1 = rf(ctx, options) 240 } else { 241 r1 = ret.Error(1) 242 } 243 244 return r0, r1 245 } 246 247 // ConfigRemove provides a mock function with given fields: ctx, id 248 func (_m *APIClient) ConfigRemove(ctx context.Context, id string) error { 249 ret := _m.Called(ctx, id) 250 251 var r0 error 252 if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { 253 r0 = rf(ctx, id) 254 } else { 255 r0 = ret.Error(0) 256 } 257 258 return r0 259 } 260 261 // ConfigUpdate provides a mock function with given fields: ctx, id, version, config 262 func (_m *APIClient) ConfigUpdate(ctx context.Context, id string, version swarm.Version, config swarm.ConfigSpec) error { 263 ret := _m.Called(ctx, id, version, config) 264 265 var r0 error 266 if rf, ok := ret.Get(0).(func(context.Context, string, swarm.Version, swarm.ConfigSpec) error); ok { 267 r0 = rf(ctx, id, version, config) 268 } else { 269 r0 = ret.Error(0) 270 } 271 272 return r0 273 } 274 275 // ContainerAttach provides a mock function with given fields: ctx, _a1, options 276 func (_m *APIClient) ContainerAttach(ctx context.Context, _a1 string, options types.ContainerAttachOptions) (types.HijackedResponse, error) { 277 ret := _m.Called(ctx, _a1, options) 278 279 var r0 types.HijackedResponse 280 var r1 error 281 if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerAttachOptions) (types.HijackedResponse, error)); ok { 282 return rf(ctx, _a1, options) 283 } 284 if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerAttachOptions) types.HijackedResponse); ok { 285 r0 = rf(ctx, _a1, options) 286 } else { 287 r0 = ret.Get(0).(types.HijackedResponse) 288 } 289 290 if rf, ok := ret.Get(1).(func(context.Context, string, types.ContainerAttachOptions) error); ok { 291 r1 = rf(ctx, _a1, options) 292 } else { 293 r1 = ret.Error(1) 294 } 295 296 return r0, r1 297 } 298 299 // ContainerCommit provides a mock function with given fields: ctx, _a1, options 300 func (_m *APIClient) ContainerCommit(ctx context.Context, _a1 string, options types.ContainerCommitOptions) (types.IDResponse, error) { 301 ret := _m.Called(ctx, _a1, options) 302 303 var r0 types.IDResponse 304 var r1 error 305 if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerCommitOptions) (types.IDResponse, error)); ok { 306 return rf(ctx, _a1, options) 307 } 308 if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerCommitOptions) types.IDResponse); ok { 309 r0 = rf(ctx, _a1, options) 310 } else { 311 r0 = ret.Get(0).(types.IDResponse) 312 } 313 314 if rf, ok := ret.Get(1).(func(context.Context, string, types.ContainerCommitOptions) error); ok { 315 r1 = rf(ctx, _a1, options) 316 } else { 317 r1 = ret.Error(1) 318 } 319 320 return r0, r1 321 } 322 323 // ContainerCreate provides a mock function with given fields: ctx, config, hostConfig, networkingConfig, platform, containerName 324 func (_m *APIClient) ContainerCreate(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, platform *v1.Platform, containerName string) (container.CreateResponse, error) { 325 ret := _m.Called(ctx, config, hostConfig, networkingConfig, platform, containerName) 326 327 var r0 container.CreateResponse 328 var r1 error 329 if rf, ok := ret.Get(0).(func(context.Context, *container.Config, *container.HostConfig, *network.NetworkingConfig, *v1.Platform, string) (container.CreateResponse, error)); ok { 330 return rf(ctx, config, hostConfig, networkingConfig, platform, containerName) 331 } 332 if rf, ok := ret.Get(0).(func(context.Context, *container.Config, *container.HostConfig, *network.NetworkingConfig, *v1.Platform, string) container.CreateResponse); ok { 333 r0 = rf(ctx, config, hostConfig, networkingConfig, platform, containerName) 334 } else { 335 r0 = ret.Get(0).(container.CreateResponse) 336 } 337 338 if rf, ok := ret.Get(1).(func(context.Context, *container.Config, *container.HostConfig, *network.NetworkingConfig, *v1.Platform, string) error); ok { 339 r1 = rf(ctx, config, hostConfig, networkingConfig, platform, containerName) 340 } else { 341 r1 = ret.Error(1) 342 } 343 344 return r0, r1 345 } 346 347 // ContainerDiff provides a mock function with given fields: ctx, _a1 348 func (_m *APIClient) ContainerDiff(ctx context.Context, _a1 string) ([]container.ContainerChangeResponseItem, error) { 349 ret := _m.Called(ctx, _a1) 350 351 var r0 []container.ContainerChangeResponseItem 352 var r1 error 353 if rf, ok := ret.Get(0).(func(context.Context, string) ([]container.ContainerChangeResponseItem, error)); ok { 354 return rf(ctx, _a1) 355 } 356 if rf, ok := ret.Get(0).(func(context.Context, string) []container.ContainerChangeResponseItem); ok { 357 r0 = rf(ctx, _a1) 358 } else { 359 if ret.Get(0) != nil { 360 r0 = ret.Get(0).([]container.ContainerChangeResponseItem) 361 } 362 } 363 364 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 365 r1 = rf(ctx, _a1) 366 } else { 367 r1 = ret.Error(1) 368 } 369 370 return r0, r1 371 } 372 373 // ContainerExecAttach provides a mock function with given fields: ctx, execID, config 374 func (_m *APIClient) ContainerExecAttach(ctx context.Context, execID string, config types.ExecStartCheck) (types.HijackedResponse, error) { 375 ret := _m.Called(ctx, execID, config) 376 377 var r0 types.HijackedResponse 378 var r1 error 379 if rf, ok := ret.Get(0).(func(context.Context, string, types.ExecStartCheck) (types.HijackedResponse, error)); ok { 380 return rf(ctx, execID, config) 381 } 382 if rf, ok := ret.Get(0).(func(context.Context, string, types.ExecStartCheck) types.HijackedResponse); ok { 383 r0 = rf(ctx, execID, config) 384 } else { 385 r0 = ret.Get(0).(types.HijackedResponse) 386 } 387 388 if rf, ok := ret.Get(1).(func(context.Context, string, types.ExecStartCheck) error); ok { 389 r1 = rf(ctx, execID, config) 390 } else { 391 r1 = ret.Error(1) 392 } 393 394 return r0, r1 395 } 396 397 // ContainerExecCreate provides a mock function with given fields: ctx, _a1, config 398 func (_m *APIClient) ContainerExecCreate(ctx context.Context, _a1 string, config types.ExecConfig) (types.IDResponse, error) { 399 ret := _m.Called(ctx, _a1, config) 400 401 var r0 types.IDResponse 402 var r1 error 403 if rf, ok := ret.Get(0).(func(context.Context, string, types.ExecConfig) (types.IDResponse, error)); ok { 404 return rf(ctx, _a1, config) 405 } 406 if rf, ok := ret.Get(0).(func(context.Context, string, types.ExecConfig) types.IDResponse); ok { 407 r0 = rf(ctx, _a1, config) 408 } else { 409 r0 = ret.Get(0).(types.IDResponse) 410 } 411 412 if rf, ok := ret.Get(1).(func(context.Context, string, types.ExecConfig) error); ok { 413 r1 = rf(ctx, _a1, config) 414 } else { 415 r1 = ret.Error(1) 416 } 417 418 return r0, r1 419 } 420 421 // ContainerExecInspect provides a mock function with given fields: ctx, execID 422 func (_m *APIClient) ContainerExecInspect(ctx context.Context, execID string) (types.ContainerExecInspect, error) { 423 ret := _m.Called(ctx, execID) 424 425 var r0 types.ContainerExecInspect 426 var r1 error 427 if rf, ok := ret.Get(0).(func(context.Context, string) (types.ContainerExecInspect, error)); ok { 428 return rf(ctx, execID) 429 } 430 if rf, ok := ret.Get(0).(func(context.Context, string) types.ContainerExecInspect); ok { 431 r0 = rf(ctx, execID) 432 } else { 433 r0 = ret.Get(0).(types.ContainerExecInspect) 434 } 435 436 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 437 r1 = rf(ctx, execID) 438 } else { 439 r1 = ret.Error(1) 440 } 441 442 return r0, r1 443 } 444 445 // ContainerExecResize provides a mock function with given fields: ctx, execID, options 446 func (_m *APIClient) ContainerExecResize(ctx context.Context, execID string, options types.ResizeOptions) error { 447 ret := _m.Called(ctx, execID, options) 448 449 var r0 error 450 if rf, ok := ret.Get(0).(func(context.Context, string, types.ResizeOptions) error); ok { 451 r0 = rf(ctx, execID, options) 452 } else { 453 r0 = ret.Error(0) 454 } 455 456 return r0 457 } 458 459 // ContainerExecStart provides a mock function with given fields: ctx, execID, config 460 func (_m *APIClient) ContainerExecStart(ctx context.Context, execID string, config types.ExecStartCheck) error { 461 ret := _m.Called(ctx, execID, config) 462 463 var r0 error 464 if rf, ok := ret.Get(0).(func(context.Context, string, types.ExecStartCheck) error); ok { 465 r0 = rf(ctx, execID, config) 466 } else { 467 r0 = ret.Error(0) 468 } 469 470 return r0 471 } 472 473 // ContainerExport provides a mock function with given fields: ctx, _a1 474 func (_m *APIClient) ContainerExport(ctx context.Context, _a1 string) (io.ReadCloser, error) { 475 ret := _m.Called(ctx, _a1) 476 477 var r0 io.ReadCloser 478 var r1 error 479 if rf, ok := ret.Get(0).(func(context.Context, string) (io.ReadCloser, error)); ok { 480 return rf(ctx, _a1) 481 } 482 if rf, ok := ret.Get(0).(func(context.Context, string) io.ReadCloser); ok { 483 r0 = rf(ctx, _a1) 484 } else { 485 if ret.Get(0) != nil { 486 r0 = ret.Get(0).(io.ReadCloser) 487 } 488 } 489 490 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 491 r1 = rf(ctx, _a1) 492 } else { 493 r1 = ret.Error(1) 494 } 495 496 return r0, r1 497 } 498 499 // ContainerInspect provides a mock function with given fields: ctx, _a1 500 func (_m *APIClient) ContainerInspect(ctx context.Context, _a1 string) (types.ContainerJSON, error) { 501 ret := _m.Called(ctx, _a1) 502 503 var r0 types.ContainerJSON 504 var r1 error 505 if rf, ok := ret.Get(0).(func(context.Context, string) (types.ContainerJSON, error)); ok { 506 return rf(ctx, _a1) 507 } 508 if rf, ok := ret.Get(0).(func(context.Context, string) types.ContainerJSON); ok { 509 r0 = rf(ctx, _a1) 510 } else { 511 r0 = ret.Get(0).(types.ContainerJSON) 512 } 513 514 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 515 r1 = rf(ctx, _a1) 516 } else { 517 r1 = ret.Error(1) 518 } 519 520 return r0, r1 521 } 522 523 // ContainerInspectWithRaw provides a mock function with given fields: ctx, _a1, getSize 524 func (_m *APIClient) ContainerInspectWithRaw(ctx context.Context, _a1 string, getSize bool) (types.ContainerJSON, []byte, error) { 525 ret := _m.Called(ctx, _a1, getSize) 526 527 var r0 types.ContainerJSON 528 var r1 []byte 529 var r2 error 530 if rf, ok := ret.Get(0).(func(context.Context, string, bool) (types.ContainerJSON, []byte, error)); ok { 531 return rf(ctx, _a1, getSize) 532 } 533 if rf, ok := ret.Get(0).(func(context.Context, string, bool) types.ContainerJSON); ok { 534 r0 = rf(ctx, _a1, getSize) 535 } else { 536 r0 = ret.Get(0).(types.ContainerJSON) 537 } 538 539 if rf, ok := ret.Get(1).(func(context.Context, string, bool) []byte); ok { 540 r1 = rf(ctx, _a1, getSize) 541 } else { 542 if ret.Get(1) != nil { 543 r1 = ret.Get(1).([]byte) 544 } 545 } 546 547 if rf, ok := ret.Get(2).(func(context.Context, string, bool) error); ok { 548 r2 = rf(ctx, _a1, getSize) 549 } else { 550 r2 = ret.Error(2) 551 } 552 553 return r0, r1, r2 554 } 555 556 // ContainerKill provides a mock function with given fields: ctx, _a1, signal 557 func (_m *APIClient) ContainerKill(ctx context.Context, _a1 string, signal string) error { 558 ret := _m.Called(ctx, _a1, signal) 559 560 var r0 error 561 if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { 562 r0 = rf(ctx, _a1, signal) 563 } else { 564 r0 = ret.Error(0) 565 } 566 567 return r0 568 } 569 570 // ContainerList provides a mock function with given fields: ctx, options 571 func (_m *APIClient) ContainerList(ctx context.Context, options types.ContainerListOptions) ([]types.Container, error) { 572 ret := _m.Called(ctx, options) 573 574 var r0 []types.Container 575 var r1 error 576 if rf, ok := ret.Get(0).(func(context.Context, types.ContainerListOptions) ([]types.Container, error)); ok { 577 return rf(ctx, options) 578 } 579 if rf, ok := ret.Get(0).(func(context.Context, types.ContainerListOptions) []types.Container); ok { 580 r0 = rf(ctx, options) 581 } else { 582 if ret.Get(0) != nil { 583 r0 = ret.Get(0).([]types.Container) 584 } 585 } 586 587 if rf, ok := ret.Get(1).(func(context.Context, types.ContainerListOptions) error); ok { 588 r1 = rf(ctx, options) 589 } else { 590 r1 = ret.Error(1) 591 } 592 593 return r0, r1 594 } 595 596 // ContainerLogs provides a mock function with given fields: ctx, _a1, options 597 func (_m *APIClient) ContainerLogs(ctx context.Context, _a1 string, options types.ContainerLogsOptions) (io.ReadCloser, error) { 598 ret := _m.Called(ctx, _a1, options) 599 600 var r0 io.ReadCloser 601 var r1 error 602 if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerLogsOptions) (io.ReadCloser, error)); ok { 603 return rf(ctx, _a1, options) 604 } 605 if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerLogsOptions) io.ReadCloser); ok { 606 r0 = rf(ctx, _a1, options) 607 } else { 608 if ret.Get(0) != nil { 609 r0 = ret.Get(0).(io.ReadCloser) 610 } 611 } 612 613 if rf, ok := ret.Get(1).(func(context.Context, string, types.ContainerLogsOptions) error); ok { 614 r1 = rf(ctx, _a1, options) 615 } else { 616 r1 = ret.Error(1) 617 } 618 619 return r0, r1 620 } 621 622 // ContainerPause provides a mock function with given fields: ctx, _a1 623 func (_m *APIClient) ContainerPause(ctx context.Context, _a1 string) error { 624 ret := _m.Called(ctx, _a1) 625 626 var r0 error 627 if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { 628 r0 = rf(ctx, _a1) 629 } else { 630 r0 = ret.Error(0) 631 } 632 633 return r0 634 } 635 636 // ContainerRemove provides a mock function with given fields: ctx, _a1, options 637 func (_m *APIClient) ContainerRemove(ctx context.Context, _a1 string, options types.ContainerRemoveOptions) error { 638 ret := _m.Called(ctx, _a1, options) 639 640 var r0 error 641 if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerRemoveOptions) error); ok { 642 r0 = rf(ctx, _a1, options) 643 } else { 644 r0 = ret.Error(0) 645 } 646 647 return r0 648 } 649 650 // ContainerRename provides a mock function with given fields: ctx, _a1, newContainerName 651 func (_m *APIClient) ContainerRename(ctx context.Context, _a1 string, newContainerName string) error { 652 ret := _m.Called(ctx, _a1, newContainerName) 653 654 var r0 error 655 if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { 656 r0 = rf(ctx, _a1, newContainerName) 657 } else { 658 r0 = ret.Error(0) 659 } 660 661 return r0 662 } 663 664 // ContainerResize provides a mock function with given fields: ctx, _a1, options 665 func (_m *APIClient) ContainerResize(ctx context.Context, _a1 string, options types.ResizeOptions) error { 666 ret := _m.Called(ctx, _a1, options) 667 668 var r0 error 669 if rf, ok := ret.Get(0).(func(context.Context, string, types.ResizeOptions) error); ok { 670 r0 = rf(ctx, _a1, options) 671 } else { 672 r0 = ret.Error(0) 673 } 674 675 return r0 676 } 677 678 // ContainerRestart provides a mock function with given fields: ctx, _a1, options 679 func (_m *APIClient) ContainerRestart(ctx context.Context, _a1 string, options container.StopOptions) error { 680 ret := _m.Called(ctx, _a1, options) 681 682 var r0 error 683 if rf, ok := ret.Get(0).(func(context.Context, string, container.StopOptions) error); ok { 684 r0 = rf(ctx, _a1, options) 685 } else { 686 r0 = ret.Error(0) 687 } 688 689 return r0 690 } 691 692 // ContainerStart provides a mock function with given fields: ctx, _a1, options 693 func (_m *APIClient) ContainerStart(ctx context.Context, _a1 string, options types.ContainerStartOptions) error { 694 ret := _m.Called(ctx, _a1, options) 695 696 var r0 error 697 if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerStartOptions) error); ok { 698 r0 = rf(ctx, _a1, options) 699 } else { 700 r0 = ret.Error(0) 701 } 702 703 return r0 704 } 705 706 // ContainerStatPath provides a mock function with given fields: ctx, _a1, path 707 func (_m *APIClient) ContainerStatPath(ctx context.Context, _a1 string, path string) (types.ContainerPathStat, error) { 708 ret := _m.Called(ctx, _a1, path) 709 710 var r0 types.ContainerPathStat 711 var r1 error 712 if rf, ok := ret.Get(0).(func(context.Context, string, string) (types.ContainerPathStat, error)); ok { 713 return rf(ctx, _a1, path) 714 } 715 if rf, ok := ret.Get(0).(func(context.Context, string, string) types.ContainerPathStat); ok { 716 r0 = rf(ctx, _a1, path) 717 } else { 718 r0 = ret.Get(0).(types.ContainerPathStat) 719 } 720 721 if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { 722 r1 = rf(ctx, _a1, path) 723 } else { 724 r1 = ret.Error(1) 725 } 726 727 return r0, r1 728 } 729 730 // ContainerStats provides a mock function with given fields: ctx, _a1, stream 731 func (_m *APIClient) ContainerStats(ctx context.Context, _a1 string, stream bool) (types.ContainerStats, error) { 732 ret := _m.Called(ctx, _a1, stream) 733 734 var r0 types.ContainerStats 735 var r1 error 736 if rf, ok := ret.Get(0).(func(context.Context, string, bool) (types.ContainerStats, error)); ok { 737 return rf(ctx, _a1, stream) 738 } 739 if rf, ok := ret.Get(0).(func(context.Context, string, bool) types.ContainerStats); ok { 740 r0 = rf(ctx, _a1, stream) 741 } else { 742 r0 = ret.Get(0).(types.ContainerStats) 743 } 744 745 if rf, ok := ret.Get(1).(func(context.Context, string, bool) error); ok { 746 r1 = rf(ctx, _a1, stream) 747 } else { 748 r1 = ret.Error(1) 749 } 750 751 return r0, r1 752 } 753 754 // ContainerStatsOneShot provides a mock function with given fields: ctx, _a1 755 func (_m *APIClient) ContainerStatsOneShot(ctx context.Context, _a1 string) (types.ContainerStats, error) { 756 ret := _m.Called(ctx, _a1) 757 758 var r0 types.ContainerStats 759 var r1 error 760 if rf, ok := ret.Get(0).(func(context.Context, string) (types.ContainerStats, error)); ok { 761 return rf(ctx, _a1) 762 } 763 if rf, ok := ret.Get(0).(func(context.Context, string) types.ContainerStats); ok { 764 r0 = rf(ctx, _a1) 765 } else { 766 r0 = ret.Get(0).(types.ContainerStats) 767 } 768 769 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 770 r1 = rf(ctx, _a1) 771 } else { 772 r1 = ret.Error(1) 773 } 774 775 return r0, r1 776 } 777 778 // ContainerStop provides a mock function with given fields: ctx, _a1, options 779 func (_m *APIClient) ContainerStop(ctx context.Context, _a1 string, options container.StopOptions) error { 780 ret := _m.Called(ctx, _a1, options) 781 782 var r0 error 783 if rf, ok := ret.Get(0).(func(context.Context, string, container.StopOptions) error); ok { 784 r0 = rf(ctx, _a1, options) 785 } else { 786 r0 = ret.Error(0) 787 } 788 789 return r0 790 } 791 792 // ContainerTop provides a mock function with given fields: ctx, _a1, arguments 793 func (_m *APIClient) ContainerTop(ctx context.Context, _a1 string, arguments []string) (container.ContainerTopOKBody, error) { 794 ret := _m.Called(ctx, _a1, arguments) 795 796 var r0 container.ContainerTopOKBody 797 var r1 error 798 if rf, ok := ret.Get(0).(func(context.Context, string, []string) (container.ContainerTopOKBody, error)); ok { 799 return rf(ctx, _a1, arguments) 800 } 801 if rf, ok := ret.Get(0).(func(context.Context, string, []string) container.ContainerTopOKBody); ok { 802 r0 = rf(ctx, _a1, arguments) 803 } else { 804 r0 = ret.Get(0).(container.ContainerTopOKBody) 805 } 806 807 if rf, ok := ret.Get(1).(func(context.Context, string, []string) error); ok { 808 r1 = rf(ctx, _a1, arguments) 809 } else { 810 r1 = ret.Error(1) 811 } 812 813 return r0, r1 814 } 815 816 // ContainerUnpause provides a mock function with given fields: ctx, _a1 817 func (_m *APIClient) ContainerUnpause(ctx context.Context, _a1 string) error { 818 ret := _m.Called(ctx, _a1) 819 820 var r0 error 821 if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { 822 r0 = rf(ctx, _a1) 823 } else { 824 r0 = ret.Error(0) 825 } 826 827 return r0 828 } 829 830 // ContainerUpdate provides a mock function with given fields: ctx, _a1, updateConfig 831 func (_m *APIClient) ContainerUpdate(ctx context.Context, _a1 string, updateConfig container.UpdateConfig) (container.ContainerUpdateOKBody, error) { 832 ret := _m.Called(ctx, _a1, updateConfig) 833 834 var r0 container.ContainerUpdateOKBody 835 var r1 error 836 if rf, ok := ret.Get(0).(func(context.Context, string, container.UpdateConfig) (container.ContainerUpdateOKBody, error)); ok { 837 return rf(ctx, _a1, updateConfig) 838 } 839 if rf, ok := ret.Get(0).(func(context.Context, string, container.UpdateConfig) container.ContainerUpdateOKBody); ok { 840 r0 = rf(ctx, _a1, updateConfig) 841 } else { 842 r0 = ret.Get(0).(container.ContainerUpdateOKBody) 843 } 844 845 if rf, ok := ret.Get(1).(func(context.Context, string, container.UpdateConfig) error); ok { 846 r1 = rf(ctx, _a1, updateConfig) 847 } else { 848 r1 = ret.Error(1) 849 } 850 851 return r0, r1 852 } 853 854 // ContainerWait provides a mock function with given fields: ctx, _a1, condition 855 func (_m *APIClient) ContainerWait(ctx context.Context, _a1 string, condition container.WaitCondition) (<-chan container.WaitResponse, <-chan error) { 856 ret := _m.Called(ctx, _a1, condition) 857 858 var r0 <-chan container.WaitResponse 859 var r1 <-chan error 860 if rf, ok := ret.Get(0).(func(context.Context, string, container.WaitCondition) (<-chan container.WaitResponse, <-chan error)); ok { 861 return rf(ctx, _a1, condition) 862 } 863 if rf, ok := ret.Get(0).(func(context.Context, string, container.WaitCondition) <-chan container.WaitResponse); ok { 864 r0 = rf(ctx, _a1, condition) 865 } else { 866 if ret.Get(0) != nil { 867 r0 = ret.Get(0).(<-chan container.WaitResponse) 868 } 869 } 870 871 if rf, ok := ret.Get(1).(func(context.Context, string, container.WaitCondition) <-chan error); ok { 872 r1 = rf(ctx, _a1, condition) 873 } else { 874 if ret.Get(1) != nil { 875 r1 = ret.Get(1).(<-chan error) 876 } 877 } 878 879 return r0, r1 880 } 881 882 // ContainersPrune provides a mock function with given fields: ctx, pruneFilters 883 func (_m *APIClient) ContainersPrune(ctx context.Context, pruneFilters filters.Args) (types.ContainersPruneReport, error) { 884 ret := _m.Called(ctx, pruneFilters) 885 886 var r0 types.ContainersPruneReport 887 var r1 error 888 if rf, ok := ret.Get(0).(func(context.Context, filters.Args) (types.ContainersPruneReport, error)); ok { 889 return rf(ctx, pruneFilters) 890 } 891 if rf, ok := ret.Get(0).(func(context.Context, filters.Args) types.ContainersPruneReport); ok { 892 r0 = rf(ctx, pruneFilters) 893 } else { 894 r0 = ret.Get(0).(types.ContainersPruneReport) 895 } 896 897 if rf, ok := ret.Get(1).(func(context.Context, filters.Args) error); ok { 898 r1 = rf(ctx, pruneFilters) 899 } else { 900 r1 = ret.Error(1) 901 } 902 903 return r0, r1 904 } 905 906 // CopyFromContainer provides a mock function with given fields: ctx, _a1, srcPath 907 func (_m *APIClient) CopyFromContainer(ctx context.Context, _a1 string, srcPath string) (io.ReadCloser, types.ContainerPathStat, error) { 908 ret := _m.Called(ctx, _a1, srcPath) 909 910 var r0 io.ReadCloser 911 var r1 types.ContainerPathStat 912 var r2 error 913 if rf, ok := ret.Get(0).(func(context.Context, string, string) (io.ReadCloser, types.ContainerPathStat, error)); ok { 914 return rf(ctx, _a1, srcPath) 915 } 916 if rf, ok := ret.Get(0).(func(context.Context, string, string) io.ReadCloser); ok { 917 r0 = rf(ctx, _a1, srcPath) 918 } else { 919 if ret.Get(0) != nil { 920 r0 = ret.Get(0).(io.ReadCloser) 921 } 922 } 923 924 if rf, ok := ret.Get(1).(func(context.Context, string, string) types.ContainerPathStat); ok { 925 r1 = rf(ctx, _a1, srcPath) 926 } else { 927 r1 = ret.Get(1).(types.ContainerPathStat) 928 } 929 930 if rf, ok := ret.Get(2).(func(context.Context, string, string) error); ok { 931 r2 = rf(ctx, _a1, srcPath) 932 } else { 933 r2 = ret.Error(2) 934 } 935 936 return r0, r1, r2 937 } 938 939 // CopyToContainer provides a mock function with given fields: ctx, _a1, path, content, options 940 func (_m *APIClient) CopyToContainer(ctx context.Context, _a1 string, path string, content io.Reader, options types.CopyToContainerOptions) error { 941 ret := _m.Called(ctx, _a1, path, content, options) 942 943 var r0 error 944 if rf, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, types.CopyToContainerOptions) error); ok { 945 r0 = rf(ctx, _a1, path, content, options) 946 } else { 947 r0 = ret.Error(0) 948 } 949 950 return r0 951 } 952 953 // DaemonHost provides a mock function with given fields: 954 func (_m *APIClient) DaemonHost() string { 955 ret := _m.Called() 956 957 var r0 string 958 if rf, ok := ret.Get(0).(func() string); ok { 959 r0 = rf() 960 } else { 961 r0 = ret.Get(0).(string) 962 } 963 964 return r0 965 } 966 967 // DialHijack provides a mock function with given fields: ctx, url, proto, meta 968 func (_m *APIClient) DialHijack(ctx context.Context, url string, proto string, meta map[string][]string) (net.Conn, error) { 969 ret := _m.Called(ctx, url, proto, meta) 970 971 var r0 net.Conn 972 var r1 error 973 if rf, ok := ret.Get(0).(func(context.Context, string, string, map[string][]string) (net.Conn, error)); ok { 974 return rf(ctx, url, proto, meta) 975 } 976 if rf, ok := ret.Get(0).(func(context.Context, string, string, map[string][]string) net.Conn); ok { 977 r0 = rf(ctx, url, proto, meta) 978 } else { 979 if ret.Get(0) != nil { 980 r0 = ret.Get(0).(net.Conn) 981 } 982 } 983 984 if rf, ok := ret.Get(1).(func(context.Context, string, string, map[string][]string) error); ok { 985 r1 = rf(ctx, url, proto, meta) 986 } else { 987 r1 = ret.Error(1) 988 } 989 990 return r0, r1 991 } 992 993 // Dialer provides a mock function with given fields: 994 func (_m *APIClient) Dialer() func(context.Context) (net.Conn, error) { 995 ret := _m.Called() 996 997 var r0 func(context.Context) (net.Conn, error) 998 if rf, ok := ret.Get(0).(func() func(context.Context) (net.Conn, error)); ok { 999 r0 = rf() 1000 } else { 1001 if ret.Get(0) != nil { 1002 r0 = ret.Get(0).(func(context.Context) (net.Conn, error)) 1003 } 1004 } 1005 1006 return r0 1007 } 1008 1009 // DiskUsage provides a mock function with given fields: ctx, options 1010 func (_m *APIClient) DiskUsage(ctx context.Context, options types.DiskUsageOptions) (types.DiskUsage, error) { 1011 ret := _m.Called(ctx, options) 1012 1013 var r0 types.DiskUsage 1014 var r1 error 1015 if rf, ok := ret.Get(0).(func(context.Context, types.DiskUsageOptions) (types.DiskUsage, error)); ok { 1016 return rf(ctx, options) 1017 } 1018 if rf, ok := ret.Get(0).(func(context.Context, types.DiskUsageOptions) types.DiskUsage); ok { 1019 r0 = rf(ctx, options) 1020 } else { 1021 r0 = ret.Get(0).(types.DiskUsage) 1022 } 1023 1024 if rf, ok := ret.Get(1).(func(context.Context, types.DiskUsageOptions) error); ok { 1025 r1 = rf(ctx, options) 1026 } else { 1027 r1 = ret.Error(1) 1028 } 1029 1030 return r0, r1 1031 } 1032 1033 // DistributionInspect provides a mock function with given fields: ctx, _a1, encodedRegistryAuth 1034 func (_m *APIClient) DistributionInspect(ctx context.Context, _a1 string, encodedRegistryAuth string) (registry.DistributionInspect, error) { 1035 ret := _m.Called(ctx, _a1, encodedRegistryAuth) 1036 1037 var r0 registry.DistributionInspect 1038 var r1 error 1039 if rf, ok := ret.Get(0).(func(context.Context, string, string) (registry.DistributionInspect, error)); ok { 1040 return rf(ctx, _a1, encodedRegistryAuth) 1041 } 1042 if rf, ok := ret.Get(0).(func(context.Context, string, string) registry.DistributionInspect); ok { 1043 r0 = rf(ctx, _a1, encodedRegistryAuth) 1044 } else { 1045 r0 = ret.Get(0).(registry.DistributionInspect) 1046 } 1047 1048 if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { 1049 r1 = rf(ctx, _a1, encodedRegistryAuth) 1050 } else { 1051 r1 = ret.Error(1) 1052 } 1053 1054 return r0, r1 1055 } 1056 1057 // Events provides a mock function with given fields: ctx, options 1058 func (_m *APIClient) Events(ctx context.Context, options types.EventsOptions) (<-chan events.Message, <-chan error) { 1059 ret := _m.Called(ctx, options) 1060 1061 var r0 <-chan events.Message 1062 var r1 <-chan error 1063 if rf, ok := ret.Get(0).(func(context.Context, types.EventsOptions) (<-chan events.Message, <-chan error)); ok { 1064 return rf(ctx, options) 1065 } 1066 if rf, ok := ret.Get(0).(func(context.Context, types.EventsOptions) <-chan events.Message); ok { 1067 r0 = rf(ctx, options) 1068 } else { 1069 if ret.Get(0) != nil { 1070 r0 = ret.Get(0).(<-chan events.Message) 1071 } 1072 } 1073 1074 if rf, ok := ret.Get(1).(func(context.Context, types.EventsOptions) <-chan error); ok { 1075 r1 = rf(ctx, options) 1076 } else { 1077 if ret.Get(1) != nil { 1078 r1 = ret.Get(1).(<-chan error) 1079 } 1080 } 1081 1082 return r0, r1 1083 } 1084 1085 // HTTPClient provides a mock function with given fields: 1086 func (_m *APIClient) HTTPClient() *http.Client { 1087 ret := _m.Called() 1088 1089 var r0 *http.Client 1090 if rf, ok := ret.Get(0).(func() *http.Client); ok { 1091 r0 = rf() 1092 } else { 1093 if ret.Get(0) != nil { 1094 r0 = ret.Get(0).(*http.Client) 1095 } 1096 } 1097 1098 return r0 1099 } 1100 1101 // ImageBuild provides a mock function with given fields: ctx, _a1, options 1102 func (_m *APIClient) ImageBuild(ctx context.Context, _a1 io.Reader, options types.ImageBuildOptions) (types.ImageBuildResponse, error) { 1103 ret := _m.Called(ctx, _a1, options) 1104 1105 var r0 types.ImageBuildResponse 1106 var r1 error 1107 if rf, ok := ret.Get(0).(func(context.Context, io.Reader, types.ImageBuildOptions) (types.ImageBuildResponse, error)); ok { 1108 return rf(ctx, _a1, options) 1109 } 1110 if rf, ok := ret.Get(0).(func(context.Context, io.Reader, types.ImageBuildOptions) types.ImageBuildResponse); ok { 1111 r0 = rf(ctx, _a1, options) 1112 } else { 1113 r0 = ret.Get(0).(types.ImageBuildResponse) 1114 } 1115 1116 if rf, ok := ret.Get(1).(func(context.Context, io.Reader, types.ImageBuildOptions) error); ok { 1117 r1 = rf(ctx, _a1, options) 1118 } else { 1119 r1 = ret.Error(1) 1120 } 1121 1122 return r0, r1 1123 } 1124 1125 // ImageCreate provides a mock function with given fields: ctx, parentReference, options 1126 func (_m *APIClient) ImageCreate(ctx context.Context, parentReference string, options types.ImageCreateOptions) (io.ReadCloser, error) { 1127 ret := _m.Called(ctx, parentReference, options) 1128 1129 var r0 io.ReadCloser 1130 var r1 error 1131 if rf, ok := ret.Get(0).(func(context.Context, string, types.ImageCreateOptions) (io.ReadCloser, error)); ok { 1132 return rf(ctx, parentReference, options) 1133 } 1134 if rf, ok := ret.Get(0).(func(context.Context, string, types.ImageCreateOptions) io.ReadCloser); ok { 1135 r0 = rf(ctx, parentReference, options) 1136 } else { 1137 if ret.Get(0) != nil { 1138 r0 = ret.Get(0).(io.ReadCloser) 1139 } 1140 } 1141 1142 if rf, ok := ret.Get(1).(func(context.Context, string, types.ImageCreateOptions) error); ok { 1143 r1 = rf(ctx, parentReference, options) 1144 } else { 1145 r1 = ret.Error(1) 1146 } 1147 1148 return r0, r1 1149 } 1150 1151 // ImageHistory provides a mock function with given fields: ctx, _a1 1152 func (_m *APIClient) ImageHistory(ctx context.Context, _a1 string) ([]image.HistoryResponseItem, error) { 1153 ret := _m.Called(ctx, _a1) 1154 1155 var r0 []image.HistoryResponseItem 1156 var r1 error 1157 if rf, ok := ret.Get(0).(func(context.Context, string) ([]image.HistoryResponseItem, error)); ok { 1158 return rf(ctx, _a1) 1159 } 1160 if rf, ok := ret.Get(0).(func(context.Context, string) []image.HistoryResponseItem); ok { 1161 r0 = rf(ctx, _a1) 1162 } else { 1163 if ret.Get(0) != nil { 1164 r0 = ret.Get(0).([]image.HistoryResponseItem) 1165 } 1166 } 1167 1168 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 1169 r1 = rf(ctx, _a1) 1170 } else { 1171 r1 = ret.Error(1) 1172 } 1173 1174 return r0, r1 1175 } 1176 1177 // ImageImport provides a mock function with given fields: ctx, source, ref, options 1178 func (_m *APIClient) ImageImport(ctx context.Context, source types.ImageImportSource, ref string, options types.ImageImportOptions) (io.ReadCloser, error) { 1179 ret := _m.Called(ctx, source, ref, options) 1180 1181 var r0 io.ReadCloser 1182 var r1 error 1183 if rf, ok := ret.Get(0).(func(context.Context, types.ImageImportSource, string, types.ImageImportOptions) (io.ReadCloser, error)); ok { 1184 return rf(ctx, source, ref, options) 1185 } 1186 if rf, ok := ret.Get(0).(func(context.Context, types.ImageImportSource, string, types.ImageImportOptions) io.ReadCloser); ok { 1187 r0 = rf(ctx, source, ref, options) 1188 } else { 1189 if ret.Get(0) != nil { 1190 r0 = ret.Get(0).(io.ReadCloser) 1191 } 1192 } 1193 1194 if rf, ok := ret.Get(1).(func(context.Context, types.ImageImportSource, string, types.ImageImportOptions) error); ok { 1195 r1 = rf(ctx, source, ref, options) 1196 } else { 1197 r1 = ret.Error(1) 1198 } 1199 1200 return r0, r1 1201 } 1202 1203 // ImageInspectWithRaw provides a mock function with given fields: ctx, _a1 1204 func (_m *APIClient) ImageInspectWithRaw(ctx context.Context, _a1 string) (types.ImageInspect, []byte, error) { 1205 ret := _m.Called(ctx, _a1) 1206 1207 var r0 types.ImageInspect 1208 var r1 []byte 1209 var r2 error 1210 if rf, ok := ret.Get(0).(func(context.Context, string) (types.ImageInspect, []byte, error)); ok { 1211 return rf(ctx, _a1) 1212 } 1213 if rf, ok := ret.Get(0).(func(context.Context, string) types.ImageInspect); ok { 1214 r0 = rf(ctx, _a1) 1215 } else { 1216 r0 = ret.Get(0).(types.ImageInspect) 1217 } 1218 1219 if rf, ok := ret.Get(1).(func(context.Context, string) []byte); ok { 1220 r1 = rf(ctx, _a1) 1221 } else { 1222 if ret.Get(1) != nil { 1223 r1 = ret.Get(1).([]byte) 1224 } 1225 } 1226 1227 if rf, ok := ret.Get(2).(func(context.Context, string) error); ok { 1228 r2 = rf(ctx, _a1) 1229 } else { 1230 r2 = ret.Error(2) 1231 } 1232 1233 return r0, r1, r2 1234 } 1235 1236 // ImageList provides a mock function with given fields: ctx, options 1237 func (_m *APIClient) ImageList(ctx context.Context, options types.ImageListOptions) ([]types.ImageSummary, error) { 1238 ret := _m.Called(ctx, options) 1239 1240 var r0 []types.ImageSummary 1241 var r1 error 1242 if rf, ok := ret.Get(0).(func(context.Context, types.ImageListOptions) ([]types.ImageSummary, error)); ok { 1243 return rf(ctx, options) 1244 } 1245 if rf, ok := ret.Get(0).(func(context.Context, types.ImageListOptions) []types.ImageSummary); ok { 1246 r0 = rf(ctx, options) 1247 } else { 1248 if ret.Get(0) != nil { 1249 r0 = ret.Get(0).([]types.ImageSummary) 1250 } 1251 } 1252 1253 if rf, ok := ret.Get(1).(func(context.Context, types.ImageListOptions) error); ok { 1254 r1 = rf(ctx, options) 1255 } else { 1256 r1 = ret.Error(1) 1257 } 1258 1259 return r0, r1 1260 } 1261 1262 // ImageLoad provides a mock function with given fields: ctx, input, quiet 1263 func (_m *APIClient) ImageLoad(ctx context.Context, input io.Reader, quiet bool) (types.ImageLoadResponse, error) { 1264 ret := _m.Called(ctx, input, quiet) 1265 1266 var r0 types.ImageLoadResponse 1267 var r1 error 1268 if rf, ok := ret.Get(0).(func(context.Context, io.Reader, bool) (types.ImageLoadResponse, error)); ok { 1269 return rf(ctx, input, quiet) 1270 } 1271 if rf, ok := ret.Get(0).(func(context.Context, io.Reader, bool) types.ImageLoadResponse); ok { 1272 r0 = rf(ctx, input, quiet) 1273 } else { 1274 r0 = ret.Get(0).(types.ImageLoadResponse) 1275 } 1276 1277 if rf, ok := ret.Get(1).(func(context.Context, io.Reader, bool) error); ok { 1278 r1 = rf(ctx, input, quiet) 1279 } else { 1280 r1 = ret.Error(1) 1281 } 1282 1283 return r0, r1 1284 } 1285 1286 // ImagePull provides a mock function with given fields: ctx, ref, options 1287 func (_m *APIClient) ImagePull(ctx context.Context, ref string, options types.ImagePullOptions) (io.ReadCloser, error) { 1288 ret := _m.Called(ctx, ref, options) 1289 1290 var r0 io.ReadCloser 1291 var r1 error 1292 if rf, ok := ret.Get(0).(func(context.Context, string, types.ImagePullOptions) (io.ReadCloser, error)); ok { 1293 return rf(ctx, ref, options) 1294 } 1295 if rf, ok := ret.Get(0).(func(context.Context, string, types.ImagePullOptions) io.ReadCloser); ok { 1296 r0 = rf(ctx, ref, options) 1297 } else { 1298 if ret.Get(0) != nil { 1299 r0 = ret.Get(0).(io.ReadCloser) 1300 } 1301 } 1302 1303 if rf, ok := ret.Get(1).(func(context.Context, string, types.ImagePullOptions) error); ok { 1304 r1 = rf(ctx, ref, options) 1305 } else { 1306 r1 = ret.Error(1) 1307 } 1308 1309 return r0, r1 1310 } 1311 1312 // ImagePush provides a mock function with given fields: ctx, ref, options 1313 func (_m *APIClient) ImagePush(ctx context.Context, ref string, options types.ImagePushOptions) (io.ReadCloser, error) { 1314 ret := _m.Called(ctx, ref, options) 1315 1316 var r0 io.ReadCloser 1317 var r1 error 1318 if rf, ok := ret.Get(0).(func(context.Context, string, types.ImagePushOptions) (io.ReadCloser, error)); ok { 1319 return rf(ctx, ref, options) 1320 } 1321 if rf, ok := ret.Get(0).(func(context.Context, string, types.ImagePushOptions) io.ReadCloser); ok { 1322 r0 = rf(ctx, ref, options) 1323 } else { 1324 if ret.Get(0) != nil { 1325 r0 = ret.Get(0).(io.ReadCloser) 1326 } 1327 } 1328 1329 if rf, ok := ret.Get(1).(func(context.Context, string, types.ImagePushOptions) error); ok { 1330 r1 = rf(ctx, ref, options) 1331 } else { 1332 r1 = ret.Error(1) 1333 } 1334 1335 return r0, r1 1336 } 1337 1338 // ImageRemove provides a mock function with given fields: ctx, _a1, options 1339 func (_m *APIClient) ImageRemove(ctx context.Context, _a1 string, options types.ImageRemoveOptions) ([]types.ImageDeleteResponseItem, error) { 1340 ret := _m.Called(ctx, _a1, options) 1341 1342 var r0 []types.ImageDeleteResponseItem 1343 var r1 error 1344 if rf, ok := ret.Get(0).(func(context.Context, string, types.ImageRemoveOptions) ([]types.ImageDeleteResponseItem, error)); ok { 1345 return rf(ctx, _a1, options) 1346 } 1347 if rf, ok := ret.Get(0).(func(context.Context, string, types.ImageRemoveOptions) []types.ImageDeleteResponseItem); ok { 1348 r0 = rf(ctx, _a1, options) 1349 } else { 1350 if ret.Get(0) != nil { 1351 r0 = ret.Get(0).([]types.ImageDeleteResponseItem) 1352 } 1353 } 1354 1355 if rf, ok := ret.Get(1).(func(context.Context, string, types.ImageRemoveOptions) error); ok { 1356 r1 = rf(ctx, _a1, options) 1357 } else { 1358 r1 = ret.Error(1) 1359 } 1360 1361 return r0, r1 1362 } 1363 1364 // ImageSave provides a mock function with given fields: ctx, images 1365 func (_m *APIClient) ImageSave(ctx context.Context, images []string) (io.ReadCloser, error) { 1366 ret := _m.Called(ctx, images) 1367 1368 var r0 io.ReadCloser 1369 var r1 error 1370 if rf, ok := ret.Get(0).(func(context.Context, []string) (io.ReadCloser, error)); ok { 1371 return rf(ctx, images) 1372 } 1373 if rf, ok := ret.Get(0).(func(context.Context, []string) io.ReadCloser); ok { 1374 r0 = rf(ctx, images) 1375 } else { 1376 if ret.Get(0) != nil { 1377 r0 = ret.Get(0).(io.ReadCloser) 1378 } 1379 } 1380 1381 if rf, ok := ret.Get(1).(func(context.Context, []string) error); ok { 1382 r1 = rf(ctx, images) 1383 } else { 1384 r1 = ret.Error(1) 1385 } 1386 1387 return r0, r1 1388 } 1389 1390 // ImageSearch provides a mock function with given fields: ctx, term, options 1391 func (_m *APIClient) ImageSearch(ctx context.Context, term string, options types.ImageSearchOptions) ([]registry.SearchResult, error) { 1392 ret := _m.Called(ctx, term, options) 1393 1394 var r0 []registry.SearchResult 1395 var r1 error 1396 if rf, ok := ret.Get(0).(func(context.Context, string, types.ImageSearchOptions) ([]registry.SearchResult, error)); ok { 1397 return rf(ctx, term, options) 1398 } 1399 if rf, ok := ret.Get(0).(func(context.Context, string, types.ImageSearchOptions) []registry.SearchResult); ok { 1400 r0 = rf(ctx, term, options) 1401 } else { 1402 if ret.Get(0) != nil { 1403 r0 = ret.Get(0).([]registry.SearchResult) 1404 } 1405 } 1406 1407 if rf, ok := ret.Get(1).(func(context.Context, string, types.ImageSearchOptions) error); ok { 1408 r1 = rf(ctx, term, options) 1409 } else { 1410 r1 = ret.Error(1) 1411 } 1412 1413 return r0, r1 1414 } 1415 1416 // ImageTag provides a mock function with given fields: ctx, _a1, ref 1417 func (_m *APIClient) ImageTag(ctx context.Context, _a1 string, ref string) error { 1418 ret := _m.Called(ctx, _a1, ref) 1419 1420 var r0 error 1421 if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { 1422 r0 = rf(ctx, _a1, ref) 1423 } else { 1424 r0 = ret.Error(0) 1425 } 1426 1427 return r0 1428 } 1429 1430 // ImagesPrune provides a mock function with given fields: ctx, pruneFilter 1431 func (_m *APIClient) ImagesPrune(ctx context.Context, pruneFilter filters.Args) (types.ImagesPruneReport, error) { 1432 ret := _m.Called(ctx, pruneFilter) 1433 1434 var r0 types.ImagesPruneReport 1435 var r1 error 1436 if rf, ok := ret.Get(0).(func(context.Context, filters.Args) (types.ImagesPruneReport, error)); ok { 1437 return rf(ctx, pruneFilter) 1438 } 1439 if rf, ok := ret.Get(0).(func(context.Context, filters.Args) types.ImagesPruneReport); ok { 1440 r0 = rf(ctx, pruneFilter) 1441 } else { 1442 r0 = ret.Get(0).(types.ImagesPruneReport) 1443 } 1444 1445 if rf, ok := ret.Get(1).(func(context.Context, filters.Args) error); ok { 1446 r1 = rf(ctx, pruneFilter) 1447 } else { 1448 r1 = ret.Error(1) 1449 } 1450 1451 return r0, r1 1452 } 1453 1454 // Info provides a mock function with given fields: ctx 1455 func (_m *APIClient) Info(ctx context.Context) (types.Info, error) { 1456 ret := _m.Called(ctx) 1457 1458 var r0 types.Info 1459 var r1 error 1460 if rf, ok := ret.Get(0).(func(context.Context) (types.Info, error)); ok { 1461 return rf(ctx) 1462 } 1463 if rf, ok := ret.Get(0).(func(context.Context) types.Info); ok { 1464 r0 = rf(ctx) 1465 } else { 1466 r0 = ret.Get(0).(types.Info) 1467 } 1468 1469 if rf, ok := ret.Get(1).(func(context.Context) error); ok { 1470 r1 = rf(ctx) 1471 } else { 1472 r1 = ret.Error(1) 1473 } 1474 1475 return r0, r1 1476 } 1477 1478 // NegotiateAPIVersion provides a mock function with given fields: ctx 1479 func (_m *APIClient) NegotiateAPIVersion(ctx context.Context) { 1480 _m.Called(ctx) 1481 } 1482 1483 // NegotiateAPIVersionPing provides a mock function with given fields: _a0 1484 func (_m *APIClient) NegotiateAPIVersionPing(_a0 types.Ping) { 1485 _m.Called(_a0) 1486 } 1487 1488 // NetworkConnect provides a mock function with given fields: ctx, _a1, _a2, config 1489 func (_m *APIClient) NetworkConnect(ctx context.Context, _a1 string, _a2 string, config *network.EndpointSettings) error { 1490 ret := _m.Called(ctx, _a1, _a2, config) 1491 1492 var r0 error 1493 if rf, ok := ret.Get(0).(func(context.Context, string, string, *network.EndpointSettings) error); ok { 1494 r0 = rf(ctx, _a1, _a2, config) 1495 } else { 1496 r0 = ret.Error(0) 1497 } 1498 1499 return r0 1500 } 1501 1502 // NetworkCreate provides a mock function with given fields: ctx, name, options 1503 func (_m *APIClient) NetworkCreate(ctx context.Context, name string, options types.NetworkCreate) (types.NetworkCreateResponse, error) { 1504 ret := _m.Called(ctx, name, options) 1505 1506 var r0 types.NetworkCreateResponse 1507 var r1 error 1508 if rf, ok := ret.Get(0).(func(context.Context, string, types.NetworkCreate) (types.NetworkCreateResponse, error)); ok { 1509 return rf(ctx, name, options) 1510 } 1511 if rf, ok := ret.Get(0).(func(context.Context, string, types.NetworkCreate) types.NetworkCreateResponse); ok { 1512 r0 = rf(ctx, name, options) 1513 } else { 1514 r0 = ret.Get(0).(types.NetworkCreateResponse) 1515 } 1516 1517 if rf, ok := ret.Get(1).(func(context.Context, string, types.NetworkCreate) error); ok { 1518 r1 = rf(ctx, name, options) 1519 } else { 1520 r1 = ret.Error(1) 1521 } 1522 1523 return r0, r1 1524 } 1525 1526 // NetworkDisconnect provides a mock function with given fields: ctx, _a1, _a2, force 1527 func (_m *APIClient) NetworkDisconnect(ctx context.Context, _a1 string, _a2 string, force bool) error { 1528 ret := _m.Called(ctx, _a1, _a2, force) 1529 1530 var r0 error 1531 if rf, ok := ret.Get(0).(func(context.Context, string, string, bool) error); ok { 1532 r0 = rf(ctx, _a1, _a2, force) 1533 } else { 1534 r0 = ret.Error(0) 1535 } 1536 1537 return r0 1538 } 1539 1540 // NetworkInspect provides a mock function with given fields: ctx, _a1, options 1541 func (_m *APIClient) NetworkInspect(ctx context.Context, _a1 string, options types.NetworkInspectOptions) (types.NetworkResource, error) { 1542 ret := _m.Called(ctx, _a1, options) 1543 1544 var r0 types.NetworkResource 1545 var r1 error 1546 if rf, ok := ret.Get(0).(func(context.Context, string, types.NetworkInspectOptions) (types.NetworkResource, error)); ok { 1547 return rf(ctx, _a1, options) 1548 } 1549 if rf, ok := ret.Get(0).(func(context.Context, string, types.NetworkInspectOptions) types.NetworkResource); ok { 1550 r0 = rf(ctx, _a1, options) 1551 } else { 1552 r0 = ret.Get(0).(types.NetworkResource) 1553 } 1554 1555 if rf, ok := ret.Get(1).(func(context.Context, string, types.NetworkInspectOptions) error); ok { 1556 r1 = rf(ctx, _a1, options) 1557 } else { 1558 r1 = ret.Error(1) 1559 } 1560 1561 return r0, r1 1562 } 1563 1564 // NetworkInspectWithRaw provides a mock function with given fields: ctx, _a1, options 1565 func (_m *APIClient) NetworkInspectWithRaw(ctx context.Context, _a1 string, options types.NetworkInspectOptions) (types.NetworkResource, []byte, error) { 1566 ret := _m.Called(ctx, _a1, options) 1567 1568 var r0 types.NetworkResource 1569 var r1 []byte 1570 var r2 error 1571 if rf, ok := ret.Get(0).(func(context.Context, string, types.NetworkInspectOptions) (types.NetworkResource, []byte, error)); ok { 1572 return rf(ctx, _a1, options) 1573 } 1574 if rf, ok := ret.Get(0).(func(context.Context, string, types.NetworkInspectOptions) types.NetworkResource); ok { 1575 r0 = rf(ctx, _a1, options) 1576 } else { 1577 r0 = ret.Get(0).(types.NetworkResource) 1578 } 1579 1580 if rf, ok := ret.Get(1).(func(context.Context, string, types.NetworkInspectOptions) []byte); ok { 1581 r1 = rf(ctx, _a1, options) 1582 } else { 1583 if ret.Get(1) != nil { 1584 r1 = ret.Get(1).([]byte) 1585 } 1586 } 1587 1588 if rf, ok := ret.Get(2).(func(context.Context, string, types.NetworkInspectOptions) error); ok { 1589 r2 = rf(ctx, _a1, options) 1590 } else { 1591 r2 = ret.Error(2) 1592 } 1593 1594 return r0, r1, r2 1595 } 1596 1597 // NetworkList provides a mock function with given fields: ctx, options 1598 func (_m *APIClient) NetworkList(ctx context.Context, options types.NetworkListOptions) ([]types.NetworkResource, error) { 1599 ret := _m.Called(ctx, options) 1600 1601 var r0 []types.NetworkResource 1602 var r1 error 1603 if rf, ok := ret.Get(0).(func(context.Context, types.NetworkListOptions) ([]types.NetworkResource, error)); ok { 1604 return rf(ctx, options) 1605 } 1606 if rf, ok := ret.Get(0).(func(context.Context, types.NetworkListOptions) []types.NetworkResource); ok { 1607 r0 = rf(ctx, options) 1608 } else { 1609 if ret.Get(0) != nil { 1610 r0 = ret.Get(0).([]types.NetworkResource) 1611 } 1612 } 1613 1614 if rf, ok := ret.Get(1).(func(context.Context, types.NetworkListOptions) error); ok { 1615 r1 = rf(ctx, options) 1616 } else { 1617 r1 = ret.Error(1) 1618 } 1619 1620 return r0, r1 1621 } 1622 1623 // NetworkRemove provides a mock function with given fields: ctx, _a1 1624 func (_m *APIClient) NetworkRemove(ctx context.Context, _a1 string) error { 1625 ret := _m.Called(ctx, _a1) 1626 1627 var r0 error 1628 if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { 1629 r0 = rf(ctx, _a1) 1630 } else { 1631 r0 = ret.Error(0) 1632 } 1633 1634 return r0 1635 } 1636 1637 // NetworksPrune provides a mock function with given fields: ctx, pruneFilter 1638 func (_m *APIClient) NetworksPrune(ctx context.Context, pruneFilter filters.Args) (types.NetworksPruneReport, error) { 1639 ret := _m.Called(ctx, pruneFilter) 1640 1641 var r0 types.NetworksPruneReport 1642 var r1 error 1643 if rf, ok := ret.Get(0).(func(context.Context, filters.Args) (types.NetworksPruneReport, error)); ok { 1644 return rf(ctx, pruneFilter) 1645 } 1646 if rf, ok := ret.Get(0).(func(context.Context, filters.Args) types.NetworksPruneReport); ok { 1647 r0 = rf(ctx, pruneFilter) 1648 } else { 1649 r0 = ret.Get(0).(types.NetworksPruneReport) 1650 } 1651 1652 if rf, ok := ret.Get(1).(func(context.Context, filters.Args) error); ok { 1653 r1 = rf(ctx, pruneFilter) 1654 } else { 1655 r1 = ret.Error(1) 1656 } 1657 1658 return r0, r1 1659 } 1660 1661 // NodeInspectWithRaw provides a mock function with given fields: ctx, nodeID 1662 func (_m *APIClient) NodeInspectWithRaw(ctx context.Context, nodeID string) (swarm.Node, []byte, error) { 1663 ret := _m.Called(ctx, nodeID) 1664 1665 var r0 swarm.Node 1666 var r1 []byte 1667 var r2 error 1668 if rf, ok := ret.Get(0).(func(context.Context, string) (swarm.Node, []byte, error)); ok { 1669 return rf(ctx, nodeID) 1670 } 1671 if rf, ok := ret.Get(0).(func(context.Context, string) swarm.Node); ok { 1672 r0 = rf(ctx, nodeID) 1673 } else { 1674 r0 = ret.Get(0).(swarm.Node) 1675 } 1676 1677 if rf, ok := ret.Get(1).(func(context.Context, string) []byte); ok { 1678 r1 = rf(ctx, nodeID) 1679 } else { 1680 if ret.Get(1) != nil { 1681 r1 = ret.Get(1).([]byte) 1682 } 1683 } 1684 1685 if rf, ok := ret.Get(2).(func(context.Context, string) error); ok { 1686 r2 = rf(ctx, nodeID) 1687 } else { 1688 r2 = ret.Error(2) 1689 } 1690 1691 return r0, r1, r2 1692 } 1693 1694 // NodeList provides a mock function with given fields: ctx, options 1695 func (_m *APIClient) NodeList(ctx context.Context, options types.NodeListOptions) ([]swarm.Node, error) { 1696 ret := _m.Called(ctx, options) 1697 1698 var r0 []swarm.Node 1699 var r1 error 1700 if rf, ok := ret.Get(0).(func(context.Context, types.NodeListOptions) ([]swarm.Node, error)); ok { 1701 return rf(ctx, options) 1702 } 1703 if rf, ok := ret.Get(0).(func(context.Context, types.NodeListOptions) []swarm.Node); ok { 1704 r0 = rf(ctx, options) 1705 } else { 1706 if ret.Get(0) != nil { 1707 r0 = ret.Get(0).([]swarm.Node) 1708 } 1709 } 1710 1711 if rf, ok := ret.Get(1).(func(context.Context, types.NodeListOptions) error); ok { 1712 r1 = rf(ctx, options) 1713 } else { 1714 r1 = ret.Error(1) 1715 } 1716 1717 return r0, r1 1718 } 1719 1720 // NodeRemove provides a mock function with given fields: ctx, nodeID, options 1721 func (_m *APIClient) NodeRemove(ctx context.Context, nodeID string, options types.NodeRemoveOptions) error { 1722 ret := _m.Called(ctx, nodeID, options) 1723 1724 var r0 error 1725 if rf, ok := ret.Get(0).(func(context.Context, string, types.NodeRemoveOptions) error); ok { 1726 r0 = rf(ctx, nodeID, options) 1727 } else { 1728 r0 = ret.Error(0) 1729 } 1730 1731 return r0 1732 } 1733 1734 // NodeUpdate provides a mock function with given fields: ctx, nodeID, version, node 1735 func (_m *APIClient) NodeUpdate(ctx context.Context, nodeID string, version swarm.Version, node swarm.NodeSpec) error { 1736 ret := _m.Called(ctx, nodeID, version, node) 1737 1738 var r0 error 1739 if rf, ok := ret.Get(0).(func(context.Context, string, swarm.Version, swarm.NodeSpec) error); ok { 1740 r0 = rf(ctx, nodeID, version, node) 1741 } else { 1742 r0 = ret.Error(0) 1743 } 1744 1745 return r0 1746 } 1747 1748 // Ping provides a mock function with given fields: ctx 1749 func (_m *APIClient) Ping(ctx context.Context) (types.Ping, error) { 1750 ret := _m.Called(ctx) 1751 1752 var r0 types.Ping 1753 var r1 error 1754 if rf, ok := ret.Get(0).(func(context.Context) (types.Ping, error)); ok { 1755 return rf(ctx) 1756 } 1757 if rf, ok := ret.Get(0).(func(context.Context) types.Ping); ok { 1758 r0 = rf(ctx) 1759 } else { 1760 r0 = ret.Get(0).(types.Ping) 1761 } 1762 1763 if rf, ok := ret.Get(1).(func(context.Context) error); ok { 1764 r1 = rf(ctx) 1765 } else { 1766 r1 = ret.Error(1) 1767 } 1768 1769 return r0, r1 1770 } 1771 1772 // PluginCreate provides a mock function with given fields: ctx, createContext, options 1773 func (_m *APIClient) PluginCreate(ctx context.Context, createContext io.Reader, options types.PluginCreateOptions) error { 1774 ret := _m.Called(ctx, createContext, options) 1775 1776 var r0 error 1777 if rf, ok := ret.Get(0).(func(context.Context, io.Reader, types.PluginCreateOptions) error); ok { 1778 r0 = rf(ctx, createContext, options) 1779 } else { 1780 r0 = ret.Error(0) 1781 } 1782 1783 return r0 1784 } 1785 1786 // PluginDisable provides a mock function with given fields: ctx, name, options 1787 func (_m *APIClient) PluginDisable(ctx context.Context, name string, options types.PluginDisableOptions) error { 1788 ret := _m.Called(ctx, name, options) 1789 1790 var r0 error 1791 if rf, ok := ret.Get(0).(func(context.Context, string, types.PluginDisableOptions) error); ok { 1792 r0 = rf(ctx, name, options) 1793 } else { 1794 r0 = ret.Error(0) 1795 } 1796 1797 return r0 1798 } 1799 1800 // PluginEnable provides a mock function with given fields: ctx, name, options 1801 func (_m *APIClient) PluginEnable(ctx context.Context, name string, options types.PluginEnableOptions) error { 1802 ret := _m.Called(ctx, name, options) 1803 1804 var r0 error 1805 if rf, ok := ret.Get(0).(func(context.Context, string, types.PluginEnableOptions) error); ok { 1806 r0 = rf(ctx, name, options) 1807 } else { 1808 r0 = ret.Error(0) 1809 } 1810 1811 return r0 1812 } 1813 1814 // PluginInspectWithRaw provides a mock function with given fields: ctx, name 1815 func (_m *APIClient) PluginInspectWithRaw(ctx context.Context, name string) (*types.Plugin, []byte, error) { 1816 ret := _m.Called(ctx, name) 1817 1818 var r0 *types.Plugin 1819 var r1 []byte 1820 var r2 error 1821 if rf, ok := ret.Get(0).(func(context.Context, string) (*types.Plugin, []byte, error)); ok { 1822 return rf(ctx, name) 1823 } 1824 if rf, ok := ret.Get(0).(func(context.Context, string) *types.Plugin); ok { 1825 r0 = rf(ctx, name) 1826 } else { 1827 if ret.Get(0) != nil { 1828 r0 = ret.Get(0).(*types.Plugin) 1829 } 1830 } 1831 1832 if rf, ok := ret.Get(1).(func(context.Context, string) []byte); ok { 1833 r1 = rf(ctx, name) 1834 } else { 1835 if ret.Get(1) != nil { 1836 r1 = ret.Get(1).([]byte) 1837 } 1838 } 1839 1840 if rf, ok := ret.Get(2).(func(context.Context, string) error); ok { 1841 r2 = rf(ctx, name) 1842 } else { 1843 r2 = ret.Error(2) 1844 } 1845 1846 return r0, r1, r2 1847 } 1848 1849 // PluginInstall provides a mock function with given fields: ctx, name, options 1850 func (_m *APIClient) PluginInstall(ctx context.Context, name string, options types.PluginInstallOptions) (io.ReadCloser, error) { 1851 ret := _m.Called(ctx, name, options) 1852 1853 var r0 io.ReadCloser 1854 var r1 error 1855 if rf, ok := ret.Get(0).(func(context.Context, string, types.PluginInstallOptions) (io.ReadCloser, error)); ok { 1856 return rf(ctx, name, options) 1857 } 1858 if rf, ok := ret.Get(0).(func(context.Context, string, types.PluginInstallOptions) io.ReadCloser); ok { 1859 r0 = rf(ctx, name, options) 1860 } else { 1861 if ret.Get(0) != nil { 1862 r0 = ret.Get(0).(io.ReadCloser) 1863 } 1864 } 1865 1866 if rf, ok := ret.Get(1).(func(context.Context, string, types.PluginInstallOptions) error); ok { 1867 r1 = rf(ctx, name, options) 1868 } else { 1869 r1 = ret.Error(1) 1870 } 1871 1872 return r0, r1 1873 } 1874 1875 // PluginList provides a mock function with given fields: ctx, filter 1876 func (_m *APIClient) PluginList(ctx context.Context, filter filters.Args) (types.PluginsListResponse, error) { 1877 ret := _m.Called(ctx, filter) 1878 1879 var r0 types.PluginsListResponse 1880 var r1 error 1881 if rf, ok := ret.Get(0).(func(context.Context, filters.Args) (types.PluginsListResponse, error)); ok { 1882 return rf(ctx, filter) 1883 } 1884 if rf, ok := ret.Get(0).(func(context.Context, filters.Args) types.PluginsListResponse); ok { 1885 r0 = rf(ctx, filter) 1886 } else { 1887 if ret.Get(0) != nil { 1888 r0 = ret.Get(0).(types.PluginsListResponse) 1889 } 1890 } 1891 1892 if rf, ok := ret.Get(1).(func(context.Context, filters.Args) error); ok { 1893 r1 = rf(ctx, filter) 1894 } else { 1895 r1 = ret.Error(1) 1896 } 1897 1898 return r0, r1 1899 } 1900 1901 // PluginPush provides a mock function with given fields: ctx, name, registryAuth 1902 func (_m *APIClient) PluginPush(ctx context.Context, name string, registryAuth string) (io.ReadCloser, error) { 1903 ret := _m.Called(ctx, name, registryAuth) 1904 1905 var r0 io.ReadCloser 1906 var r1 error 1907 if rf, ok := ret.Get(0).(func(context.Context, string, string) (io.ReadCloser, error)); ok { 1908 return rf(ctx, name, registryAuth) 1909 } 1910 if rf, ok := ret.Get(0).(func(context.Context, string, string) io.ReadCloser); ok { 1911 r0 = rf(ctx, name, registryAuth) 1912 } else { 1913 if ret.Get(0) != nil { 1914 r0 = ret.Get(0).(io.ReadCloser) 1915 } 1916 } 1917 1918 if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { 1919 r1 = rf(ctx, name, registryAuth) 1920 } else { 1921 r1 = ret.Error(1) 1922 } 1923 1924 return r0, r1 1925 } 1926 1927 // PluginRemove provides a mock function with given fields: ctx, name, options 1928 func (_m *APIClient) PluginRemove(ctx context.Context, name string, options types.PluginRemoveOptions) error { 1929 ret := _m.Called(ctx, name, options) 1930 1931 var r0 error 1932 if rf, ok := ret.Get(0).(func(context.Context, string, types.PluginRemoveOptions) error); ok { 1933 r0 = rf(ctx, name, options) 1934 } else { 1935 r0 = ret.Error(0) 1936 } 1937 1938 return r0 1939 } 1940 1941 // PluginSet provides a mock function with given fields: ctx, name, args 1942 func (_m *APIClient) PluginSet(ctx context.Context, name string, args []string) error { 1943 ret := _m.Called(ctx, name, args) 1944 1945 var r0 error 1946 if rf, ok := ret.Get(0).(func(context.Context, string, []string) error); ok { 1947 r0 = rf(ctx, name, args) 1948 } else { 1949 r0 = ret.Error(0) 1950 } 1951 1952 return r0 1953 } 1954 1955 // PluginUpgrade provides a mock function with given fields: ctx, name, options 1956 func (_m *APIClient) PluginUpgrade(ctx context.Context, name string, options types.PluginInstallOptions) (io.ReadCloser, error) { 1957 ret := _m.Called(ctx, name, options) 1958 1959 var r0 io.ReadCloser 1960 var r1 error 1961 if rf, ok := ret.Get(0).(func(context.Context, string, types.PluginInstallOptions) (io.ReadCloser, error)); ok { 1962 return rf(ctx, name, options) 1963 } 1964 if rf, ok := ret.Get(0).(func(context.Context, string, types.PluginInstallOptions) io.ReadCloser); ok { 1965 r0 = rf(ctx, name, options) 1966 } else { 1967 if ret.Get(0) != nil { 1968 r0 = ret.Get(0).(io.ReadCloser) 1969 } 1970 } 1971 1972 if rf, ok := ret.Get(1).(func(context.Context, string, types.PluginInstallOptions) error); ok { 1973 r1 = rf(ctx, name, options) 1974 } else { 1975 r1 = ret.Error(1) 1976 } 1977 1978 return r0, r1 1979 } 1980 1981 // RegistryLogin provides a mock function with given fields: ctx, auth 1982 func (_m *APIClient) RegistryLogin(ctx context.Context, auth types.AuthConfig) (registry.AuthenticateOKBody, error) { 1983 ret := _m.Called(ctx, auth) 1984 1985 var r0 registry.AuthenticateOKBody 1986 var r1 error 1987 if rf, ok := ret.Get(0).(func(context.Context, types.AuthConfig) (registry.AuthenticateOKBody, error)); ok { 1988 return rf(ctx, auth) 1989 } 1990 if rf, ok := ret.Get(0).(func(context.Context, types.AuthConfig) registry.AuthenticateOKBody); ok { 1991 r0 = rf(ctx, auth) 1992 } else { 1993 r0 = ret.Get(0).(registry.AuthenticateOKBody) 1994 } 1995 1996 if rf, ok := ret.Get(1).(func(context.Context, types.AuthConfig) error); ok { 1997 r1 = rf(ctx, auth) 1998 } else { 1999 r1 = ret.Error(1) 2000 } 2001 2002 return r0, r1 2003 } 2004 2005 // SecretCreate provides a mock function with given fields: ctx, secret 2006 func (_m *APIClient) SecretCreate(ctx context.Context, secret swarm.SecretSpec) (types.SecretCreateResponse, error) { 2007 ret := _m.Called(ctx, secret) 2008 2009 var r0 types.SecretCreateResponse 2010 var r1 error 2011 if rf, ok := ret.Get(0).(func(context.Context, swarm.SecretSpec) (types.SecretCreateResponse, error)); ok { 2012 return rf(ctx, secret) 2013 } 2014 if rf, ok := ret.Get(0).(func(context.Context, swarm.SecretSpec) types.SecretCreateResponse); ok { 2015 r0 = rf(ctx, secret) 2016 } else { 2017 r0 = ret.Get(0).(types.SecretCreateResponse) 2018 } 2019 2020 if rf, ok := ret.Get(1).(func(context.Context, swarm.SecretSpec) error); ok { 2021 r1 = rf(ctx, secret) 2022 } else { 2023 r1 = ret.Error(1) 2024 } 2025 2026 return r0, r1 2027 } 2028 2029 // SecretInspectWithRaw provides a mock function with given fields: ctx, name 2030 func (_m *APIClient) SecretInspectWithRaw(ctx context.Context, name string) (swarm.Secret, []byte, error) { 2031 ret := _m.Called(ctx, name) 2032 2033 var r0 swarm.Secret 2034 var r1 []byte 2035 var r2 error 2036 if rf, ok := ret.Get(0).(func(context.Context, string) (swarm.Secret, []byte, error)); ok { 2037 return rf(ctx, name) 2038 } 2039 if rf, ok := ret.Get(0).(func(context.Context, string) swarm.Secret); ok { 2040 r0 = rf(ctx, name) 2041 } else { 2042 r0 = ret.Get(0).(swarm.Secret) 2043 } 2044 2045 if rf, ok := ret.Get(1).(func(context.Context, string) []byte); ok { 2046 r1 = rf(ctx, name) 2047 } else { 2048 if ret.Get(1) != nil { 2049 r1 = ret.Get(1).([]byte) 2050 } 2051 } 2052 2053 if rf, ok := ret.Get(2).(func(context.Context, string) error); ok { 2054 r2 = rf(ctx, name) 2055 } else { 2056 r2 = ret.Error(2) 2057 } 2058 2059 return r0, r1, r2 2060 } 2061 2062 // SecretList provides a mock function with given fields: ctx, options 2063 func (_m *APIClient) SecretList(ctx context.Context, options types.SecretListOptions) ([]swarm.Secret, error) { 2064 ret := _m.Called(ctx, options) 2065 2066 var r0 []swarm.Secret 2067 var r1 error 2068 if rf, ok := ret.Get(0).(func(context.Context, types.SecretListOptions) ([]swarm.Secret, error)); ok { 2069 return rf(ctx, options) 2070 } 2071 if rf, ok := ret.Get(0).(func(context.Context, types.SecretListOptions) []swarm.Secret); ok { 2072 r0 = rf(ctx, options) 2073 } else { 2074 if ret.Get(0) != nil { 2075 r0 = ret.Get(0).([]swarm.Secret) 2076 } 2077 } 2078 2079 if rf, ok := ret.Get(1).(func(context.Context, types.SecretListOptions) error); ok { 2080 r1 = rf(ctx, options) 2081 } else { 2082 r1 = ret.Error(1) 2083 } 2084 2085 return r0, r1 2086 } 2087 2088 // SecretRemove provides a mock function with given fields: ctx, id 2089 func (_m *APIClient) SecretRemove(ctx context.Context, id string) error { 2090 ret := _m.Called(ctx, id) 2091 2092 var r0 error 2093 if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { 2094 r0 = rf(ctx, id) 2095 } else { 2096 r0 = ret.Error(0) 2097 } 2098 2099 return r0 2100 } 2101 2102 // SecretUpdate provides a mock function with given fields: ctx, id, version, secret 2103 func (_m *APIClient) SecretUpdate(ctx context.Context, id string, version swarm.Version, secret swarm.SecretSpec) error { 2104 ret := _m.Called(ctx, id, version, secret) 2105 2106 var r0 error 2107 if rf, ok := ret.Get(0).(func(context.Context, string, swarm.Version, swarm.SecretSpec) error); ok { 2108 r0 = rf(ctx, id, version, secret) 2109 } else { 2110 r0 = ret.Error(0) 2111 } 2112 2113 return r0 2114 } 2115 2116 // ServerVersion provides a mock function with given fields: ctx 2117 func (_m *APIClient) ServerVersion(ctx context.Context) (types.Version, error) { 2118 ret := _m.Called(ctx) 2119 2120 var r0 types.Version 2121 var r1 error 2122 if rf, ok := ret.Get(0).(func(context.Context) (types.Version, error)); ok { 2123 return rf(ctx) 2124 } 2125 if rf, ok := ret.Get(0).(func(context.Context) types.Version); ok { 2126 r0 = rf(ctx) 2127 } else { 2128 r0 = ret.Get(0).(types.Version) 2129 } 2130 2131 if rf, ok := ret.Get(1).(func(context.Context) error); ok { 2132 r1 = rf(ctx) 2133 } else { 2134 r1 = ret.Error(1) 2135 } 2136 2137 return r0, r1 2138 } 2139 2140 // ServiceCreate provides a mock function with given fields: ctx, service, options 2141 func (_m *APIClient) ServiceCreate(ctx context.Context, service swarm.ServiceSpec, options types.ServiceCreateOptions) (types.ServiceCreateResponse, error) { 2142 ret := _m.Called(ctx, service, options) 2143 2144 var r0 types.ServiceCreateResponse 2145 var r1 error 2146 if rf, ok := ret.Get(0).(func(context.Context, swarm.ServiceSpec, types.ServiceCreateOptions) (types.ServiceCreateResponse, error)); ok { 2147 return rf(ctx, service, options) 2148 } 2149 if rf, ok := ret.Get(0).(func(context.Context, swarm.ServiceSpec, types.ServiceCreateOptions) types.ServiceCreateResponse); ok { 2150 r0 = rf(ctx, service, options) 2151 } else { 2152 r0 = ret.Get(0).(types.ServiceCreateResponse) 2153 } 2154 2155 if rf, ok := ret.Get(1).(func(context.Context, swarm.ServiceSpec, types.ServiceCreateOptions) error); ok { 2156 r1 = rf(ctx, service, options) 2157 } else { 2158 r1 = ret.Error(1) 2159 } 2160 2161 return r0, r1 2162 } 2163 2164 // ServiceInspectWithRaw provides a mock function with given fields: ctx, serviceID, options 2165 func (_m *APIClient) ServiceInspectWithRaw(ctx context.Context, serviceID string, options types.ServiceInspectOptions) (swarm.Service, []byte, error) { 2166 ret := _m.Called(ctx, serviceID, options) 2167 2168 var r0 swarm.Service 2169 var r1 []byte 2170 var r2 error 2171 if rf, ok := ret.Get(0).(func(context.Context, string, types.ServiceInspectOptions) (swarm.Service, []byte, error)); ok { 2172 return rf(ctx, serviceID, options) 2173 } 2174 if rf, ok := ret.Get(0).(func(context.Context, string, types.ServiceInspectOptions) swarm.Service); ok { 2175 r0 = rf(ctx, serviceID, options) 2176 } else { 2177 r0 = ret.Get(0).(swarm.Service) 2178 } 2179 2180 if rf, ok := ret.Get(1).(func(context.Context, string, types.ServiceInspectOptions) []byte); ok { 2181 r1 = rf(ctx, serviceID, options) 2182 } else { 2183 if ret.Get(1) != nil { 2184 r1 = ret.Get(1).([]byte) 2185 } 2186 } 2187 2188 if rf, ok := ret.Get(2).(func(context.Context, string, types.ServiceInspectOptions) error); ok { 2189 r2 = rf(ctx, serviceID, options) 2190 } else { 2191 r2 = ret.Error(2) 2192 } 2193 2194 return r0, r1, r2 2195 } 2196 2197 // ServiceList provides a mock function with given fields: ctx, options 2198 func (_m *APIClient) ServiceList(ctx context.Context, options types.ServiceListOptions) ([]swarm.Service, error) { 2199 ret := _m.Called(ctx, options) 2200 2201 var r0 []swarm.Service 2202 var r1 error 2203 if rf, ok := ret.Get(0).(func(context.Context, types.ServiceListOptions) ([]swarm.Service, error)); ok { 2204 return rf(ctx, options) 2205 } 2206 if rf, ok := ret.Get(0).(func(context.Context, types.ServiceListOptions) []swarm.Service); ok { 2207 r0 = rf(ctx, options) 2208 } else { 2209 if ret.Get(0) != nil { 2210 r0 = ret.Get(0).([]swarm.Service) 2211 } 2212 } 2213 2214 if rf, ok := ret.Get(1).(func(context.Context, types.ServiceListOptions) error); ok { 2215 r1 = rf(ctx, options) 2216 } else { 2217 r1 = ret.Error(1) 2218 } 2219 2220 return r0, r1 2221 } 2222 2223 // ServiceLogs provides a mock function with given fields: ctx, serviceID, options 2224 func (_m *APIClient) ServiceLogs(ctx context.Context, serviceID string, options types.ContainerLogsOptions) (io.ReadCloser, error) { 2225 ret := _m.Called(ctx, serviceID, options) 2226 2227 var r0 io.ReadCloser 2228 var r1 error 2229 if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerLogsOptions) (io.ReadCloser, error)); ok { 2230 return rf(ctx, serviceID, options) 2231 } 2232 if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerLogsOptions) io.ReadCloser); ok { 2233 r0 = rf(ctx, serviceID, options) 2234 } else { 2235 if ret.Get(0) != nil { 2236 r0 = ret.Get(0).(io.ReadCloser) 2237 } 2238 } 2239 2240 if rf, ok := ret.Get(1).(func(context.Context, string, types.ContainerLogsOptions) error); ok { 2241 r1 = rf(ctx, serviceID, options) 2242 } else { 2243 r1 = ret.Error(1) 2244 } 2245 2246 return r0, r1 2247 } 2248 2249 // ServiceRemove provides a mock function with given fields: ctx, serviceID 2250 func (_m *APIClient) ServiceRemove(ctx context.Context, serviceID string) error { 2251 ret := _m.Called(ctx, serviceID) 2252 2253 var r0 error 2254 if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { 2255 r0 = rf(ctx, serviceID) 2256 } else { 2257 r0 = ret.Error(0) 2258 } 2259 2260 return r0 2261 } 2262 2263 // ServiceUpdate provides a mock function with given fields: ctx, serviceID, version, service, options 2264 func (_m *APIClient) ServiceUpdate(ctx context.Context, serviceID string, version swarm.Version, service swarm.ServiceSpec, options types.ServiceUpdateOptions) (types.ServiceUpdateResponse, error) { 2265 ret := _m.Called(ctx, serviceID, version, service, options) 2266 2267 var r0 types.ServiceUpdateResponse 2268 var r1 error 2269 if rf, ok := ret.Get(0).(func(context.Context, string, swarm.Version, swarm.ServiceSpec, types.ServiceUpdateOptions) (types.ServiceUpdateResponse, error)); ok { 2270 return rf(ctx, serviceID, version, service, options) 2271 } 2272 if rf, ok := ret.Get(0).(func(context.Context, string, swarm.Version, swarm.ServiceSpec, types.ServiceUpdateOptions) types.ServiceUpdateResponse); ok { 2273 r0 = rf(ctx, serviceID, version, service, options) 2274 } else { 2275 r0 = ret.Get(0).(types.ServiceUpdateResponse) 2276 } 2277 2278 if rf, ok := ret.Get(1).(func(context.Context, string, swarm.Version, swarm.ServiceSpec, types.ServiceUpdateOptions) error); ok { 2279 r1 = rf(ctx, serviceID, version, service, options) 2280 } else { 2281 r1 = ret.Error(1) 2282 } 2283 2284 return r0, r1 2285 } 2286 2287 // SwarmGetUnlockKey provides a mock function with given fields: ctx 2288 func (_m *APIClient) SwarmGetUnlockKey(ctx context.Context) (types.SwarmUnlockKeyResponse, error) { 2289 ret := _m.Called(ctx) 2290 2291 var r0 types.SwarmUnlockKeyResponse 2292 var r1 error 2293 if rf, ok := ret.Get(0).(func(context.Context) (types.SwarmUnlockKeyResponse, error)); ok { 2294 return rf(ctx) 2295 } 2296 if rf, ok := ret.Get(0).(func(context.Context) types.SwarmUnlockKeyResponse); ok { 2297 r0 = rf(ctx) 2298 } else { 2299 r0 = ret.Get(0).(types.SwarmUnlockKeyResponse) 2300 } 2301 2302 if rf, ok := ret.Get(1).(func(context.Context) error); ok { 2303 r1 = rf(ctx) 2304 } else { 2305 r1 = ret.Error(1) 2306 } 2307 2308 return r0, r1 2309 } 2310 2311 // SwarmInit provides a mock function with given fields: ctx, req 2312 func (_m *APIClient) SwarmInit(ctx context.Context, req swarm.InitRequest) (string, error) { 2313 ret := _m.Called(ctx, req) 2314 2315 var r0 string 2316 var r1 error 2317 if rf, ok := ret.Get(0).(func(context.Context, swarm.InitRequest) (string, error)); ok { 2318 return rf(ctx, req) 2319 } 2320 if rf, ok := ret.Get(0).(func(context.Context, swarm.InitRequest) string); ok { 2321 r0 = rf(ctx, req) 2322 } else { 2323 r0 = ret.Get(0).(string) 2324 } 2325 2326 if rf, ok := ret.Get(1).(func(context.Context, swarm.InitRequest) error); ok { 2327 r1 = rf(ctx, req) 2328 } else { 2329 r1 = ret.Error(1) 2330 } 2331 2332 return r0, r1 2333 } 2334 2335 // SwarmInspect provides a mock function with given fields: ctx 2336 func (_m *APIClient) SwarmInspect(ctx context.Context) (swarm.Swarm, error) { 2337 ret := _m.Called(ctx) 2338 2339 var r0 swarm.Swarm 2340 var r1 error 2341 if rf, ok := ret.Get(0).(func(context.Context) (swarm.Swarm, error)); ok { 2342 return rf(ctx) 2343 } 2344 if rf, ok := ret.Get(0).(func(context.Context) swarm.Swarm); ok { 2345 r0 = rf(ctx) 2346 } else { 2347 r0 = ret.Get(0).(swarm.Swarm) 2348 } 2349 2350 if rf, ok := ret.Get(1).(func(context.Context) error); ok { 2351 r1 = rf(ctx) 2352 } else { 2353 r1 = ret.Error(1) 2354 } 2355 2356 return r0, r1 2357 } 2358 2359 // SwarmJoin provides a mock function with given fields: ctx, req 2360 func (_m *APIClient) SwarmJoin(ctx context.Context, req swarm.JoinRequest) error { 2361 ret := _m.Called(ctx, req) 2362 2363 var r0 error 2364 if rf, ok := ret.Get(0).(func(context.Context, swarm.JoinRequest) error); ok { 2365 r0 = rf(ctx, req) 2366 } else { 2367 r0 = ret.Error(0) 2368 } 2369 2370 return r0 2371 } 2372 2373 // SwarmLeave provides a mock function with given fields: ctx, force 2374 func (_m *APIClient) SwarmLeave(ctx context.Context, force bool) error { 2375 ret := _m.Called(ctx, force) 2376 2377 var r0 error 2378 if rf, ok := ret.Get(0).(func(context.Context, bool) error); ok { 2379 r0 = rf(ctx, force) 2380 } else { 2381 r0 = ret.Error(0) 2382 } 2383 2384 return r0 2385 } 2386 2387 // SwarmUnlock provides a mock function with given fields: ctx, req 2388 func (_m *APIClient) SwarmUnlock(ctx context.Context, req swarm.UnlockRequest) error { 2389 ret := _m.Called(ctx, req) 2390 2391 var r0 error 2392 if rf, ok := ret.Get(0).(func(context.Context, swarm.UnlockRequest) error); ok { 2393 r0 = rf(ctx, req) 2394 } else { 2395 r0 = ret.Error(0) 2396 } 2397 2398 return r0 2399 } 2400 2401 // SwarmUpdate provides a mock function with given fields: ctx, version, _a2, flags 2402 func (_m *APIClient) SwarmUpdate(ctx context.Context, version swarm.Version, _a2 swarm.Spec, flags swarm.UpdateFlags) error { 2403 ret := _m.Called(ctx, version, _a2, flags) 2404 2405 var r0 error 2406 if rf, ok := ret.Get(0).(func(context.Context, swarm.Version, swarm.Spec, swarm.UpdateFlags) error); ok { 2407 r0 = rf(ctx, version, _a2, flags) 2408 } else { 2409 r0 = ret.Error(0) 2410 } 2411 2412 return r0 2413 } 2414 2415 // TaskInspectWithRaw provides a mock function with given fields: ctx, taskID 2416 func (_m *APIClient) TaskInspectWithRaw(ctx context.Context, taskID string) (swarm.Task, []byte, error) { 2417 ret := _m.Called(ctx, taskID) 2418 2419 var r0 swarm.Task 2420 var r1 []byte 2421 var r2 error 2422 if rf, ok := ret.Get(0).(func(context.Context, string) (swarm.Task, []byte, error)); ok { 2423 return rf(ctx, taskID) 2424 } 2425 if rf, ok := ret.Get(0).(func(context.Context, string) swarm.Task); ok { 2426 r0 = rf(ctx, taskID) 2427 } else { 2428 r0 = ret.Get(0).(swarm.Task) 2429 } 2430 2431 if rf, ok := ret.Get(1).(func(context.Context, string) []byte); ok { 2432 r1 = rf(ctx, taskID) 2433 } else { 2434 if ret.Get(1) != nil { 2435 r1 = ret.Get(1).([]byte) 2436 } 2437 } 2438 2439 if rf, ok := ret.Get(2).(func(context.Context, string) error); ok { 2440 r2 = rf(ctx, taskID) 2441 } else { 2442 r2 = ret.Error(2) 2443 } 2444 2445 return r0, r1, r2 2446 } 2447 2448 // TaskList provides a mock function with given fields: ctx, options 2449 func (_m *APIClient) TaskList(ctx context.Context, options types.TaskListOptions) ([]swarm.Task, error) { 2450 ret := _m.Called(ctx, options) 2451 2452 var r0 []swarm.Task 2453 var r1 error 2454 if rf, ok := ret.Get(0).(func(context.Context, types.TaskListOptions) ([]swarm.Task, error)); ok { 2455 return rf(ctx, options) 2456 } 2457 if rf, ok := ret.Get(0).(func(context.Context, types.TaskListOptions) []swarm.Task); ok { 2458 r0 = rf(ctx, options) 2459 } else { 2460 if ret.Get(0) != nil { 2461 r0 = ret.Get(0).([]swarm.Task) 2462 } 2463 } 2464 2465 if rf, ok := ret.Get(1).(func(context.Context, types.TaskListOptions) error); ok { 2466 r1 = rf(ctx, options) 2467 } else { 2468 r1 = ret.Error(1) 2469 } 2470 2471 return r0, r1 2472 } 2473 2474 // TaskLogs provides a mock function with given fields: ctx, taskID, options 2475 func (_m *APIClient) TaskLogs(ctx context.Context, taskID string, options types.ContainerLogsOptions) (io.ReadCloser, error) { 2476 ret := _m.Called(ctx, taskID, options) 2477 2478 var r0 io.ReadCloser 2479 var r1 error 2480 if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerLogsOptions) (io.ReadCloser, error)); ok { 2481 return rf(ctx, taskID, options) 2482 } 2483 if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerLogsOptions) io.ReadCloser); ok { 2484 r0 = rf(ctx, taskID, options) 2485 } else { 2486 if ret.Get(0) != nil { 2487 r0 = ret.Get(0).(io.ReadCloser) 2488 } 2489 } 2490 2491 if rf, ok := ret.Get(1).(func(context.Context, string, types.ContainerLogsOptions) error); ok { 2492 r1 = rf(ctx, taskID, options) 2493 } else { 2494 r1 = ret.Error(1) 2495 } 2496 2497 return r0, r1 2498 } 2499 2500 // VolumeCreate provides a mock function with given fields: ctx, options 2501 func (_m *APIClient) VolumeCreate(ctx context.Context, options volume.CreateOptions) (volume.Volume, error) { 2502 ret := _m.Called(ctx, options) 2503 2504 var r0 volume.Volume 2505 var r1 error 2506 if rf, ok := ret.Get(0).(func(context.Context, volume.CreateOptions) (volume.Volume, error)); ok { 2507 return rf(ctx, options) 2508 } 2509 if rf, ok := ret.Get(0).(func(context.Context, volume.CreateOptions) volume.Volume); ok { 2510 r0 = rf(ctx, options) 2511 } else { 2512 r0 = ret.Get(0).(volume.Volume) 2513 } 2514 2515 if rf, ok := ret.Get(1).(func(context.Context, volume.CreateOptions) error); ok { 2516 r1 = rf(ctx, options) 2517 } else { 2518 r1 = ret.Error(1) 2519 } 2520 2521 return r0, r1 2522 } 2523 2524 // VolumeInspect provides a mock function with given fields: ctx, volumeID 2525 func (_m *APIClient) VolumeInspect(ctx context.Context, volumeID string) (volume.Volume, error) { 2526 ret := _m.Called(ctx, volumeID) 2527 2528 var r0 volume.Volume 2529 var r1 error 2530 if rf, ok := ret.Get(0).(func(context.Context, string) (volume.Volume, error)); ok { 2531 return rf(ctx, volumeID) 2532 } 2533 if rf, ok := ret.Get(0).(func(context.Context, string) volume.Volume); ok { 2534 r0 = rf(ctx, volumeID) 2535 } else { 2536 r0 = ret.Get(0).(volume.Volume) 2537 } 2538 2539 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 2540 r1 = rf(ctx, volumeID) 2541 } else { 2542 r1 = ret.Error(1) 2543 } 2544 2545 return r0, r1 2546 } 2547 2548 // VolumeInspectWithRaw provides a mock function with given fields: ctx, volumeID 2549 func (_m *APIClient) VolumeInspectWithRaw(ctx context.Context, volumeID string) (volume.Volume, []byte, error) { 2550 ret := _m.Called(ctx, volumeID) 2551 2552 var r0 volume.Volume 2553 var r1 []byte 2554 var r2 error 2555 if rf, ok := ret.Get(0).(func(context.Context, string) (volume.Volume, []byte, error)); ok { 2556 return rf(ctx, volumeID) 2557 } 2558 if rf, ok := ret.Get(0).(func(context.Context, string) volume.Volume); ok { 2559 r0 = rf(ctx, volumeID) 2560 } else { 2561 r0 = ret.Get(0).(volume.Volume) 2562 } 2563 2564 if rf, ok := ret.Get(1).(func(context.Context, string) []byte); ok { 2565 r1 = rf(ctx, volumeID) 2566 } else { 2567 if ret.Get(1) != nil { 2568 r1 = ret.Get(1).([]byte) 2569 } 2570 } 2571 2572 if rf, ok := ret.Get(2).(func(context.Context, string) error); ok { 2573 r2 = rf(ctx, volumeID) 2574 } else { 2575 r2 = ret.Error(2) 2576 } 2577 2578 return r0, r1, r2 2579 } 2580 2581 // VolumeList provides a mock function with given fields: ctx, filter 2582 func (_m *APIClient) VolumeList(ctx context.Context, filter filters.Args) (volume.ListResponse, error) { 2583 ret := _m.Called(ctx, filter) 2584 2585 var r0 volume.ListResponse 2586 var r1 error 2587 if rf, ok := ret.Get(0).(func(context.Context, filters.Args) (volume.ListResponse, error)); ok { 2588 return rf(ctx, filter) 2589 } 2590 if rf, ok := ret.Get(0).(func(context.Context, filters.Args) volume.ListResponse); ok { 2591 r0 = rf(ctx, filter) 2592 } else { 2593 r0 = ret.Get(0).(volume.ListResponse) 2594 } 2595 2596 if rf, ok := ret.Get(1).(func(context.Context, filters.Args) error); ok { 2597 r1 = rf(ctx, filter) 2598 } else { 2599 r1 = ret.Error(1) 2600 } 2601 2602 return r0, r1 2603 } 2604 2605 // VolumeRemove provides a mock function with given fields: ctx, volumeID, force 2606 func (_m *APIClient) VolumeRemove(ctx context.Context, volumeID string, force bool) error { 2607 ret := _m.Called(ctx, volumeID, force) 2608 2609 var r0 error 2610 if rf, ok := ret.Get(0).(func(context.Context, string, bool) error); ok { 2611 r0 = rf(ctx, volumeID, force) 2612 } else { 2613 r0 = ret.Error(0) 2614 } 2615 2616 return r0 2617 } 2618 2619 // VolumeUpdate provides a mock function with given fields: ctx, volumeID, version, options 2620 func (_m *APIClient) VolumeUpdate(ctx context.Context, volumeID string, version swarm.Version, options volume.UpdateOptions) error { 2621 ret := _m.Called(ctx, volumeID, version, options) 2622 2623 var r0 error 2624 if rf, ok := ret.Get(0).(func(context.Context, string, swarm.Version, volume.UpdateOptions) error); ok { 2625 r0 = rf(ctx, volumeID, version, options) 2626 } else { 2627 r0 = ret.Error(0) 2628 } 2629 2630 return r0 2631 } 2632 2633 // VolumesPrune provides a mock function with given fields: ctx, pruneFilter 2634 func (_m *APIClient) VolumesPrune(ctx context.Context, pruneFilter filters.Args) (types.VolumesPruneReport, error) { 2635 ret := _m.Called(ctx, pruneFilter) 2636 2637 var r0 types.VolumesPruneReport 2638 var r1 error 2639 if rf, ok := ret.Get(0).(func(context.Context, filters.Args) (types.VolumesPruneReport, error)); ok { 2640 return rf(ctx, pruneFilter) 2641 } 2642 if rf, ok := ret.Get(0).(func(context.Context, filters.Args) types.VolumesPruneReport); ok { 2643 r0 = rf(ctx, pruneFilter) 2644 } else { 2645 r0 = ret.Get(0).(types.VolumesPruneReport) 2646 } 2647 2648 if rf, ok := ret.Get(1).(func(context.Context, filters.Args) error); ok { 2649 r1 = rf(ctx, pruneFilter) 2650 } else { 2651 r1 = ret.Error(1) 2652 } 2653 2654 return r0, r1 2655 } 2656 2657 // NewAPIClient creates a new instance of APIClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 2658 // The first argument is typically a *testing.T value. 2659 func NewAPIClient(t interface { 2660 mock.TestingT 2661 Cleanup(func()) 2662 }) *APIClient { 2663 mock := &APIClient{} 2664 mock.Mock.Test(t) 2665 2666 t.Cleanup(func() { mock.AssertExpectations(t) }) 2667 2668 return mock 2669 }