github.com/mook-as/cf-cli@v7.0.0-beta.28.0.20200120190804-b91c115fae48+incompatible/cf/api/apifakes/fake_domain_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/models" 9 ) 10 11 type FakeDomainRepository struct { 12 CreateStub func(string, string) (models.DomainFields, error) 13 createMutex sync.RWMutex 14 createArgsForCall []struct { 15 arg1 string 16 arg2 string 17 } 18 createReturns struct { 19 result1 models.DomainFields 20 result2 error 21 } 22 createReturnsOnCall map[int]struct { 23 result1 models.DomainFields 24 result2 error 25 } 26 CreateSharedDomainStub func(string, string) error 27 createSharedDomainMutex sync.RWMutex 28 createSharedDomainArgsForCall []struct { 29 arg1 string 30 arg2 string 31 } 32 createSharedDomainReturns struct { 33 result1 error 34 } 35 createSharedDomainReturnsOnCall map[int]struct { 36 result1 error 37 } 38 DeleteStub func(string) error 39 deleteMutex sync.RWMutex 40 deleteArgsForCall []struct { 41 arg1 string 42 } 43 deleteReturns struct { 44 result1 error 45 } 46 deleteReturnsOnCall map[int]struct { 47 result1 error 48 } 49 DeleteSharedDomainStub func(string) error 50 deleteSharedDomainMutex sync.RWMutex 51 deleteSharedDomainArgsForCall []struct { 52 arg1 string 53 } 54 deleteSharedDomainReturns struct { 55 result1 error 56 } 57 deleteSharedDomainReturnsOnCall map[int]struct { 58 result1 error 59 } 60 FindByNameInOrgStub func(string, string) (models.DomainFields, error) 61 findByNameInOrgMutex sync.RWMutex 62 findByNameInOrgArgsForCall []struct { 63 arg1 string 64 arg2 string 65 } 66 findByNameInOrgReturns struct { 67 result1 models.DomainFields 68 result2 error 69 } 70 findByNameInOrgReturnsOnCall map[int]struct { 71 result1 models.DomainFields 72 result2 error 73 } 74 FindPrivateByNameStub func(string) (models.DomainFields, error) 75 findPrivateByNameMutex sync.RWMutex 76 findPrivateByNameArgsForCall []struct { 77 arg1 string 78 } 79 findPrivateByNameReturns struct { 80 result1 models.DomainFields 81 result2 error 82 } 83 findPrivateByNameReturnsOnCall map[int]struct { 84 result1 models.DomainFields 85 result2 error 86 } 87 FindSharedByNameStub func(string) (models.DomainFields, error) 88 findSharedByNameMutex sync.RWMutex 89 findSharedByNameArgsForCall []struct { 90 arg1 string 91 } 92 findSharedByNameReturns struct { 93 result1 models.DomainFields 94 result2 error 95 } 96 findSharedByNameReturnsOnCall map[int]struct { 97 result1 models.DomainFields 98 result2 error 99 } 100 FirstOrDefaultStub func(string, *string) (models.DomainFields, error) 101 firstOrDefaultMutex sync.RWMutex 102 firstOrDefaultArgsForCall []struct { 103 arg1 string 104 arg2 *string 105 } 106 firstOrDefaultReturns struct { 107 result1 models.DomainFields 108 result2 error 109 } 110 firstOrDefaultReturnsOnCall map[int]struct { 111 result1 models.DomainFields 112 result2 error 113 } 114 ListDomainsForOrgStub func(string, func(models.DomainFields) bool) error 115 listDomainsForOrgMutex sync.RWMutex 116 listDomainsForOrgArgsForCall []struct { 117 arg1 string 118 arg2 func(models.DomainFields) bool 119 } 120 listDomainsForOrgReturns struct { 121 result1 error 122 } 123 listDomainsForOrgReturnsOnCall map[int]struct { 124 result1 error 125 } 126 invocations map[string][][]interface{} 127 invocationsMutex sync.RWMutex 128 } 129 130 func (fake *FakeDomainRepository) Create(arg1 string, arg2 string) (models.DomainFields, error) { 131 fake.createMutex.Lock() 132 ret, specificReturn := fake.createReturnsOnCall[len(fake.createArgsForCall)] 133 fake.createArgsForCall = append(fake.createArgsForCall, struct { 134 arg1 string 135 arg2 string 136 }{arg1, arg2}) 137 fake.recordInvocation("Create", []interface{}{arg1, arg2}) 138 fake.createMutex.Unlock() 139 if fake.CreateStub != nil { 140 return fake.CreateStub(arg1, arg2) 141 } 142 if specificReturn { 143 return ret.result1, ret.result2 144 } 145 fakeReturns := fake.createReturns 146 return fakeReturns.result1, fakeReturns.result2 147 } 148 149 func (fake *FakeDomainRepository) CreateCallCount() int { 150 fake.createMutex.RLock() 151 defer fake.createMutex.RUnlock() 152 return len(fake.createArgsForCall) 153 } 154 155 func (fake *FakeDomainRepository) CreateCalls(stub func(string, string) (models.DomainFields, error)) { 156 fake.createMutex.Lock() 157 defer fake.createMutex.Unlock() 158 fake.CreateStub = stub 159 } 160 161 func (fake *FakeDomainRepository) CreateArgsForCall(i int) (string, string) { 162 fake.createMutex.RLock() 163 defer fake.createMutex.RUnlock() 164 argsForCall := fake.createArgsForCall[i] 165 return argsForCall.arg1, argsForCall.arg2 166 } 167 168 func (fake *FakeDomainRepository) CreateReturns(result1 models.DomainFields, result2 error) { 169 fake.createMutex.Lock() 170 defer fake.createMutex.Unlock() 171 fake.CreateStub = nil 172 fake.createReturns = struct { 173 result1 models.DomainFields 174 result2 error 175 }{result1, result2} 176 } 177 178 func (fake *FakeDomainRepository) CreateReturnsOnCall(i int, result1 models.DomainFields, result2 error) { 179 fake.createMutex.Lock() 180 defer fake.createMutex.Unlock() 181 fake.CreateStub = nil 182 if fake.createReturnsOnCall == nil { 183 fake.createReturnsOnCall = make(map[int]struct { 184 result1 models.DomainFields 185 result2 error 186 }) 187 } 188 fake.createReturnsOnCall[i] = struct { 189 result1 models.DomainFields 190 result2 error 191 }{result1, result2} 192 } 193 194 func (fake *FakeDomainRepository) CreateSharedDomain(arg1 string, arg2 string) error { 195 fake.createSharedDomainMutex.Lock() 196 ret, specificReturn := fake.createSharedDomainReturnsOnCall[len(fake.createSharedDomainArgsForCall)] 197 fake.createSharedDomainArgsForCall = append(fake.createSharedDomainArgsForCall, struct { 198 arg1 string 199 arg2 string 200 }{arg1, arg2}) 201 fake.recordInvocation("CreateSharedDomain", []interface{}{arg1, arg2}) 202 fake.createSharedDomainMutex.Unlock() 203 if fake.CreateSharedDomainStub != nil { 204 return fake.CreateSharedDomainStub(arg1, arg2) 205 } 206 if specificReturn { 207 return ret.result1 208 } 209 fakeReturns := fake.createSharedDomainReturns 210 return fakeReturns.result1 211 } 212 213 func (fake *FakeDomainRepository) CreateSharedDomainCallCount() int { 214 fake.createSharedDomainMutex.RLock() 215 defer fake.createSharedDomainMutex.RUnlock() 216 return len(fake.createSharedDomainArgsForCall) 217 } 218 219 func (fake *FakeDomainRepository) CreateSharedDomainCalls(stub func(string, string) error) { 220 fake.createSharedDomainMutex.Lock() 221 defer fake.createSharedDomainMutex.Unlock() 222 fake.CreateSharedDomainStub = stub 223 } 224 225 func (fake *FakeDomainRepository) CreateSharedDomainArgsForCall(i int) (string, string) { 226 fake.createSharedDomainMutex.RLock() 227 defer fake.createSharedDomainMutex.RUnlock() 228 argsForCall := fake.createSharedDomainArgsForCall[i] 229 return argsForCall.arg1, argsForCall.arg2 230 } 231 232 func (fake *FakeDomainRepository) CreateSharedDomainReturns(result1 error) { 233 fake.createSharedDomainMutex.Lock() 234 defer fake.createSharedDomainMutex.Unlock() 235 fake.CreateSharedDomainStub = nil 236 fake.createSharedDomainReturns = struct { 237 result1 error 238 }{result1} 239 } 240 241 func (fake *FakeDomainRepository) CreateSharedDomainReturnsOnCall(i int, result1 error) { 242 fake.createSharedDomainMutex.Lock() 243 defer fake.createSharedDomainMutex.Unlock() 244 fake.CreateSharedDomainStub = nil 245 if fake.createSharedDomainReturnsOnCall == nil { 246 fake.createSharedDomainReturnsOnCall = make(map[int]struct { 247 result1 error 248 }) 249 } 250 fake.createSharedDomainReturnsOnCall[i] = struct { 251 result1 error 252 }{result1} 253 } 254 255 func (fake *FakeDomainRepository) Delete(arg1 string) error { 256 fake.deleteMutex.Lock() 257 ret, specificReturn := fake.deleteReturnsOnCall[len(fake.deleteArgsForCall)] 258 fake.deleteArgsForCall = append(fake.deleteArgsForCall, struct { 259 arg1 string 260 }{arg1}) 261 fake.recordInvocation("Delete", []interface{}{arg1}) 262 fake.deleteMutex.Unlock() 263 if fake.DeleteStub != nil { 264 return fake.DeleteStub(arg1) 265 } 266 if specificReturn { 267 return ret.result1 268 } 269 fakeReturns := fake.deleteReturns 270 return fakeReturns.result1 271 } 272 273 func (fake *FakeDomainRepository) DeleteCallCount() int { 274 fake.deleteMutex.RLock() 275 defer fake.deleteMutex.RUnlock() 276 return len(fake.deleteArgsForCall) 277 } 278 279 func (fake *FakeDomainRepository) DeleteCalls(stub func(string) error) { 280 fake.deleteMutex.Lock() 281 defer fake.deleteMutex.Unlock() 282 fake.DeleteStub = stub 283 } 284 285 func (fake *FakeDomainRepository) DeleteArgsForCall(i int) string { 286 fake.deleteMutex.RLock() 287 defer fake.deleteMutex.RUnlock() 288 argsForCall := fake.deleteArgsForCall[i] 289 return argsForCall.arg1 290 } 291 292 func (fake *FakeDomainRepository) DeleteReturns(result1 error) { 293 fake.deleteMutex.Lock() 294 defer fake.deleteMutex.Unlock() 295 fake.DeleteStub = nil 296 fake.deleteReturns = struct { 297 result1 error 298 }{result1} 299 } 300 301 func (fake *FakeDomainRepository) DeleteReturnsOnCall(i int, result1 error) { 302 fake.deleteMutex.Lock() 303 defer fake.deleteMutex.Unlock() 304 fake.DeleteStub = nil 305 if fake.deleteReturnsOnCall == nil { 306 fake.deleteReturnsOnCall = make(map[int]struct { 307 result1 error 308 }) 309 } 310 fake.deleteReturnsOnCall[i] = struct { 311 result1 error 312 }{result1} 313 } 314 315 func (fake *FakeDomainRepository) DeleteSharedDomain(arg1 string) error { 316 fake.deleteSharedDomainMutex.Lock() 317 ret, specificReturn := fake.deleteSharedDomainReturnsOnCall[len(fake.deleteSharedDomainArgsForCall)] 318 fake.deleteSharedDomainArgsForCall = append(fake.deleteSharedDomainArgsForCall, struct { 319 arg1 string 320 }{arg1}) 321 fake.recordInvocation("DeleteSharedDomain", []interface{}{arg1}) 322 fake.deleteSharedDomainMutex.Unlock() 323 if fake.DeleteSharedDomainStub != nil { 324 return fake.DeleteSharedDomainStub(arg1) 325 } 326 if specificReturn { 327 return ret.result1 328 } 329 fakeReturns := fake.deleteSharedDomainReturns 330 return fakeReturns.result1 331 } 332 333 func (fake *FakeDomainRepository) DeleteSharedDomainCallCount() int { 334 fake.deleteSharedDomainMutex.RLock() 335 defer fake.deleteSharedDomainMutex.RUnlock() 336 return len(fake.deleteSharedDomainArgsForCall) 337 } 338 339 func (fake *FakeDomainRepository) DeleteSharedDomainCalls(stub func(string) error) { 340 fake.deleteSharedDomainMutex.Lock() 341 defer fake.deleteSharedDomainMutex.Unlock() 342 fake.DeleteSharedDomainStub = stub 343 } 344 345 func (fake *FakeDomainRepository) DeleteSharedDomainArgsForCall(i int) string { 346 fake.deleteSharedDomainMutex.RLock() 347 defer fake.deleteSharedDomainMutex.RUnlock() 348 argsForCall := fake.deleteSharedDomainArgsForCall[i] 349 return argsForCall.arg1 350 } 351 352 func (fake *FakeDomainRepository) DeleteSharedDomainReturns(result1 error) { 353 fake.deleteSharedDomainMutex.Lock() 354 defer fake.deleteSharedDomainMutex.Unlock() 355 fake.DeleteSharedDomainStub = nil 356 fake.deleteSharedDomainReturns = struct { 357 result1 error 358 }{result1} 359 } 360 361 func (fake *FakeDomainRepository) DeleteSharedDomainReturnsOnCall(i int, result1 error) { 362 fake.deleteSharedDomainMutex.Lock() 363 defer fake.deleteSharedDomainMutex.Unlock() 364 fake.DeleteSharedDomainStub = nil 365 if fake.deleteSharedDomainReturnsOnCall == nil { 366 fake.deleteSharedDomainReturnsOnCall = make(map[int]struct { 367 result1 error 368 }) 369 } 370 fake.deleteSharedDomainReturnsOnCall[i] = struct { 371 result1 error 372 }{result1} 373 } 374 375 func (fake *FakeDomainRepository) FindByNameInOrg(arg1 string, arg2 string) (models.DomainFields, error) { 376 fake.findByNameInOrgMutex.Lock() 377 ret, specificReturn := fake.findByNameInOrgReturnsOnCall[len(fake.findByNameInOrgArgsForCall)] 378 fake.findByNameInOrgArgsForCall = append(fake.findByNameInOrgArgsForCall, struct { 379 arg1 string 380 arg2 string 381 }{arg1, arg2}) 382 fake.recordInvocation("FindByNameInOrg", []interface{}{arg1, arg2}) 383 fake.findByNameInOrgMutex.Unlock() 384 if fake.FindByNameInOrgStub != nil { 385 return fake.FindByNameInOrgStub(arg1, arg2) 386 } 387 if specificReturn { 388 return ret.result1, ret.result2 389 } 390 fakeReturns := fake.findByNameInOrgReturns 391 return fakeReturns.result1, fakeReturns.result2 392 } 393 394 func (fake *FakeDomainRepository) FindByNameInOrgCallCount() int { 395 fake.findByNameInOrgMutex.RLock() 396 defer fake.findByNameInOrgMutex.RUnlock() 397 return len(fake.findByNameInOrgArgsForCall) 398 } 399 400 func (fake *FakeDomainRepository) FindByNameInOrgCalls(stub func(string, string) (models.DomainFields, error)) { 401 fake.findByNameInOrgMutex.Lock() 402 defer fake.findByNameInOrgMutex.Unlock() 403 fake.FindByNameInOrgStub = stub 404 } 405 406 func (fake *FakeDomainRepository) FindByNameInOrgArgsForCall(i int) (string, string) { 407 fake.findByNameInOrgMutex.RLock() 408 defer fake.findByNameInOrgMutex.RUnlock() 409 argsForCall := fake.findByNameInOrgArgsForCall[i] 410 return argsForCall.arg1, argsForCall.arg2 411 } 412 413 func (fake *FakeDomainRepository) FindByNameInOrgReturns(result1 models.DomainFields, result2 error) { 414 fake.findByNameInOrgMutex.Lock() 415 defer fake.findByNameInOrgMutex.Unlock() 416 fake.FindByNameInOrgStub = nil 417 fake.findByNameInOrgReturns = struct { 418 result1 models.DomainFields 419 result2 error 420 }{result1, result2} 421 } 422 423 func (fake *FakeDomainRepository) FindByNameInOrgReturnsOnCall(i int, result1 models.DomainFields, result2 error) { 424 fake.findByNameInOrgMutex.Lock() 425 defer fake.findByNameInOrgMutex.Unlock() 426 fake.FindByNameInOrgStub = nil 427 if fake.findByNameInOrgReturnsOnCall == nil { 428 fake.findByNameInOrgReturnsOnCall = make(map[int]struct { 429 result1 models.DomainFields 430 result2 error 431 }) 432 } 433 fake.findByNameInOrgReturnsOnCall[i] = struct { 434 result1 models.DomainFields 435 result2 error 436 }{result1, result2} 437 } 438 439 func (fake *FakeDomainRepository) FindPrivateByName(arg1 string) (models.DomainFields, error) { 440 fake.findPrivateByNameMutex.Lock() 441 ret, specificReturn := fake.findPrivateByNameReturnsOnCall[len(fake.findPrivateByNameArgsForCall)] 442 fake.findPrivateByNameArgsForCall = append(fake.findPrivateByNameArgsForCall, struct { 443 arg1 string 444 }{arg1}) 445 fake.recordInvocation("FindPrivateByName", []interface{}{arg1}) 446 fake.findPrivateByNameMutex.Unlock() 447 if fake.FindPrivateByNameStub != nil { 448 return fake.FindPrivateByNameStub(arg1) 449 } 450 if specificReturn { 451 return ret.result1, ret.result2 452 } 453 fakeReturns := fake.findPrivateByNameReturns 454 return fakeReturns.result1, fakeReturns.result2 455 } 456 457 func (fake *FakeDomainRepository) FindPrivateByNameCallCount() int { 458 fake.findPrivateByNameMutex.RLock() 459 defer fake.findPrivateByNameMutex.RUnlock() 460 return len(fake.findPrivateByNameArgsForCall) 461 } 462 463 func (fake *FakeDomainRepository) FindPrivateByNameCalls(stub func(string) (models.DomainFields, error)) { 464 fake.findPrivateByNameMutex.Lock() 465 defer fake.findPrivateByNameMutex.Unlock() 466 fake.FindPrivateByNameStub = stub 467 } 468 469 func (fake *FakeDomainRepository) FindPrivateByNameArgsForCall(i int) string { 470 fake.findPrivateByNameMutex.RLock() 471 defer fake.findPrivateByNameMutex.RUnlock() 472 argsForCall := fake.findPrivateByNameArgsForCall[i] 473 return argsForCall.arg1 474 } 475 476 func (fake *FakeDomainRepository) FindPrivateByNameReturns(result1 models.DomainFields, result2 error) { 477 fake.findPrivateByNameMutex.Lock() 478 defer fake.findPrivateByNameMutex.Unlock() 479 fake.FindPrivateByNameStub = nil 480 fake.findPrivateByNameReturns = struct { 481 result1 models.DomainFields 482 result2 error 483 }{result1, result2} 484 } 485 486 func (fake *FakeDomainRepository) FindPrivateByNameReturnsOnCall(i int, result1 models.DomainFields, result2 error) { 487 fake.findPrivateByNameMutex.Lock() 488 defer fake.findPrivateByNameMutex.Unlock() 489 fake.FindPrivateByNameStub = nil 490 if fake.findPrivateByNameReturnsOnCall == nil { 491 fake.findPrivateByNameReturnsOnCall = make(map[int]struct { 492 result1 models.DomainFields 493 result2 error 494 }) 495 } 496 fake.findPrivateByNameReturnsOnCall[i] = struct { 497 result1 models.DomainFields 498 result2 error 499 }{result1, result2} 500 } 501 502 func (fake *FakeDomainRepository) FindSharedByName(arg1 string) (models.DomainFields, error) { 503 fake.findSharedByNameMutex.Lock() 504 ret, specificReturn := fake.findSharedByNameReturnsOnCall[len(fake.findSharedByNameArgsForCall)] 505 fake.findSharedByNameArgsForCall = append(fake.findSharedByNameArgsForCall, struct { 506 arg1 string 507 }{arg1}) 508 fake.recordInvocation("FindSharedByName", []interface{}{arg1}) 509 fake.findSharedByNameMutex.Unlock() 510 if fake.FindSharedByNameStub != nil { 511 return fake.FindSharedByNameStub(arg1) 512 } 513 if specificReturn { 514 return ret.result1, ret.result2 515 } 516 fakeReturns := fake.findSharedByNameReturns 517 return fakeReturns.result1, fakeReturns.result2 518 } 519 520 func (fake *FakeDomainRepository) FindSharedByNameCallCount() int { 521 fake.findSharedByNameMutex.RLock() 522 defer fake.findSharedByNameMutex.RUnlock() 523 return len(fake.findSharedByNameArgsForCall) 524 } 525 526 func (fake *FakeDomainRepository) FindSharedByNameCalls(stub func(string) (models.DomainFields, error)) { 527 fake.findSharedByNameMutex.Lock() 528 defer fake.findSharedByNameMutex.Unlock() 529 fake.FindSharedByNameStub = stub 530 } 531 532 func (fake *FakeDomainRepository) FindSharedByNameArgsForCall(i int) string { 533 fake.findSharedByNameMutex.RLock() 534 defer fake.findSharedByNameMutex.RUnlock() 535 argsForCall := fake.findSharedByNameArgsForCall[i] 536 return argsForCall.arg1 537 } 538 539 func (fake *FakeDomainRepository) FindSharedByNameReturns(result1 models.DomainFields, result2 error) { 540 fake.findSharedByNameMutex.Lock() 541 defer fake.findSharedByNameMutex.Unlock() 542 fake.FindSharedByNameStub = nil 543 fake.findSharedByNameReturns = struct { 544 result1 models.DomainFields 545 result2 error 546 }{result1, result2} 547 } 548 549 func (fake *FakeDomainRepository) FindSharedByNameReturnsOnCall(i int, result1 models.DomainFields, result2 error) { 550 fake.findSharedByNameMutex.Lock() 551 defer fake.findSharedByNameMutex.Unlock() 552 fake.FindSharedByNameStub = nil 553 if fake.findSharedByNameReturnsOnCall == nil { 554 fake.findSharedByNameReturnsOnCall = make(map[int]struct { 555 result1 models.DomainFields 556 result2 error 557 }) 558 } 559 fake.findSharedByNameReturnsOnCall[i] = struct { 560 result1 models.DomainFields 561 result2 error 562 }{result1, result2} 563 } 564 565 func (fake *FakeDomainRepository) FirstOrDefault(arg1 string, arg2 *string) (models.DomainFields, error) { 566 fake.firstOrDefaultMutex.Lock() 567 ret, specificReturn := fake.firstOrDefaultReturnsOnCall[len(fake.firstOrDefaultArgsForCall)] 568 fake.firstOrDefaultArgsForCall = append(fake.firstOrDefaultArgsForCall, struct { 569 arg1 string 570 arg2 *string 571 }{arg1, arg2}) 572 fake.recordInvocation("FirstOrDefault", []interface{}{arg1, arg2}) 573 fake.firstOrDefaultMutex.Unlock() 574 if fake.FirstOrDefaultStub != nil { 575 return fake.FirstOrDefaultStub(arg1, arg2) 576 } 577 if specificReturn { 578 return ret.result1, ret.result2 579 } 580 fakeReturns := fake.firstOrDefaultReturns 581 return fakeReturns.result1, fakeReturns.result2 582 } 583 584 func (fake *FakeDomainRepository) FirstOrDefaultCallCount() int { 585 fake.firstOrDefaultMutex.RLock() 586 defer fake.firstOrDefaultMutex.RUnlock() 587 return len(fake.firstOrDefaultArgsForCall) 588 } 589 590 func (fake *FakeDomainRepository) FirstOrDefaultCalls(stub func(string, *string) (models.DomainFields, error)) { 591 fake.firstOrDefaultMutex.Lock() 592 defer fake.firstOrDefaultMutex.Unlock() 593 fake.FirstOrDefaultStub = stub 594 } 595 596 func (fake *FakeDomainRepository) FirstOrDefaultArgsForCall(i int) (string, *string) { 597 fake.firstOrDefaultMutex.RLock() 598 defer fake.firstOrDefaultMutex.RUnlock() 599 argsForCall := fake.firstOrDefaultArgsForCall[i] 600 return argsForCall.arg1, argsForCall.arg2 601 } 602 603 func (fake *FakeDomainRepository) FirstOrDefaultReturns(result1 models.DomainFields, result2 error) { 604 fake.firstOrDefaultMutex.Lock() 605 defer fake.firstOrDefaultMutex.Unlock() 606 fake.FirstOrDefaultStub = nil 607 fake.firstOrDefaultReturns = struct { 608 result1 models.DomainFields 609 result2 error 610 }{result1, result2} 611 } 612 613 func (fake *FakeDomainRepository) FirstOrDefaultReturnsOnCall(i int, result1 models.DomainFields, result2 error) { 614 fake.firstOrDefaultMutex.Lock() 615 defer fake.firstOrDefaultMutex.Unlock() 616 fake.FirstOrDefaultStub = nil 617 if fake.firstOrDefaultReturnsOnCall == nil { 618 fake.firstOrDefaultReturnsOnCall = make(map[int]struct { 619 result1 models.DomainFields 620 result2 error 621 }) 622 } 623 fake.firstOrDefaultReturnsOnCall[i] = struct { 624 result1 models.DomainFields 625 result2 error 626 }{result1, result2} 627 } 628 629 func (fake *FakeDomainRepository) ListDomainsForOrg(arg1 string, arg2 func(models.DomainFields) bool) error { 630 fake.listDomainsForOrgMutex.Lock() 631 ret, specificReturn := fake.listDomainsForOrgReturnsOnCall[len(fake.listDomainsForOrgArgsForCall)] 632 fake.listDomainsForOrgArgsForCall = append(fake.listDomainsForOrgArgsForCall, struct { 633 arg1 string 634 arg2 func(models.DomainFields) bool 635 }{arg1, arg2}) 636 fake.recordInvocation("ListDomainsForOrg", []interface{}{arg1, arg2}) 637 fake.listDomainsForOrgMutex.Unlock() 638 if fake.ListDomainsForOrgStub != nil { 639 return fake.ListDomainsForOrgStub(arg1, arg2) 640 } 641 if specificReturn { 642 return ret.result1 643 } 644 fakeReturns := fake.listDomainsForOrgReturns 645 return fakeReturns.result1 646 } 647 648 func (fake *FakeDomainRepository) ListDomainsForOrgCallCount() int { 649 fake.listDomainsForOrgMutex.RLock() 650 defer fake.listDomainsForOrgMutex.RUnlock() 651 return len(fake.listDomainsForOrgArgsForCall) 652 } 653 654 func (fake *FakeDomainRepository) ListDomainsForOrgCalls(stub func(string, func(models.DomainFields) bool) error) { 655 fake.listDomainsForOrgMutex.Lock() 656 defer fake.listDomainsForOrgMutex.Unlock() 657 fake.ListDomainsForOrgStub = stub 658 } 659 660 func (fake *FakeDomainRepository) ListDomainsForOrgArgsForCall(i int) (string, func(models.DomainFields) bool) { 661 fake.listDomainsForOrgMutex.RLock() 662 defer fake.listDomainsForOrgMutex.RUnlock() 663 argsForCall := fake.listDomainsForOrgArgsForCall[i] 664 return argsForCall.arg1, argsForCall.arg2 665 } 666 667 func (fake *FakeDomainRepository) ListDomainsForOrgReturns(result1 error) { 668 fake.listDomainsForOrgMutex.Lock() 669 defer fake.listDomainsForOrgMutex.Unlock() 670 fake.ListDomainsForOrgStub = nil 671 fake.listDomainsForOrgReturns = struct { 672 result1 error 673 }{result1} 674 } 675 676 func (fake *FakeDomainRepository) ListDomainsForOrgReturnsOnCall(i int, result1 error) { 677 fake.listDomainsForOrgMutex.Lock() 678 defer fake.listDomainsForOrgMutex.Unlock() 679 fake.ListDomainsForOrgStub = nil 680 if fake.listDomainsForOrgReturnsOnCall == nil { 681 fake.listDomainsForOrgReturnsOnCall = make(map[int]struct { 682 result1 error 683 }) 684 } 685 fake.listDomainsForOrgReturnsOnCall[i] = struct { 686 result1 error 687 }{result1} 688 } 689 690 func (fake *FakeDomainRepository) Invocations() map[string][][]interface{} { 691 fake.invocationsMutex.RLock() 692 defer fake.invocationsMutex.RUnlock() 693 fake.createMutex.RLock() 694 defer fake.createMutex.RUnlock() 695 fake.createSharedDomainMutex.RLock() 696 defer fake.createSharedDomainMutex.RUnlock() 697 fake.deleteMutex.RLock() 698 defer fake.deleteMutex.RUnlock() 699 fake.deleteSharedDomainMutex.RLock() 700 defer fake.deleteSharedDomainMutex.RUnlock() 701 fake.findByNameInOrgMutex.RLock() 702 defer fake.findByNameInOrgMutex.RUnlock() 703 fake.findPrivateByNameMutex.RLock() 704 defer fake.findPrivateByNameMutex.RUnlock() 705 fake.findSharedByNameMutex.RLock() 706 defer fake.findSharedByNameMutex.RUnlock() 707 fake.firstOrDefaultMutex.RLock() 708 defer fake.firstOrDefaultMutex.RUnlock() 709 fake.listDomainsForOrgMutex.RLock() 710 defer fake.listDomainsForOrgMutex.RUnlock() 711 copiedInvocations := map[string][][]interface{}{} 712 for key, value := range fake.invocations { 713 copiedInvocations[key] = value 714 } 715 return copiedInvocations 716 } 717 718 func (fake *FakeDomainRepository) recordInvocation(key string, args []interface{}) { 719 fake.invocationsMutex.Lock() 720 defer fake.invocationsMutex.Unlock() 721 if fake.invocations == nil { 722 fake.invocations = map[string][][]interface{}{} 723 } 724 if fake.invocations[key] == nil { 725 fake.invocations[key] = [][]interface{}{} 726 } 727 fake.invocations[key] = append(fake.invocations[key], args) 728 } 729 730 var _ api.DomainRepository = new(FakeDomainRepository)