github.com/mook-as/cf-cli@v7.0.0-beta.28.0.20200120190804-b91c115fae48+incompatible/cf/api/apifakes/fake_service_repository.go (about) 1 // Code generated by counterfeiter. DO NOT EDIT. 2 package apifakes 3 4 import ( 5 "sync" 6 7 "code.cloudfoundry.org/cli/cf/api" 8 "code.cloudfoundry.org/cli/cf/api/resources" 9 "code.cloudfoundry.org/cli/cf/models" 10 ) 11 12 type FakeServiceRepository struct { 13 CreateServiceInstanceStub func(string, string, map[string]interface{}, []string) error 14 createServiceInstanceMutex sync.RWMutex 15 createServiceInstanceArgsForCall []struct { 16 arg1 string 17 arg2 string 18 arg3 map[string]interface{} 19 arg4 []string 20 } 21 createServiceInstanceReturns struct { 22 result1 error 23 } 24 createServiceInstanceReturnsOnCall map[int]struct { 25 result1 error 26 } 27 DeleteServiceStub func(models.ServiceInstance) error 28 deleteServiceMutex sync.RWMutex 29 deleteServiceArgsForCall []struct { 30 arg1 models.ServiceInstance 31 } 32 deleteServiceReturns struct { 33 result1 error 34 } 35 deleteServiceReturnsOnCall map[int]struct { 36 result1 error 37 } 38 FindInstanceByNameStub func(string) (models.ServiceInstance, error) 39 findInstanceByNameMutex sync.RWMutex 40 findInstanceByNameArgsForCall []struct { 41 arg1 string 42 } 43 findInstanceByNameReturns struct { 44 result1 models.ServiceInstance 45 result2 error 46 } 47 findInstanceByNameReturnsOnCall map[int]struct { 48 result1 models.ServiceInstance 49 result2 error 50 } 51 FindServiceOfferingByLabelAndProviderStub func(string, string) (models.ServiceOffering, error) 52 findServiceOfferingByLabelAndProviderMutex sync.RWMutex 53 findServiceOfferingByLabelAndProviderArgsForCall []struct { 54 arg1 string 55 arg2 string 56 } 57 findServiceOfferingByLabelAndProviderReturns struct { 58 result1 models.ServiceOffering 59 result2 error 60 } 61 findServiceOfferingByLabelAndProviderReturnsOnCall map[int]struct { 62 result1 models.ServiceOffering 63 result2 error 64 } 65 FindServiceOfferingsByLabelStub func(string) (models.ServiceOfferings, error) 66 findServiceOfferingsByLabelMutex sync.RWMutex 67 findServiceOfferingsByLabelArgsForCall []struct { 68 arg1 string 69 } 70 findServiceOfferingsByLabelReturns struct { 71 result1 models.ServiceOfferings 72 result2 error 73 } 74 findServiceOfferingsByLabelReturnsOnCall map[int]struct { 75 result1 models.ServiceOfferings 76 result2 error 77 } 78 FindServiceOfferingsForSpaceByLabelStub func(string, string) (models.ServiceOfferings, error) 79 findServiceOfferingsForSpaceByLabelMutex sync.RWMutex 80 findServiceOfferingsForSpaceByLabelArgsForCall []struct { 81 arg1 string 82 arg2 string 83 } 84 findServiceOfferingsForSpaceByLabelReturns struct { 85 result1 models.ServiceOfferings 86 result2 error 87 } 88 findServiceOfferingsForSpaceByLabelReturnsOnCall map[int]struct { 89 result1 models.ServiceOfferings 90 result2 error 91 } 92 FindServicePlanByDescriptionStub func(resources.ServicePlanDescription) (string, error) 93 findServicePlanByDescriptionMutex sync.RWMutex 94 findServicePlanByDescriptionArgsForCall []struct { 95 arg1 resources.ServicePlanDescription 96 } 97 findServicePlanByDescriptionReturns struct { 98 result1 string 99 result2 error 100 } 101 findServicePlanByDescriptionReturnsOnCall map[int]struct { 102 result1 string 103 result2 error 104 } 105 GetAllServiceOfferingsStub func() (models.ServiceOfferings, error) 106 getAllServiceOfferingsMutex sync.RWMutex 107 getAllServiceOfferingsArgsForCall []struct { 108 } 109 getAllServiceOfferingsReturns struct { 110 result1 models.ServiceOfferings 111 result2 error 112 } 113 getAllServiceOfferingsReturnsOnCall map[int]struct { 114 result1 models.ServiceOfferings 115 result2 error 116 } 117 GetServiceInstanceCountForServicePlanStub func(string) (int, error) 118 getServiceInstanceCountForServicePlanMutex sync.RWMutex 119 getServiceInstanceCountForServicePlanArgsForCall []struct { 120 arg1 string 121 } 122 getServiceInstanceCountForServicePlanReturns struct { 123 result1 int 124 result2 error 125 } 126 getServiceInstanceCountForServicePlanReturnsOnCall map[int]struct { 127 result1 int 128 result2 error 129 } 130 GetServiceOfferingByGUIDStub func(string) (models.ServiceOffering, error) 131 getServiceOfferingByGUIDMutex sync.RWMutex 132 getServiceOfferingByGUIDArgsForCall []struct { 133 arg1 string 134 } 135 getServiceOfferingByGUIDReturns struct { 136 result1 models.ServiceOffering 137 result2 error 138 } 139 getServiceOfferingByGUIDReturnsOnCall map[int]struct { 140 result1 models.ServiceOffering 141 result2 error 142 } 143 GetServiceOfferingsForSpaceStub func(string) (models.ServiceOfferings, error) 144 getServiceOfferingsForSpaceMutex sync.RWMutex 145 getServiceOfferingsForSpaceArgsForCall []struct { 146 arg1 string 147 } 148 getServiceOfferingsForSpaceReturns struct { 149 result1 models.ServiceOfferings 150 result2 error 151 } 152 getServiceOfferingsForSpaceReturnsOnCall map[int]struct { 153 result1 models.ServiceOfferings 154 result2 error 155 } 156 ListServicesFromBrokerStub func(string) ([]models.ServiceOffering, error) 157 listServicesFromBrokerMutex sync.RWMutex 158 listServicesFromBrokerArgsForCall []struct { 159 arg1 string 160 } 161 listServicesFromBrokerReturns struct { 162 result1 []models.ServiceOffering 163 result2 error 164 } 165 listServicesFromBrokerReturnsOnCall map[int]struct { 166 result1 []models.ServiceOffering 167 result2 error 168 } 169 ListServicesFromManyBrokersStub func([]string) ([]models.ServiceOffering, error) 170 listServicesFromManyBrokersMutex sync.RWMutex 171 listServicesFromManyBrokersArgsForCall []struct { 172 arg1 []string 173 } 174 listServicesFromManyBrokersReturns struct { 175 result1 []models.ServiceOffering 176 result2 error 177 } 178 listServicesFromManyBrokersReturnsOnCall map[int]struct { 179 result1 []models.ServiceOffering 180 result2 error 181 } 182 MigrateServicePlanFromV1ToV2Stub func(string, string) (int, error) 183 migrateServicePlanFromV1ToV2Mutex sync.RWMutex 184 migrateServicePlanFromV1ToV2ArgsForCall []struct { 185 arg1 string 186 arg2 string 187 } 188 migrateServicePlanFromV1ToV2Returns struct { 189 result1 int 190 result2 error 191 } 192 migrateServicePlanFromV1ToV2ReturnsOnCall map[int]struct { 193 result1 int 194 result2 error 195 } 196 PurgeServiceInstanceStub func(models.ServiceInstance) error 197 purgeServiceInstanceMutex sync.RWMutex 198 purgeServiceInstanceArgsForCall []struct { 199 arg1 models.ServiceInstance 200 } 201 purgeServiceInstanceReturns struct { 202 result1 error 203 } 204 purgeServiceInstanceReturnsOnCall map[int]struct { 205 result1 error 206 } 207 PurgeServiceOfferingStub func(models.ServiceOffering) error 208 purgeServiceOfferingMutex sync.RWMutex 209 purgeServiceOfferingArgsForCall []struct { 210 arg1 models.ServiceOffering 211 } 212 purgeServiceOfferingReturns struct { 213 result1 error 214 } 215 purgeServiceOfferingReturnsOnCall map[int]struct { 216 result1 error 217 } 218 RenameServiceStub func(models.ServiceInstance, string) error 219 renameServiceMutex sync.RWMutex 220 renameServiceArgsForCall []struct { 221 arg1 models.ServiceInstance 222 arg2 string 223 } 224 renameServiceReturns struct { 225 result1 error 226 } 227 renameServiceReturnsOnCall map[int]struct { 228 result1 error 229 } 230 UpdateServiceInstanceStub func(string, string, map[string]interface{}, []string) error 231 updateServiceInstanceMutex sync.RWMutex 232 updateServiceInstanceArgsForCall []struct { 233 arg1 string 234 arg2 string 235 arg3 map[string]interface{} 236 arg4 []string 237 } 238 updateServiceInstanceReturns struct { 239 result1 error 240 } 241 updateServiceInstanceReturnsOnCall map[int]struct { 242 result1 error 243 } 244 invocations map[string][][]interface{} 245 invocationsMutex sync.RWMutex 246 } 247 248 func (fake *FakeServiceRepository) CreateServiceInstance(arg1 string, arg2 string, arg3 map[string]interface{}, arg4 []string) error { 249 var arg4Copy []string 250 if arg4 != nil { 251 arg4Copy = make([]string, len(arg4)) 252 copy(arg4Copy, arg4) 253 } 254 fake.createServiceInstanceMutex.Lock() 255 ret, specificReturn := fake.createServiceInstanceReturnsOnCall[len(fake.createServiceInstanceArgsForCall)] 256 fake.createServiceInstanceArgsForCall = append(fake.createServiceInstanceArgsForCall, struct { 257 arg1 string 258 arg2 string 259 arg3 map[string]interface{} 260 arg4 []string 261 }{arg1, arg2, arg3, arg4Copy}) 262 fake.recordInvocation("CreateServiceInstance", []interface{}{arg1, arg2, arg3, arg4Copy}) 263 fake.createServiceInstanceMutex.Unlock() 264 if fake.CreateServiceInstanceStub != nil { 265 return fake.CreateServiceInstanceStub(arg1, arg2, arg3, arg4) 266 } 267 if specificReturn { 268 return ret.result1 269 } 270 fakeReturns := fake.createServiceInstanceReturns 271 return fakeReturns.result1 272 } 273 274 func (fake *FakeServiceRepository) CreateServiceInstanceCallCount() int { 275 fake.createServiceInstanceMutex.RLock() 276 defer fake.createServiceInstanceMutex.RUnlock() 277 return len(fake.createServiceInstanceArgsForCall) 278 } 279 280 func (fake *FakeServiceRepository) CreateServiceInstanceCalls(stub func(string, string, map[string]interface{}, []string) error) { 281 fake.createServiceInstanceMutex.Lock() 282 defer fake.createServiceInstanceMutex.Unlock() 283 fake.CreateServiceInstanceStub = stub 284 } 285 286 func (fake *FakeServiceRepository) CreateServiceInstanceArgsForCall(i int) (string, string, map[string]interface{}, []string) { 287 fake.createServiceInstanceMutex.RLock() 288 defer fake.createServiceInstanceMutex.RUnlock() 289 argsForCall := fake.createServiceInstanceArgsForCall[i] 290 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4 291 } 292 293 func (fake *FakeServiceRepository) CreateServiceInstanceReturns(result1 error) { 294 fake.createServiceInstanceMutex.Lock() 295 defer fake.createServiceInstanceMutex.Unlock() 296 fake.CreateServiceInstanceStub = nil 297 fake.createServiceInstanceReturns = struct { 298 result1 error 299 }{result1} 300 } 301 302 func (fake *FakeServiceRepository) CreateServiceInstanceReturnsOnCall(i int, result1 error) { 303 fake.createServiceInstanceMutex.Lock() 304 defer fake.createServiceInstanceMutex.Unlock() 305 fake.CreateServiceInstanceStub = nil 306 if fake.createServiceInstanceReturnsOnCall == nil { 307 fake.createServiceInstanceReturnsOnCall = make(map[int]struct { 308 result1 error 309 }) 310 } 311 fake.createServiceInstanceReturnsOnCall[i] = struct { 312 result1 error 313 }{result1} 314 } 315 316 func (fake *FakeServiceRepository) DeleteService(arg1 models.ServiceInstance) error { 317 fake.deleteServiceMutex.Lock() 318 ret, specificReturn := fake.deleteServiceReturnsOnCall[len(fake.deleteServiceArgsForCall)] 319 fake.deleteServiceArgsForCall = append(fake.deleteServiceArgsForCall, struct { 320 arg1 models.ServiceInstance 321 }{arg1}) 322 fake.recordInvocation("DeleteService", []interface{}{arg1}) 323 fake.deleteServiceMutex.Unlock() 324 if fake.DeleteServiceStub != nil { 325 return fake.DeleteServiceStub(arg1) 326 } 327 if specificReturn { 328 return ret.result1 329 } 330 fakeReturns := fake.deleteServiceReturns 331 return fakeReturns.result1 332 } 333 334 func (fake *FakeServiceRepository) DeleteServiceCallCount() int { 335 fake.deleteServiceMutex.RLock() 336 defer fake.deleteServiceMutex.RUnlock() 337 return len(fake.deleteServiceArgsForCall) 338 } 339 340 func (fake *FakeServiceRepository) DeleteServiceCalls(stub func(models.ServiceInstance) error) { 341 fake.deleteServiceMutex.Lock() 342 defer fake.deleteServiceMutex.Unlock() 343 fake.DeleteServiceStub = stub 344 } 345 346 func (fake *FakeServiceRepository) DeleteServiceArgsForCall(i int) models.ServiceInstance { 347 fake.deleteServiceMutex.RLock() 348 defer fake.deleteServiceMutex.RUnlock() 349 argsForCall := fake.deleteServiceArgsForCall[i] 350 return argsForCall.arg1 351 } 352 353 func (fake *FakeServiceRepository) DeleteServiceReturns(result1 error) { 354 fake.deleteServiceMutex.Lock() 355 defer fake.deleteServiceMutex.Unlock() 356 fake.DeleteServiceStub = nil 357 fake.deleteServiceReturns = struct { 358 result1 error 359 }{result1} 360 } 361 362 func (fake *FakeServiceRepository) DeleteServiceReturnsOnCall(i int, result1 error) { 363 fake.deleteServiceMutex.Lock() 364 defer fake.deleteServiceMutex.Unlock() 365 fake.DeleteServiceStub = nil 366 if fake.deleteServiceReturnsOnCall == nil { 367 fake.deleteServiceReturnsOnCall = make(map[int]struct { 368 result1 error 369 }) 370 } 371 fake.deleteServiceReturnsOnCall[i] = struct { 372 result1 error 373 }{result1} 374 } 375 376 func (fake *FakeServiceRepository) FindInstanceByName(arg1 string) (models.ServiceInstance, error) { 377 fake.findInstanceByNameMutex.Lock() 378 ret, specificReturn := fake.findInstanceByNameReturnsOnCall[len(fake.findInstanceByNameArgsForCall)] 379 fake.findInstanceByNameArgsForCall = append(fake.findInstanceByNameArgsForCall, struct { 380 arg1 string 381 }{arg1}) 382 fake.recordInvocation("FindInstanceByName", []interface{}{arg1}) 383 fake.findInstanceByNameMutex.Unlock() 384 if fake.FindInstanceByNameStub != nil { 385 return fake.FindInstanceByNameStub(arg1) 386 } 387 if specificReturn { 388 return ret.result1, ret.result2 389 } 390 fakeReturns := fake.findInstanceByNameReturns 391 return fakeReturns.result1, fakeReturns.result2 392 } 393 394 func (fake *FakeServiceRepository) FindInstanceByNameCallCount() int { 395 fake.findInstanceByNameMutex.RLock() 396 defer fake.findInstanceByNameMutex.RUnlock() 397 return len(fake.findInstanceByNameArgsForCall) 398 } 399 400 func (fake *FakeServiceRepository) FindInstanceByNameCalls(stub func(string) (models.ServiceInstance, error)) { 401 fake.findInstanceByNameMutex.Lock() 402 defer fake.findInstanceByNameMutex.Unlock() 403 fake.FindInstanceByNameStub = stub 404 } 405 406 func (fake *FakeServiceRepository) FindInstanceByNameArgsForCall(i int) string { 407 fake.findInstanceByNameMutex.RLock() 408 defer fake.findInstanceByNameMutex.RUnlock() 409 argsForCall := fake.findInstanceByNameArgsForCall[i] 410 return argsForCall.arg1 411 } 412 413 func (fake *FakeServiceRepository) FindInstanceByNameReturns(result1 models.ServiceInstance, result2 error) { 414 fake.findInstanceByNameMutex.Lock() 415 defer fake.findInstanceByNameMutex.Unlock() 416 fake.FindInstanceByNameStub = nil 417 fake.findInstanceByNameReturns = struct { 418 result1 models.ServiceInstance 419 result2 error 420 }{result1, result2} 421 } 422 423 func (fake *FakeServiceRepository) FindInstanceByNameReturnsOnCall(i int, result1 models.ServiceInstance, result2 error) { 424 fake.findInstanceByNameMutex.Lock() 425 defer fake.findInstanceByNameMutex.Unlock() 426 fake.FindInstanceByNameStub = nil 427 if fake.findInstanceByNameReturnsOnCall == nil { 428 fake.findInstanceByNameReturnsOnCall = make(map[int]struct { 429 result1 models.ServiceInstance 430 result2 error 431 }) 432 } 433 fake.findInstanceByNameReturnsOnCall[i] = struct { 434 result1 models.ServiceInstance 435 result2 error 436 }{result1, result2} 437 } 438 439 func (fake *FakeServiceRepository) FindServiceOfferingByLabelAndProvider(arg1 string, arg2 string) (models.ServiceOffering, error) { 440 fake.findServiceOfferingByLabelAndProviderMutex.Lock() 441 ret, specificReturn := fake.findServiceOfferingByLabelAndProviderReturnsOnCall[len(fake.findServiceOfferingByLabelAndProviderArgsForCall)] 442 fake.findServiceOfferingByLabelAndProviderArgsForCall = append(fake.findServiceOfferingByLabelAndProviderArgsForCall, struct { 443 arg1 string 444 arg2 string 445 }{arg1, arg2}) 446 fake.recordInvocation("FindServiceOfferingByLabelAndProvider", []interface{}{arg1, arg2}) 447 fake.findServiceOfferingByLabelAndProviderMutex.Unlock() 448 if fake.FindServiceOfferingByLabelAndProviderStub != nil { 449 return fake.FindServiceOfferingByLabelAndProviderStub(arg1, arg2) 450 } 451 if specificReturn { 452 return ret.result1, ret.result2 453 } 454 fakeReturns := fake.findServiceOfferingByLabelAndProviderReturns 455 return fakeReturns.result1, fakeReturns.result2 456 } 457 458 func (fake *FakeServiceRepository) FindServiceOfferingByLabelAndProviderCallCount() int { 459 fake.findServiceOfferingByLabelAndProviderMutex.RLock() 460 defer fake.findServiceOfferingByLabelAndProviderMutex.RUnlock() 461 return len(fake.findServiceOfferingByLabelAndProviderArgsForCall) 462 } 463 464 func (fake *FakeServiceRepository) FindServiceOfferingByLabelAndProviderCalls(stub func(string, string) (models.ServiceOffering, error)) { 465 fake.findServiceOfferingByLabelAndProviderMutex.Lock() 466 defer fake.findServiceOfferingByLabelAndProviderMutex.Unlock() 467 fake.FindServiceOfferingByLabelAndProviderStub = stub 468 } 469 470 func (fake *FakeServiceRepository) FindServiceOfferingByLabelAndProviderArgsForCall(i int) (string, string) { 471 fake.findServiceOfferingByLabelAndProviderMutex.RLock() 472 defer fake.findServiceOfferingByLabelAndProviderMutex.RUnlock() 473 argsForCall := fake.findServiceOfferingByLabelAndProviderArgsForCall[i] 474 return argsForCall.arg1, argsForCall.arg2 475 } 476 477 func (fake *FakeServiceRepository) FindServiceOfferingByLabelAndProviderReturns(result1 models.ServiceOffering, result2 error) { 478 fake.findServiceOfferingByLabelAndProviderMutex.Lock() 479 defer fake.findServiceOfferingByLabelAndProviderMutex.Unlock() 480 fake.FindServiceOfferingByLabelAndProviderStub = nil 481 fake.findServiceOfferingByLabelAndProviderReturns = struct { 482 result1 models.ServiceOffering 483 result2 error 484 }{result1, result2} 485 } 486 487 func (fake *FakeServiceRepository) FindServiceOfferingByLabelAndProviderReturnsOnCall(i int, result1 models.ServiceOffering, result2 error) { 488 fake.findServiceOfferingByLabelAndProviderMutex.Lock() 489 defer fake.findServiceOfferingByLabelAndProviderMutex.Unlock() 490 fake.FindServiceOfferingByLabelAndProviderStub = nil 491 if fake.findServiceOfferingByLabelAndProviderReturnsOnCall == nil { 492 fake.findServiceOfferingByLabelAndProviderReturnsOnCall = make(map[int]struct { 493 result1 models.ServiceOffering 494 result2 error 495 }) 496 } 497 fake.findServiceOfferingByLabelAndProviderReturnsOnCall[i] = struct { 498 result1 models.ServiceOffering 499 result2 error 500 }{result1, result2} 501 } 502 503 func (fake *FakeServiceRepository) FindServiceOfferingsByLabel(arg1 string) (models.ServiceOfferings, error) { 504 fake.findServiceOfferingsByLabelMutex.Lock() 505 ret, specificReturn := fake.findServiceOfferingsByLabelReturnsOnCall[len(fake.findServiceOfferingsByLabelArgsForCall)] 506 fake.findServiceOfferingsByLabelArgsForCall = append(fake.findServiceOfferingsByLabelArgsForCall, struct { 507 arg1 string 508 }{arg1}) 509 fake.recordInvocation("FindServiceOfferingsByLabel", []interface{}{arg1}) 510 fake.findServiceOfferingsByLabelMutex.Unlock() 511 if fake.FindServiceOfferingsByLabelStub != nil { 512 return fake.FindServiceOfferingsByLabelStub(arg1) 513 } 514 if specificReturn { 515 return ret.result1, ret.result2 516 } 517 fakeReturns := fake.findServiceOfferingsByLabelReturns 518 return fakeReturns.result1, fakeReturns.result2 519 } 520 521 func (fake *FakeServiceRepository) FindServiceOfferingsByLabelCallCount() int { 522 fake.findServiceOfferingsByLabelMutex.RLock() 523 defer fake.findServiceOfferingsByLabelMutex.RUnlock() 524 return len(fake.findServiceOfferingsByLabelArgsForCall) 525 } 526 527 func (fake *FakeServiceRepository) FindServiceOfferingsByLabelCalls(stub func(string) (models.ServiceOfferings, error)) { 528 fake.findServiceOfferingsByLabelMutex.Lock() 529 defer fake.findServiceOfferingsByLabelMutex.Unlock() 530 fake.FindServiceOfferingsByLabelStub = stub 531 } 532 533 func (fake *FakeServiceRepository) FindServiceOfferingsByLabelArgsForCall(i int) string { 534 fake.findServiceOfferingsByLabelMutex.RLock() 535 defer fake.findServiceOfferingsByLabelMutex.RUnlock() 536 argsForCall := fake.findServiceOfferingsByLabelArgsForCall[i] 537 return argsForCall.arg1 538 } 539 540 func (fake *FakeServiceRepository) FindServiceOfferingsByLabelReturns(result1 models.ServiceOfferings, result2 error) { 541 fake.findServiceOfferingsByLabelMutex.Lock() 542 defer fake.findServiceOfferingsByLabelMutex.Unlock() 543 fake.FindServiceOfferingsByLabelStub = nil 544 fake.findServiceOfferingsByLabelReturns = struct { 545 result1 models.ServiceOfferings 546 result2 error 547 }{result1, result2} 548 } 549 550 func (fake *FakeServiceRepository) FindServiceOfferingsByLabelReturnsOnCall(i int, result1 models.ServiceOfferings, result2 error) { 551 fake.findServiceOfferingsByLabelMutex.Lock() 552 defer fake.findServiceOfferingsByLabelMutex.Unlock() 553 fake.FindServiceOfferingsByLabelStub = nil 554 if fake.findServiceOfferingsByLabelReturnsOnCall == nil { 555 fake.findServiceOfferingsByLabelReturnsOnCall = make(map[int]struct { 556 result1 models.ServiceOfferings 557 result2 error 558 }) 559 } 560 fake.findServiceOfferingsByLabelReturnsOnCall[i] = struct { 561 result1 models.ServiceOfferings 562 result2 error 563 }{result1, result2} 564 } 565 566 func (fake *FakeServiceRepository) FindServiceOfferingsForSpaceByLabel(arg1 string, arg2 string) (models.ServiceOfferings, error) { 567 fake.findServiceOfferingsForSpaceByLabelMutex.Lock() 568 ret, specificReturn := fake.findServiceOfferingsForSpaceByLabelReturnsOnCall[len(fake.findServiceOfferingsForSpaceByLabelArgsForCall)] 569 fake.findServiceOfferingsForSpaceByLabelArgsForCall = append(fake.findServiceOfferingsForSpaceByLabelArgsForCall, struct { 570 arg1 string 571 arg2 string 572 }{arg1, arg2}) 573 fake.recordInvocation("FindServiceOfferingsForSpaceByLabel", []interface{}{arg1, arg2}) 574 fake.findServiceOfferingsForSpaceByLabelMutex.Unlock() 575 if fake.FindServiceOfferingsForSpaceByLabelStub != nil { 576 return fake.FindServiceOfferingsForSpaceByLabelStub(arg1, arg2) 577 } 578 if specificReturn { 579 return ret.result1, ret.result2 580 } 581 fakeReturns := fake.findServiceOfferingsForSpaceByLabelReturns 582 return fakeReturns.result1, fakeReturns.result2 583 } 584 585 func (fake *FakeServiceRepository) FindServiceOfferingsForSpaceByLabelCallCount() int { 586 fake.findServiceOfferingsForSpaceByLabelMutex.RLock() 587 defer fake.findServiceOfferingsForSpaceByLabelMutex.RUnlock() 588 return len(fake.findServiceOfferingsForSpaceByLabelArgsForCall) 589 } 590 591 func (fake *FakeServiceRepository) FindServiceOfferingsForSpaceByLabelCalls(stub func(string, string) (models.ServiceOfferings, error)) { 592 fake.findServiceOfferingsForSpaceByLabelMutex.Lock() 593 defer fake.findServiceOfferingsForSpaceByLabelMutex.Unlock() 594 fake.FindServiceOfferingsForSpaceByLabelStub = stub 595 } 596 597 func (fake *FakeServiceRepository) FindServiceOfferingsForSpaceByLabelArgsForCall(i int) (string, string) { 598 fake.findServiceOfferingsForSpaceByLabelMutex.RLock() 599 defer fake.findServiceOfferingsForSpaceByLabelMutex.RUnlock() 600 argsForCall := fake.findServiceOfferingsForSpaceByLabelArgsForCall[i] 601 return argsForCall.arg1, argsForCall.arg2 602 } 603 604 func (fake *FakeServiceRepository) FindServiceOfferingsForSpaceByLabelReturns(result1 models.ServiceOfferings, result2 error) { 605 fake.findServiceOfferingsForSpaceByLabelMutex.Lock() 606 defer fake.findServiceOfferingsForSpaceByLabelMutex.Unlock() 607 fake.FindServiceOfferingsForSpaceByLabelStub = nil 608 fake.findServiceOfferingsForSpaceByLabelReturns = struct { 609 result1 models.ServiceOfferings 610 result2 error 611 }{result1, result2} 612 } 613 614 func (fake *FakeServiceRepository) FindServiceOfferingsForSpaceByLabelReturnsOnCall(i int, result1 models.ServiceOfferings, result2 error) { 615 fake.findServiceOfferingsForSpaceByLabelMutex.Lock() 616 defer fake.findServiceOfferingsForSpaceByLabelMutex.Unlock() 617 fake.FindServiceOfferingsForSpaceByLabelStub = nil 618 if fake.findServiceOfferingsForSpaceByLabelReturnsOnCall == nil { 619 fake.findServiceOfferingsForSpaceByLabelReturnsOnCall = make(map[int]struct { 620 result1 models.ServiceOfferings 621 result2 error 622 }) 623 } 624 fake.findServiceOfferingsForSpaceByLabelReturnsOnCall[i] = struct { 625 result1 models.ServiceOfferings 626 result2 error 627 }{result1, result2} 628 } 629 630 func (fake *FakeServiceRepository) FindServicePlanByDescription(arg1 resources.ServicePlanDescription) (string, error) { 631 fake.findServicePlanByDescriptionMutex.Lock() 632 ret, specificReturn := fake.findServicePlanByDescriptionReturnsOnCall[len(fake.findServicePlanByDescriptionArgsForCall)] 633 fake.findServicePlanByDescriptionArgsForCall = append(fake.findServicePlanByDescriptionArgsForCall, struct { 634 arg1 resources.ServicePlanDescription 635 }{arg1}) 636 fake.recordInvocation("FindServicePlanByDescription", []interface{}{arg1}) 637 fake.findServicePlanByDescriptionMutex.Unlock() 638 if fake.FindServicePlanByDescriptionStub != nil { 639 return fake.FindServicePlanByDescriptionStub(arg1) 640 } 641 if specificReturn { 642 return ret.result1, ret.result2 643 } 644 fakeReturns := fake.findServicePlanByDescriptionReturns 645 return fakeReturns.result1, fakeReturns.result2 646 } 647 648 func (fake *FakeServiceRepository) FindServicePlanByDescriptionCallCount() int { 649 fake.findServicePlanByDescriptionMutex.RLock() 650 defer fake.findServicePlanByDescriptionMutex.RUnlock() 651 return len(fake.findServicePlanByDescriptionArgsForCall) 652 } 653 654 func (fake *FakeServiceRepository) FindServicePlanByDescriptionCalls(stub func(resources.ServicePlanDescription) (string, error)) { 655 fake.findServicePlanByDescriptionMutex.Lock() 656 defer fake.findServicePlanByDescriptionMutex.Unlock() 657 fake.FindServicePlanByDescriptionStub = stub 658 } 659 660 func (fake *FakeServiceRepository) FindServicePlanByDescriptionArgsForCall(i int) resources.ServicePlanDescription { 661 fake.findServicePlanByDescriptionMutex.RLock() 662 defer fake.findServicePlanByDescriptionMutex.RUnlock() 663 argsForCall := fake.findServicePlanByDescriptionArgsForCall[i] 664 return argsForCall.arg1 665 } 666 667 func (fake *FakeServiceRepository) FindServicePlanByDescriptionReturns(result1 string, result2 error) { 668 fake.findServicePlanByDescriptionMutex.Lock() 669 defer fake.findServicePlanByDescriptionMutex.Unlock() 670 fake.FindServicePlanByDescriptionStub = nil 671 fake.findServicePlanByDescriptionReturns = struct { 672 result1 string 673 result2 error 674 }{result1, result2} 675 } 676 677 func (fake *FakeServiceRepository) FindServicePlanByDescriptionReturnsOnCall(i int, result1 string, result2 error) { 678 fake.findServicePlanByDescriptionMutex.Lock() 679 defer fake.findServicePlanByDescriptionMutex.Unlock() 680 fake.FindServicePlanByDescriptionStub = nil 681 if fake.findServicePlanByDescriptionReturnsOnCall == nil { 682 fake.findServicePlanByDescriptionReturnsOnCall = make(map[int]struct { 683 result1 string 684 result2 error 685 }) 686 } 687 fake.findServicePlanByDescriptionReturnsOnCall[i] = struct { 688 result1 string 689 result2 error 690 }{result1, result2} 691 } 692 693 func (fake *FakeServiceRepository) GetAllServiceOfferings() (models.ServiceOfferings, error) { 694 fake.getAllServiceOfferingsMutex.Lock() 695 ret, specificReturn := fake.getAllServiceOfferingsReturnsOnCall[len(fake.getAllServiceOfferingsArgsForCall)] 696 fake.getAllServiceOfferingsArgsForCall = append(fake.getAllServiceOfferingsArgsForCall, struct { 697 }{}) 698 fake.recordInvocation("GetAllServiceOfferings", []interface{}{}) 699 fake.getAllServiceOfferingsMutex.Unlock() 700 if fake.GetAllServiceOfferingsStub != nil { 701 return fake.GetAllServiceOfferingsStub() 702 } 703 if specificReturn { 704 return ret.result1, ret.result2 705 } 706 fakeReturns := fake.getAllServiceOfferingsReturns 707 return fakeReturns.result1, fakeReturns.result2 708 } 709 710 func (fake *FakeServiceRepository) GetAllServiceOfferingsCallCount() int { 711 fake.getAllServiceOfferingsMutex.RLock() 712 defer fake.getAllServiceOfferingsMutex.RUnlock() 713 return len(fake.getAllServiceOfferingsArgsForCall) 714 } 715 716 func (fake *FakeServiceRepository) GetAllServiceOfferingsCalls(stub func() (models.ServiceOfferings, error)) { 717 fake.getAllServiceOfferingsMutex.Lock() 718 defer fake.getAllServiceOfferingsMutex.Unlock() 719 fake.GetAllServiceOfferingsStub = stub 720 } 721 722 func (fake *FakeServiceRepository) GetAllServiceOfferingsReturns(result1 models.ServiceOfferings, result2 error) { 723 fake.getAllServiceOfferingsMutex.Lock() 724 defer fake.getAllServiceOfferingsMutex.Unlock() 725 fake.GetAllServiceOfferingsStub = nil 726 fake.getAllServiceOfferingsReturns = struct { 727 result1 models.ServiceOfferings 728 result2 error 729 }{result1, result2} 730 } 731 732 func (fake *FakeServiceRepository) GetAllServiceOfferingsReturnsOnCall(i int, result1 models.ServiceOfferings, result2 error) { 733 fake.getAllServiceOfferingsMutex.Lock() 734 defer fake.getAllServiceOfferingsMutex.Unlock() 735 fake.GetAllServiceOfferingsStub = nil 736 if fake.getAllServiceOfferingsReturnsOnCall == nil { 737 fake.getAllServiceOfferingsReturnsOnCall = make(map[int]struct { 738 result1 models.ServiceOfferings 739 result2 error 740 }) 741 } 742 fake.getAllServiceOfferingsReturnsOnCall[i] = struct { 743 result1 models.ServiceOfferings 744 result2 error 745 }{result1, result2} 746 } 747 748 func (fake *FakeServiceRepository) GetServiceInstanceCountForServicePlan(arg1 string) (int, error) { 749 fake.getServiceInstanceCountForServicePlanMutex.Lock() 750 ret, specificReturn := fake.getServiceInstanceCountForServicePlanReturnsOnCall[len(fake.getServiceInstanceCountForServicePlanArgsForCall)] 751 fake.getServiceInstanceCountForServicePlanArgsForCall = append(fake.getServiceInstanceCountForServicePlanArgsForCall, struct { 752 arg1 string 753 }{arg1}) 754 fake.recordInvocation("GetServiceInstanceCountForServicePlan", []interface{}{arg1}) 755 fake.getServiceInstanceCountForServicePlanMutex.Unlock() 756 if fake.GetServiceInstanceCountForServicePlanStub != nil { 757 return fake.GetServiceInstanceCountForServicePlanStub(arg1) 758 } 759 if specificReturn { 760 return ret.result1, ret.result2 761 } 762 fakeReturns := fake.getServiceInstanceCountForServicePlanReturns 763 return fakeReturns.result1, fakeReturns.result2 764 } 765 766 func (fake *FakeServiceRepository) GetServiceInstanceCountForServicePlanCallCount() int { 767 fake.getServiceInstanceCountForServicePlanMutex.RLock() 768 defer fake.getServiceInstanceCountForServicePlanMutex.RUnlock() 769 return len(fake.getServiceInstanceCountForServicePlanArgsForCall) 770 } 771 772 func (fake *FakeServiceRepository) GetServiceInstanceCountForServicePlanCalls(stub func(string) (int, error)) { 773 fake.getServiceInstanceCountForServicePlanMutex.Lock() 774 defer fake.getServiceInstanceCountForServicePlanMutex.Unlock() 775 fake.GetServiceInstanceCountForServicePlanStub = stub 776 } 777 778 func (fake *FakeServiceRepository) GetServiceInstanceCountForServicePlanArgsForCall(i int) string { 779 fake.getServiceInstanceCountForServicePlanMutex.RLock() 780 defer fake.getServiceInstanceCountForServicePlanMutex.RUnlock() 781 argsForCall := fake.getServiceInstanceCountForServicePlanArgsForCall[i] 782 return argsForCall.arg1 783 } 784 785 func (fake *FakeServiceRepository) GetServiceInstanceCountForServicePlanReturns(result1 int, result2 error) { 786 fake.getServiceInstanceCountForServicePlanMutex.Lock() 787 defer fake.getServiceInstanceCountForServicePlanMutex.Unlock() 788 fake.GetServiceInstanceCountForServicePlanStub = nil 789 fake.getServiceInstanceCountForServicePlanReturns = struct { 790 result1 int 791 result2 error 792 }{result1, result2} 793 } 794 795 func (fake *FakeServiceRepository) GetServiceInstanceCountForServicePlanReturnsOnCall(i int, result1 int, result2 error) { 796 fake.getServiceInstanceCountForServicePlanMutex.Lock() 797 defer fake.getServiceInstanceCountForServicePlanMutex.Unlock() 798 fake.GetServiceInstanceCountForServicePlanStub = nil 799 if fake.getServiceInstanceCountForServicePlanReturnsOnCall == nil { 800 fake.getServiceInstanceCountForServicePlanReturnsOnCall = make(map[int]struct { 801 result1 int 802 result2 error 803 }) 804 } 805 fake.getServiceInstanceCountForServicePlanReturnsOnCall[i] = struct { 806 result1 int 807 result2 error 808 }{result1, result2} 809 } 810 811 func (fake *FakeServiceRepository) GetServiceOfferingByGUID(arg1 string) (models.ServiceOffering, error) { 812 fake.getServiceOfferingByGUIDMutex.Lock() 813 ret, specificReturn := fake.getServiceOfferingByGUIDReturnsOnCall[len(fake.getServiceOfferingByGUIDArgsForCall)] 814 fake.getServiceOfferingByGUIDArgsForCall = append(fake.getServiceOfferingByGUIDArgsForCall, struct { 815 arg1 string 816 }{arg1}) 817 fake.recordInvocation("GetServiceOfferingByGUID", []interface{}{arg1}) 818 fake.getServiceOfferingByGUIDMutex.Unlock() 819 if fake.GetServiceOfferingByGUIDStub != nil { 820 return fake.GetServiceOfferingByGUIDStub(arg1) 821 } 822 if specificReturn { 823 return ret.result1, ret.result2 824 } 825 fakeReturns := fake.getServiceOfferingByGUIDReturns 826 return fakeReturns.result1, fakeReturns.result2 827 } 828 829 func (fake *FakeServiceRepository) GetServiceOfferingByGUIDCallCount() int { 830 fake.getServiceOfferingByGUIDMutex.RLock() 831 defer fake.getServiceOfferingByGUIDMutex.RUnlock() 832 return len(fake.getServiceOfferingByGUIDArgsForCall) 833 } 834 835 func (fake *FakeServiceRepository) GetServiceOfferingByGUIDCalls(stub func(string) (models.ServiceOffering, error)) { 836 fake.getServiceOfferingByGUIDMutex.Lock() 837 defer fake.getServiceOfferingByGUIDMutex.Unlock() 838 fake.GetServiceOfferingByGUIDStub = stub 839 } 840 841 func (fake *FakeServiceRepository) GetServiceOfferingByGUIDArgsForCall(i int) string { 842 fake.getServiceOfferingByGUIDMutex.RLock() 843 defer fake.getServiceOfferingByGUIDMutex.RUnlock() 844 argsForCall := fake.getServiceOfferingByGUIDArgsForCall[i] 845 return argsForCall.arg1 846 } 847 848 func (fake *FakeServiceRepository) GetServiceOfferingByGUIDReturns(result1 models.ServiceOffering, result2 error) { 849 fake.getServiceOfferingByGUIDMutex.Lock() 850 defer fake.getServiceOfferingByGUIDMutex.Unlock() 851 fake.GetServiceOfferingByGUIDStub = nil 852 fake.getServiceOfferingByGUIDReturns = struct { 853 result1 models.ServiceOffering 854 result2 error 855 }{result1, result2} 856 } 857 858 func (fake *FakeServiceRepository) GetServiceOfferingByGUIDReturnsOnCall(i int, result1 models.ServiceOffering, result2 error) { 859 fake.getServiceOfferingByGUIDMutex.Lock() 860 defer fake.getServiceOfferingByGUIDMutex.Unlock() 861 fake.GetServiceOfferingByGUIDStub = nil 862 if fake.getServiceOfferingByGUIDReturnsOnCall == nil { 863 fake.getServiceOfferingByGUIDReturnsOnCall = make(map[int]struct { 864 result1 models.ServiceOffering 865 result2 error 866 }) 867 } 868 fake.getServiceOfferingByGUIDReturnsOnCall[i] = struct { 869 result1 models.ServiceOffering 870 result2 error 871 }{result1, result2} 872 } 873 874 func (fake *FakeServiceRepository) GetServiceOfferingsForSpace(arg1 string) (models.ServiceOfferings, error) { 875 fake.getServiceOfferingsForSpaceMutex.Lock() 876 ret, specificReturn := fake.getServiceOfferingsForSpaceReturnsOnCall[len(fake.getServiceOfferingsForSpaceArgsForCall)] 877 fake.getServiceOfferingsForSpaceArgsForCall = append(fake.getServiceOfferingsForSpaceArgsForCall, struct { 878 arg1 string 879 }{arg1}) 880 fake.recordInvocation("GetServiceOfferingsForSpace", []interface{}{arg1}) 881 fake.getServiceOfferingsForSpaceMutex.Unlock() 882 if fake.GetServiceOfferingsForSpaceStub != nil { 883 return fake.GetServiceOfferingsForSpaceStub(arg1) 884 } 885 if specificReturn { 886 return ret.result1, ret.result2 887 } 888 fakeReturns := fake.getServiceOfferingsForSpaceReturns 889 return fakeReturns.result1, fakeReturns.result2 890 } 891 892 func (fake *FakeServiceRepository) GetServiceOfferingsForSpaceCallCount() int { 893 fake.getServiceOfferingsForSpaceMutex.RLock() 894 defer fake.getServiceOfferingsForSpaceMutex.RUnlock() 895 return len(fake.getServiceOfferingsForSpaceArgsForCall) 896 } 897 898 func (fake *FakeServiceRepository) GetServiceOfferingsForSpaceCalls(stub func(string) (models.ServiceOfferings, error)) { 899 fake.getServiceOfferingsForSpaceMutex.Lock() 900 defer fake.getServiceOfferingsForSpaceMutex.Unlock() 901 fake.GetServiceOfferingsForSpaceStub = stub 902 } 903 904 func (fake *FakeServiceRepository) GetServiceOfferingsForSpaceArgsForCall(i int) string { 905 fake.getServiceOfferingsForSpaceMutex.RLock() 906 defer fake.getServiceOfferingsForSpaceMutex.RUnlock() 907 argsForCall := fake.getServiceOfferingsForSpaceArgsForCall[i] 908 return argsForCall.arg1 909 } 910 911 func (fake *FakeServiceRepository) GetServiceOfferingsForSpaceReturns(result1 models.ServiceOfferings, result2 error) { 912 fake.getServiceOfferingsForSpaceMutex.Lock() 913 defer fake.getServiceOfferingsForSpaceMutex.Unlock() 914 fake.GetServiceOfferingsForSpaceStub = nil 915 fake.getServiceOfferingsForSpaceReturns = struct { 916 result1 models.ServiceOfferings 917 result2 error 918 }{result1, result2} 919 } 920 921 func (fake *FakeServiceRepository) GetServiceOfferingsForSpaceReturnsOnCall(i int, result1 models.ServiceOfferings, result2 error) { 922 fake.getServiceOfferingsForSpaceMutex.Lock() 923 defer fake.getServiceOfferingsForSpaceMutex.Unlock() 924 fake.GetServiceOfferingsForSpaceStub = nil 925 if fake.getServiceOfferingsForSpaceReturnsOnCall == nil { 926 fake.getServiceOfferingsForSpaceReturnsOnCall = make(map[int]struct { 927 result1 models.ServiceOfferings 928 result2 error 929 }) 930 } 931 fake.getServiceOfferingsForSpaceReturnsOnCall[i] = struct { 932 result1 models.ServiceOfferings 933 result2 error 934 }{result1, result2} 935 } 936 937 func (fake *FakeServiceRepository) ListServicesFromBroker(arg1 string) ([]models.ServiceOffering, error) { 938 fake.listServicesFromBrokerMutex.Lock() 939 ret, specificReturn := fake.listServicesFromBrokerReturnsOnCall[len(fake.listServicesFromBrokerArgsForCall)] 940 fake.listServicesFromBrokerArgsForCall = append(fake.listServicesFromBrokerArgsForCall, struct { 941 arg1 string 942 }{arg1}) 943 fake.recordInvocation("ListServicesFromBroker", []interface{}{arg1}) 944 fake.listServicesFromBrokerMutex.Unlock() 945 if fake.ListServicesFromBrokerStub != nil { 946 return fake.ListServicesFromBrokerStub(arg1) 947 } 948 if specificReturn { 949 return ret.result1, ret.result2 950 } 951 fakeReturns := fake.listServicesFromBrokerReturns 952 return fakeReturns.result1, fakeReturns.result2 953 } 954 955 func (fake *FakeServiceRepository) ListServicesFromBrokerCallCount() int { 956 fake.listServicesFromBrokerMutex.RLock() 957 defer fake.listServicesFromBrokerMutex.RUnlock() 958 return len(fake.listServicesFromBrokerArgsForCall) 959 } 960 961 func (fake *FakeServiceRepository) ListServicesFromBrokerCalls(stub func(string) ([]models.ServiceOffering, error)) { 962 fake.listServicesFromBrokerMutex.Lock() 963 defer fake.listServicesFromBrokerMutex.Unlock() 964 fake.ListServicesFromBrokerStub = stub 965 } 966 967 func (fake *FakeServiceRepository) ListServicesFromBrokerArgsForCall(i int) string { 968 fake.listServicesFromBrokerMutex.RLock() 969 defer fake.listServicesFromBrokerMutex.RUnlock() 970 argsForCall := fake.listServicesFromBrokerArgsForCall[i] 971 return argsForCall.arg1 972 } 973 974 func (fake *FakeServiceRepository) ListServicesFromBrokerReturns(result1 []models.ServiceOffering, result2 error) { 975 fake.listServicesFromBrokerMutex.Lock() 976 defer fake.listServicesFromBrokerMutex.Unlock() 977 fake.ListServicesFromBrokerStub = nil 978 fake.listServicesFromBrokerReturns = struct { 979 result1 []models.ServiceOffering 980 result2 error 981 }{result1, result2} 982 } 983 984 func (fake *FakeServiceRepository) ListServicesFromBrokerReturnsOnCall(i int, result1 []models.ServiceOffering, result2 error) { 985 fake.listServicesFromBrokerMutex.Lock() 986 defer fake.listServicesFromBrokerMutex.Unlock() 987 fake.ListServicesFromBrokerStub = nil 988 if fake.listServicesFromBrokerReturnsOnCall == nil { 989 fake.listServicesFromBrokerReturnsOnCall = make(map[int]struct { 990 result1 []models.ServiceOffering 991 result2 error 992 }) 993 } 994 fake.listServicesFromBrokerReturnsOnCall[i] = struct { 995 result1 []models.ServiceOffering 996 result2 error 997 }{result1, result2} 998 } 999 1000 func (fake *FakeServiceRepository) ListServicesFromManyBrokers(arg1 []string) ([]models.ServiceOffering, error) { 1001 var arg1Copy []string 1002 if arg1 != nil { 1003 arg1Copy = make([]string, len(arg1)) 1004 copy(arg1Copy, arg1) 1005 } 1006 fake.listServicesFromManyBrokersMutex.Lock() 1007 ret, specificReturn := fake.listServicesFromManyBrokersReturnsOnCall[len(fake.listServicesFromManyBrokersArgsForCall)] 1008 fake.listServicesFromManyBrokersArgsForCall = append(fake.listServicesFromManyBrokersArgsForCall, struct { 1009 arg1 []string 1010 }{arg1Copy}) 1011 fake.recordInvocation("ListServicesFromManyBrokers", []interface{}{arg1Copy}) 1012 fake.listServicesFromManyBrokersMutex.Unlock() 1013 if fake.ListServicesFromManyBrokersStub != nil { 1014 return fake.ListServicesFromManyBrokersStub(arg1) 1015 } 1016 if specificReturn { 1017 return ret.result1, ret.result2 1018 } 1019 fakeReturns := fake.listServicesFromManyBrokersReturns 1020 return fakeReturns.result1, fakeReturns.result2 1021 } 1022 1023 func (fake *FakeServiceRepository) ListServicesFromManyBrokersCallCount() int { 1024 fake.listServicesFromManyBrokersMutex.RLock() 1025 defer fake.listServicesFromManyBrokersMutex.RUnlock() 1026 return len(fake.listServicesFromManyBrokersArgsForCall) 1027 } 1028 1029 func (fake *FakeServiceRepository) ListServicesFromManyBrokersCalls(stub func([]string) ([]models.ServiceOffering, error)) { 1030 fake.listServicesFromManyBrokersMutex.Lock() 1031 defer fake.listServicesFromManyBrokersMutex.Unlock() 1032 fake.ListServicesFromManyBrokersStub = stub 1033 } 1034 1035 func (fake *FakeServiceRepository) ListServicesFromManyBrokersArgsForCall(i int) []string { 1036 fake.listServicesFromManyBrokersMutex.RLock() 1037 defer fake.listServicesFromManyBrokersMutex.RUnlock() 1038 argsForCall := fake.listServicesFromManyBrokersArgsForCall[i] 1039 return argsForCall.arg1 1040 } 1041 1042 func (fake *FakeServiceRepository) ListServicesFromManyBrokersReturns(result1 []models.ServiceOffering, result2 error) { 1043 fake.listServicesFromManyBrokersMutex.Lock() 1044 defer fake.listServicesFromManyBrokersMutex.Unlock() 1045 fake.ListServicesFromManyBrokersStub = nil 1046 fake.listServicesFromManyBrokersReturns = struct { 1047 result1 []models.ServiceOffering 1048 result2 error 1049 }{result1, result2} 1050 } 1051 1052 func (fake *FakeServiceRepository) ListServicesFromManyBrokersReturnsOnCall(i int, result1 []models.ServiceOffering, result2 error) { 1053 fake.listServicesFromManyBrokersMutex.Lock() 1054 defer fake.listServicesFromManyBrokersMutex.Unlock() 1055 fake.ListServicesFromManyBrokersStub = nil 1056 if fake.listServicesFromManyBrokersReturnsOnCall == nil { 1057 fake.listServicesFromManyBrokersReturnsOnCall = make(map[int]struct { 1058 result1 []models.ServiceOffering 1059 result2 error 1060 }) 1061 } 1062 fake.listServicesFromManyBrokersReturnsOnCall[i] = struct { 1063 result1 []models.ServiceOffering 1064 result2 error 1065 }{result1, result2} 1066 } 1067 1068 func (fake *FakeServiceRepository) MigrateServicePlanFromV1ToV2(arg1 string, arg2 string) (int, error) { 1069 fake.migrateServicePlanFromV1ToV2Mutex.Lock() 1070 ret, specificReturn := fake.migrateServicePlanFromV1ToV2ReturnsOnCall[len(fake.migrateServicePlanFromV1ToV2ArgsForCall)] 1071 fake.migrateServicePlanFromV1ToV2ArgsForCall = append(fake.migrateServicePlanFromV1ToV2ArgsForCall, struct { 1072 arg1 string 1073 arg2 string 1074 }{arg1, arg2}) 1075 fake.recordInvocation("MigrateServicePlanFromV1ToV2", []interface{}{arg1, arg2}) 1076 fake.migrateServicePlanFromV1ToV2Mutex.Unlock() 1077 if fake.MigrateServicePlanFromV1ToV2Stub != nil { 1078 return fake.MigrateServicePlanFromV1ToV2Stub(arg1, arg2) 1079 } 1080 if specificReturn { 1081 return ret.result1, ret.result2 1082 } 1083 fakeReturns := fake.migrateServicePlanFromV1ToV2Returns 1084 return fakeReturns.result1, fakeReturns.result2 1085 } 1086 1087 func (fake *FakeServiceRepository) MigrateServicePlanFromV1ToV2CallCount() int { 1088 fake.migrateServicePlanFromV1ToV2Mutex.RLock() 1089 defer fake.migrateServicePlanFromV1ToV2Mutex.RUnlock() 1090 return len(fake.migrateServicePlanFromV1ToV2ArgsForCall) 1091 } 1092 1093 func (fake *FakeServiceRepository) MigrateServicePlanFromV1ToV2Calls(stub func(string, string) (int, error)) { 1094 fake.migrateServicePlanFromV1ToV2Mutex.Lock() 1095 defer fake.migrateServicePlanFromV1ToV2Mutex.Unlock() 1096 fake.MigrateServicePlanFromV1ToV2Stub = stub 1097 } 1098 1099 func (fake *FakeServiceRepository) MigrateServicePlanFromV1ToV2ArgsForCall(i int) (string, string) { 1100 fake.migrateServicePlanFromV1ToV2Mutex.RLock() 1101 defer fake.migrateServicePlanFromV1ToV2Mutex.RUnlock() 1102 argsForCall := fake.migrateServicePlanFromV1ToV2ArgsForCall[i] 1103 return argsForCall.arg1, argsForCall.arg2 1104 } 1105 1106 func (fake *FakeServiceRepository) MigrateServicePlanFromV1ToV2Returns(result1 int, result2 error) { 1107 fake.migrateServicePlanFromV1ToV2Mutex.Lock() 1108 defer fake.migrateServicePlanFromV1ToV2Mutex.Unlock() 1109 fake.MigrateServicePlanFromV1ToV2Stub = nil 1110 fake.migrateServicePlanFromV1ToV2Returns = struct { 1111 result1 int 1112 result2 error 1113 }{result1, result2} 1114 } 1115 1116 func (fake *FakeServiceRepository) MigrateServicePlanFromV1ToV2ReturnsOnCall(i int, result1 int, result2 error) { 1117 fake.migrateServicePlanFromV1ToV2Mutex.Lock() 1118 defer fake.migrateServicePlanFromV1ToV2Mutex.Unlock() 1119 fake.MigrateServicePlanFromV1ToV2Stub = nil 1120 if fake.migrateServicePlanFromV1ToV2ReturnsOnCall == nil { 1121 fake.migrateServicePlanFromV1ToV2ReturnsOnCall = make(map[int]struct { 1122 result1 int 1123 result2 error 1124 }) 1125 } 1126 fake.migrateServicePlanFromV1ToV2ReturnsOnCall[i] = struct { 1127 result1 int 1128 result2 error 1129 }{result1, result2} 1130 } 1131 1132 func (fake *FakeServiceRepository) PurgeServiceInstance(arg1 models.ServiceInstance) error { 1133 fake.purgeServiceInstanceMutex.Lock() 1134 ret, specificReturn := fake.purgeServiceInstanceReturnsOnCall[len(fake.purgeServiceInstanceArgsForCall)] 1135 fake.purgeServiceInstanceArgsForCall = append(fake.purgeServiceInstanceArgsForCall, struct { 1136 arg1 models.ServiceInstance 1137 }{arg1}) 1138 fake.recordInvocation("PurgeServiceInstance", []interface{}{arg1}) 1139 fake.purgeServiceInstanceMutex.Unlock() 1140 if fake.PurgeServiceInstanceStub != nil { 1141 return fake.PurgeServiceInstanceStub(arg1) 1142 } 1143 if specificReturn { 1144 return ret.result1 1145 } 1146 fakeReturns := fake.purgeServiceInstanceReturns 1147 return fakeReturns.result1 1148 } 1149 1150 func (fake *FakeServiceRepository) PurgeServiceInstanceCallCount() int { 1151 fake.purgeServiceInstanceMutex.RLock() 1152 defer fake.purgeServiceInstanceMutex.RUnlock() 1153 return len(fake.purgeServiceInstanceArgsForCall) 1154 } 1155 1156 func (fake *FakeServiceRepository) PurgeServiceInstanceCalls(stub func(models.ServiceInstance) error) { 1157 fake.purgeServiceInstanceMutex.Lock() 1158 defer fake.purgeServiceInstanceMutex.Unlock() 1159 fake.PurgeServiceInstanceStub = stub 1160 } 1161 1162 func (fake *FakeServiceRepository) PurgeServiceInstanceArgsForCall(i int) models.ServiceInstance { 1163 fake.purgeServiceInstanceMutex.RLock() 1164 defer fake.purgeServiceInstanceMutex.RUnlock() 1165 argsForCall := fake.purgeServiceInstanceArgsForCall[i] 1166 return argsForCall.arg1 1167 } 1168 1169 func (fake *FakeServiceRepository) PurgeServiceInstanceReturns(result1 error) { 1170 fake.purgeServiceInstanceMutex.Lock() 1171 defer fake.purgeServiceInstanceMutex.Unlock() 1172 fake.PurgeServiceInstanceStub = nil 1173 fake.purgeServiceInstanceReturns = struct { 1174 result1 error 1175 }{result1} 1176 } 1177 1178 func (fake *FakeServiceRepository) PurgeServiceInstanceReturnsOnCall(i int, result1 error) { 1179 fake.purgeServiceInstanceMutex.Lock() 1180 defer fake.purgeServiceInstanceMutex.Unlock() 1181 fake.PurgeServiceInstanceStub = nil 1182 if fake.purgeServiceInstanceReturnsOnCall == nil { 1183 fake.purgeServiceInstanceReturnsOnCall = make(map[int]struct { 1184 result1 error 1185 }) 1186 } 1187 fake.purgeServiceInstanceReturnsOnCall[i] = struct { 1188 result1 error 1189 }{result1} 1190 } 1191 1192 func (fake *FakeServiceRepository) PurgeServiceOffering(arg1 models.ServiceOffering) error { 1193 fake.purgeServiceOfferingMutex.Lock() 1194 ret, specificReturn := fake.purgeServiceOfferingReturnsOnCall[len(fake.purgeServiceOfferingArgsForCall)] 1195 fake.purgeServiceOfferingArgsForCall = append(fake.purgeServiceOfferingArgsForCall, struct { 1196 arg1 models.ServiceOffering 1197 }{arg1}) 1198 fake.recordInvocation("PurgeServiceOffering", []interface{}{arg1}) 1199 fake.purgeServiceOfferingMutex.Unlock() 1200 if fake.PurgeServiceOfferingStub != nil { 1201 return fake.PurgeServiceOfferingStub(arg1) 1202 } 1203 if specificReturn { 1204 return ret.result1 1205 } 1206 fakeReturns := fake.purgeServiceOfferingReturns 1207 return fakeReturns.result1 1208 } 1209 1210 func (fake *FakeServiceRepository) PurgeServiceOfferingCallCount() int { 1211 fake.purgeServiceOfferingMutex.RLock() 1212 defer fake.purgeServiceOfferingMutex.RUnlock() 1213 return len(fake.purgeServiceOfferingArgsForCall) 1214 } 1215 1216 func (fake *FakeServiceRepository) PurgeServiceOfferingCalls(stub func(models.ServiceOffering) error) { 1217 fake.purgeServiceOfferingMutex.Lock() 1218 defer fake.purgeServiceOfferingMutex.Unlock() 1219 fake.PurgeServiceOfferingStub = stub 1220 } 1221 1222 func (fake *FakeServiceRepository) PurgeServiceOfferingArgsForCall(i int) models.ServiceOffering { 1223 fake.purgeServiceOfferingMutex.RLock() 1224 defer fake.purgeServiceOfferingMutex.RUnlock() 1225 argsForCall := fake.purgeServiceOfferingArgsForCall[i] 1226 return argsForCall.arg1 1227 } 1228 1229 func (fake *FakeServiceRepository) PurgeServiceOfferingReturns(result1 error) { 1230 fake.purgeServiceOfferingMutex.Lock() 1231 defer fake.purgeServiceOfferingMutex.Unlock() 1232 fake.PurgeServiceOfferingStub = nil 1233 fake.purgeServiceOfferingReturns = struct { 1234 result1 error 1235 }{result1} 1236 } 1237 1238 func (fake *FakeServiceRepository) PurgeServiceOfferingReturnsOnCall(i int, result1 error) { 1239 fake.purgeServiceOfferingMutex.Lock() 1240 defer fake.purgeServiceOfferingMutex.Unlock() 1241 fake.PurgeServiceOfferingStub = nil 1242 if fake.purgeServiceOfferingReturnsOnCall == nil { 1243 fake.purgeServiceOfferingReturnsOnCall = make(map[int]struct { 1244 result1 error 1245 }) 1246 } 1247 fake.purgeServiceOfferingReturnsOnCall[i] = struct { 1248 result1 error 1249 }{result1} 1250 } 1251 1252 func (fake *FakeServiceRepository) RenameService(arg1 models.ServiceInstance, arg2 string) error { 1253 fake.renameServiceMutex.Lock() 1254 ret, specificReturn := fake.renameServiceReturnsOnCall[len(fake.renameServiceArgsForCall)] 1255 fake.renameServiceArgsForCall = append(fake.renameServiceArgsForCall, struct { 1256 arg1 models.ServiceInstance 1257 arg2 string 1258 }{arg1, arg2}) 1259 fake.recordInvocation("RenameService", []interface{}{arg1, arg2}) 1260 fake.renameServiceMutex.Unlock() 1261 if fake.RenameServiceStub != nil { 1262 return fake.RenameServiceStub(arg1, arg2) 1263 } 1264 if specificReturn { 1265 return ret.result1 1266 } 1267 fakeReturns := fake.renameServiceReturns 1268 return fakeReturns.result1 1269 } 1270 1271 func (fake *FakeServiceRepository) RenameServiceCallCount() int { 1272 fake.renameServiceMutex.RLock() 1273 defer fake.renameServiceMutex.RUnlock() 1274 return len(fake.renameServiceArgsForCall) 1275 } 1276 1277 func (fake *FakeServiceRepository) RenameServiceCalls(stub func(models.ServiceInstance, string) error) { 1278 fake.renameServiceMutex.Lock() 1279 defer fake.renameServiceMutex.Unlock() 1280 fake.RenameServiceStub = stub 1281 } 1282 1283 func (fake *FakeServiceRepository) RenameServiceArgsForCall(i int) (models.ServiceInstance, string) { 1284 fake.renameServiceMutex.RLock() 1285 defer fake.renameServiceMutex.RUnlock() 1286 argsForCall := fake.renameServiceArgsForCall[i] 1287 return argsForCall.arg1, argsForCall.arg2 1288 } 1289 1290 func (fake *FakeServiceRepository) RenameServiceReturns(result1 error) { 1291 fake.renameServiceMutex.Lock() 1292 defer fake.renameServiceMutex.Unlock() 1293 fake.RenameServiceStub = nil 1294 fake.renameServiceReturns = struct { 1295 result1 error 1296 }{result1} 1297 } 1298 1299 func (fake *FakeServiceRepository) RenameServiceReturnsOnCall(i int, result1 error) { 1300 fake.renameServiceMutex.Lock() 1301 defer fake.renameServiceMutex.Unlock() 1302 fake.RenameServiceStub = nil 1303 if fake.renameServiceReturnsOnCall == nil { 1304 fake.renameServiceReturnsOnCall = make(map[int]struct { 1305 result1 error 1306 }) 1307 } 1308 fake.renameServiceReturnsOnCall[i] = struct { 1309 result1 error 1310 }{result1} 1311 } 1312 1313 func (fake *FakeServiceRepository) UpdateServiceInstance(arg1 string, arg2 string, arg3 map[string]interface{}, arg4 []string) error { 1314 var arg4Copy []string 1315 if arg4 != nil { 1316 arg4Copy = make([]string, len(arg4)) 1317 copy(arg4Copy, arg4) 1318 } 1319 fake.updateServiceInstanceMutex.Lock() 1320 ret, specificReturn := fake.updateServiceInstanceReturnsOnCall[len(fake.updateServiceInstanceArgsForCall)] 1321 fake.updateServiceInstanceArgsForCall = append(fake.updateServiceInstanceArgsForCall, struct { 1322 arg1 string 1323 arg2 string 1324 arg3 map[string]interface{} 1325 arg4 []string 1326 }{arg1, arg2, arg3, arg4Copy}) 1327 fake.recordInvocation("UpdateServiceInstance", []interface{}{arg1, arg2, arg3, arg4Copy}) 1328 fake.updateServiceInstanceMutex.Unlock() 1329 if fake.UpdateServiceInstanceStub != nil { 1330 return fake.UpdateServiceInstanceStub(arg1, arg2, arg3, arg4) 1331 } 1332 if specificReturn { 1333 return ret.result1 1334 } 1335 fakeReturns := fake.updateServiceInstanceReturns 1336 return fakeReturns.result1 1337 } 1338 1339 func (fake *FakeServiceRepository) UpdateServiceInstanceCallCount() int { 1340 fake.updateServiceInstanceMutex.RLock() 1341 defer fake.updateServiceInstanceMutex.RUnlock() 1342 return len(fake.updateServiceInstanceArgsForCall) 1343 } 1344 1345 func (fake *FakeServiceRepository) UpdateServiceInstanceCalls(stub func(string, string, map[string]interface{}, []string) error) { 1346 fake.updateServiceInstanceMutex.Lock() 1347 defer fake.updateServiceInstanceMutex.Unlock() 1348 fake.UpdateServiceInstanceStub = stub 1349 } 1350 1351 func (fake *FakeServiceRepository) UpdateServiceInstanceArgsForCall(i int) (string, string, map[string]interface{}, []string) { 1352 fake.updateServiceInstanceMutex.RLock() 1353 defer fake.updateServiceInstanceMutex.RUnlock() 1354 argsForCall := fake.updateServiceInstanceArgsForCall[i] 1355 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4 1356 } 1357 1358 func (fake *FakeServiceRepository) UpdateServiceInstanceReturns(result1 error) { 1359 fake.updateServiceInstanceMutex.Lock() 1360 defer fake.updateServiceInstanceMutex.Unlock() 1361 fake.UpdateServiceInstanceStub = nil 1362 fake.updateServiceInstanceReturns = struct { 1363 result1 error 1364 }{result1} 1365 } 1366 1367 func (fake *FakeServiceRepository) UpdateServiceInstanceReturnsOnCall(i int, result1 error) { 1368 fake.updateServiceInstanceMutex.Lock() 1369 defer fake.updateServiceInstanceMutex.Unlock() 1370 fake.UpdateServiceInstanceStub = nil 1371 if fake.updateServiceInstanceReturnsOnCall == nil { 1372 fake.updateServiceInstanceReturnsOnCall = make(map[int]struct { 1373 result1 error 1374 }) 1375 } 1376 fake.updateServiceInstanceReturnsOnCall[i] = struct { 1377 result1 error 1378 }{result1} 1379 } 1380 1381 func (fake *FakeServiceRepository) Invocations() map[string][][]interface{} { 1382 fake.invocationsMutex.RLock() 1383 defer fake.invocationsMutex.RUnlock() 1384 fake.createServiceInstanceMutex.RLock() 1385 defer fake.createServiceInstanceMutex.RUnlock() 1386 fake.deleteServiceMutex.RLock() 1387 defer fake.deleteServiceMutex.RUnlock() 1388 fake.findInstanceByNameMutex.RLock() 1389 defer fake.findInstanceByNameMutex.RUnlock() 1390 fake.findServiceOfferingByLabelAndProviderMutex.RLock() 1391 defer fake.findServiceOfferingByLabelAndProviderMutex.RUnlock() 1392 fake.findServiceOfferingsByLabelMutex.RLock() 1393 defer fake.findServiceOfferingsByLabelMutex.RUnlock() 1394 fake.findServiceOfferingsForSpaceByLabelMutex.RLock() 1395 defer fake.findServiceOfferingsForSpaceByLabelMutex.RUnlock() 1396 fake.findServicePlanByDescriptionMutex.RLock() 1397 defer fake.findServicePlanByDescriptionMutex.RUnlock() 1398 fake.getAllServiceOfferingsMutex.RLock() 1399 defer fake.getAllServiceOfferingsMutex.RUnlock() 1400 fake.getServiceInstanceCountForServicePlanMutex.RLock() 1401 defer fake.getServiceInstanceCountForServicePlanMutex.RUnlock() 1402 fake.getServiceOfferingByGUIDMutex.RLock() 1403 defer fake.getServiceOfferingByGUIDMutex.RUnlock() 1404 fake.getServiceOfferingsForSpaceMutex.RLock() 1405 defer fake.getServiceOfferingsForSpaceMutex.RUnlock() 1406 fake.listServicesFromBrokerMutex.RLock() 1407 defer fake.listServicesFromBrokerMutex.RUnlock() 1408 fake.listServicesFromManyBrokersMutex.RLock() 1409 defer fake.listServicesFromManyBrokersMutex.RUnlock() 1410 fake.migrateServicePlanFromV1ToV2Mutex.RLock() 1411 defer fake.migrateServicePlanFromV1ToV2Mutex.RUnlock() 1412 fake.purgeServiceInstanceMutex.RLock() 1413 defer fake.purgeServiceInstanceMutex.RUnlock() 1414 fake.purgeServiceOfferingMutex.RLock() 1415 defer fake.purgeServiceOfferingMutex.RUnlock() 1416 fake.renameServiceMutex.RLock() 1417 defer fake.renameServiceMutex.RUnlock() 1418 fake.updateServiceInstanceMutex.RLock() 1419 defer fake.updateServiceInstanceMutex.RUnlock() 1420 copiedInvocations := map[string][][]interface{}{} 1421 for key, value := range fake.invocations { 1422 copiedInvocations[key] = value 1423 } 1424 return copiedInvocations 1425 } 1426 1427 func (fake *FakeServiceRepository) recordInvocation(key string, args []interface{}) { 1428 fake.invocationsMutex.Lock() 1429 defer fake.invocationsMutex.Unlock() 1430 if fake.invocations == nil { 1431 fake.invocations = map[string][][]interface{}{} 1432 } 1433 if fake.invocations[key] == nil { 1434 fake.invocations[key] = [][]interface{}{} 1435 } 1436 fake.invocations[key] = append(fake.invocations[key], args) 1437 } 1438 1439 var _ api.ServiceRepository = new(FakeServiceRepository)