github.com/IBM-Blockchain/fabric-operator@v1.0.4/pkg/initializer/ca/mocks/config.go (about) 1 // Code generated by counterfeiter. DO NOT EDIT. 2 package mocks 3 4 import ( 5 "sync" 6 7 v1 "github.com/IBM-Blockchain/fabric-operator/pkg/apis/ca/v1" 8 initializer "github.com/IBM-Blockchain/fabric-operator/pkg/initializer/ca" 9 "github.com/IBM-Blockchain/fabric-operator/pkg/initializer/ca/config" 10 ) 11 12 type CAConfig struct { 13 GetHomeDirStub func() string 14 getHomeDirMutex sync.RWMutex 15 getHomeDirArgsForCall []struct { 16 } 17 getHomeDirReturns struct { 18 result1 string 19 } 20 getHomeDirReturnsOnCall map[int]struct { 21 result1 string 22 } 23 GetServerConfigStub func() *v1.ServerConfig 24 getServerConfigMutex sync.RWMutex 25 getServerConfigArgsForCall []struct { 26 } 27 getServerConfigReturns struct { 28 result1 *v1.ServerConfig 29 } 30 getServerConfigReturnsOnCall map[int]struct { 31 result1 *v1.ServerConfig 32 } 33 ParseCABlockStub func() (map[string][]byte, error) 34 parseCABlockMutex sync.RWMutex 35 parseCABlockArgsForCall []struct { 36 } 37 parseCABlockReturns struct { 38 result1 map[string][]byte 39 result2 error 40 } 41 parseCABlockReturnsOnCall map[int]struct { 42 result1 map[string][]byte 43 result2 error 44 } 45 ParseDBBlockStub func() (map[string][]byte, error) 46 parseDBBlockMutex sync.RWMutex 47 parseDBBlockArgsForCall []struct { 48 } 49 parseDBBlockReturns struct { 50 result1 map[string][]byte 51 result2 error 52 } 53 parseDBBlockReturnsOnCall map[int]struct { 54 result1 map[string][]byte 55 result2 error 56 } 57 ParseIntermediateBlockStub func() (map[string][]byte, error) 58 parseIntermediateBlockMutex sync.RWMutex 59 parseIntermediateBlockArgsForCall []struct { 60 } 61 parseIntermediateBlockReturns struct { 62 result1 map[string][]byte 63 result2 error 64 } 65 parseIntermediateBlockReturnsOnCall map[int]struct { 66 result1 map[string][]byte 67 result2 error 68 } 69 ParseOperationsBlockStub func() (map[string][]byte, error) 70 parseOperationsBlockMutex sync.RWMutex 71 parseOperationsBlockArgsForCall []struct { 72 } 73 parseOperationsBlockReturns struct { 74 result1 map[string][]byte 75 result2 error 76 } 77 parseOperationsBlockReturnsOnCall map[int]struct { 78 result1 map[string][]byte 79 result2 error 80 } 81 ParseTLSBlockStub func() (map[string][]byte, error) 82 parseTLSBlockMutex sync.RWMutex 83 parseTLSBlockArgsForCall []struct { 84 } 85 parseTLSBlockReturns struct { 86 result1 map[string][]byte 87 result2 error 88 } 89 parseTLSBlockReturnsOnCall map[int]struct { 90 result1 map[string][]byte 91 result2 error 92 } 93 SetMountPathsStub func(config.Type) 94 setMountPathsMutex sync.RWMutex 95 setMountPathsArgsForCall []struct { 96 arg1 config.Type 97 } 98 SetServerConfigStub func(*v1.ServerConfig) 99 setServerConfigMutex sync.RWMutex 100 setServerConfigArgsForCall []struct { 101 arg1 *v1.ServerConfig 102 } 103 SetUpdateStub func(bool) 104 setUpdateMutex sync.RWMutex 105 setUpdateArgsForCall []struct { 106 arg1 bool 107 } 108 UsingPKCS11Stub func() bool 109 usingPKCS11Mutex sync.RWMutex 110 usingPKCS11ArgsForCall []struct { 111 } 112 usingPKCS11Returns struct { 113 result1 bool 114 } 115 usingPKCS11ReturnsOnCall map[int]struct { 116 result1 bool 117 } 118 invocations map[string][][]interface{} 119 invocationsMutex sync.RWMutex 120 } 121 122 func (fake *CAConfig) GetHomeDir() string { 123 fake.getHomeDirMutex.Lock() 124 ret, specificReturn := fake.getHomeDirReturnsOnCall[len(fake.getHomeDirArgsForCall)] 125 fake.getHomeDirArgsForCall = append(fake.getHomeDirArgsForCall, struct { 126 }{}) 127 stub := fake.GetHomeDirStub 128 fakeReturns := fake.getHomeDirReturns 129 fake.recordInvocation("GetHomeDir", []interface{}{}) 130 fake.getHomeDirMutex.Unlock() 131 if stub != nil { 132 return stub() 133 } 134 if specificReturn { 135 return ret.result1 136 } 137 return fakeReturns.result1 138 } 139 140 func (fake *CAConfig) GetHomeDirCallCount() int { 141 fake.getHomeDirMutex.RLock() 142 defer fake.getHomeDirMutex.RUnlock() 143 return len(fake.getHomeDirArgsForCall) 144 } 145 146 func (fake *CAConfig) GetHomeDirCalls(stub func() string) { 147 fake.getHomeDirMutex.Lock() 148 defer fake.getHomeDirMutex.Unlock() 149 fake.GetHomeDirStub = stub 150 } 151 152 func (fake *CAConfig) GetHomeDirReturns(result1 string) { 153 fake.getHomeDirMutex.Lock() 154 defer fake.getHomeDirMutex.Unlock() 155 fake.GetHomeDirStub = nil 156 fake.getHomeDirReturns = struct { 157 result1 string 158 }{result1} 159 } 160 161 func (fake *CAConfig) GetHomeDirReturnsOnCall(i int, result1 string) { 162 fake.getHomeDirMutex.Lock() 163 defer fake.getHomeDirMutex.Unlock() 164 fake.GetHomeDirStub = nil 165 if fake.getHomeDirReturnsOnCall == nil { 166 fake.getHomeDirReturnsOnCall = make(map[int]struct { 167 result1 string 168 }) 169 } 170 fake.getHomeDirReturnsOnCall[i] = struct { 171 result1 string 172 }{result1} 173 } 174 175 func (fake *CAConfig) GetServerConfig() *v1.ServerConfig { 176 fake.getServerConfigMutex.Lock() 177 ret, specificReturn := fake.getServerConfigReturnsOnCall[len(fake.getServerConfigArgsForCall)] 178 fake.getServerConfigArgsForCall = append(fake.getServerConfigArgsForCall, struct { 179 }{}) 180 stub := fake.GetServerConfigStub 181 fakeReturns := fake.getServerConfigReturns 182 fake.recordInvocation("GetServerConfig", []interface{}{}) 183 fake.getServerConfigMutex.Unlock() 184 if stub != nil { 185 return stub() 186 } 187 if specificReturn { 188 return ret.result1 189 } 190 return fakeReturns.result1 191 } 192 193 func (fake *CAConfig) GetServerConfigCallCount() int { 194 fake.getServerConfigMutex.RLock() 195 defer fake.getServerConfigMutex.RUnlock() 196 return len(fake.getServerConfigArgsForCall) 197 } 198 199 func (fake *CAConfig) GetServerConfigCalls(stub func() *v1.ServerConfig) { 200 fake.getServerConfigMutex.Lock() 201 defer fake.getServerConfigMutex.Unlock() 202 fake.GetServerConfigStub = stub 203 } 204 205 func (fake *CAConfig) GetServerConfigReturns(result1 *v1.ServerConfig) { 206 fake.getServerConfigMutex.Lock() 207 defer fake.getServerConfigMutex.Unlock() 208 fake.GetServerConfigStub = nil 209 fake.getServerConfigReturns = struct { 210 result1 *v1.ServerConfig 211 }{result1} 212 } 213 214 func (fake *CAConfig) GetServerConfigReturnsOnCall(i int, result1 *v1.ServerConfig) { 215 fake.getServerConfigMutex.Lock() 216 defer fake.getServerConfigMutex.Unlock() 217 fake.GetServerConfigStub = nil 218 if fake.getServerConfigReturnsOnCall == nil { 219 fake.getServerConfigReturnsOnCall = make(map[int]struct { 220 result1 *v1.ServerConfig 221 }) 222 } 223 fake.getServerConfigReturnsOnCall[i] = struct { 224 result1 *v1.ServerConfig 225 }{result1} 226 } 227 228 func (fake *CAConfig) ParseCABlock() (map[string][]byte, error) { 229 fake.parseCABlockMutex.Lock() 230 ret, specificReturn := fake.parseCABlockReturnsOnCall[len(fake.parseCABlockArgsForCall)] 231 fake.parseCABlockArgsForCall = append(fake.parseCABlockArgsForCall, struct { 232 }{}) 233 stub := fake.ParseCABlockStub 234 fakeReturns := fake.parseCABlockReturns 235 fake.recordInvocation("ParseCABlock", []interface{}{}) 236 fake.parseCABlockMutex.Unlock() 237 if stub != nil { 238 return stub() 239 } 240 if specificReturn { 241 return ret.result1, ret.result2 242 } 243 return fakeReturns.result1, fakeReturns.result2 244 } 245 246 func (fake *CAConfig) ParseCABlockCallCount() int { 247 fake.parseCABlockMutex.RLock() 248 defer fake.parseCABlockMutex.RUnlock() 249 return len(fake.parseCABlockArgsForCall) 250 } 251 252 func (fake *CAConfig) ParseCABlockCalls(stub func() (map[string][]byte, error)) { 253 fake.parseCABlockMutex.Lock() 254 defer fake.parseCABlockMutex.Unlock() 255 fake.ParseCABlockStub = stub 256 } 257 258 func (fake *CAConfig) ParseCABlockReturns(result1 map[string][]byte, result2 error) { 259 fake.parseCABlockMutex.Lock() 260 defer fake.parseCABlockMutex.Unlock() 261 fake.ParseCABlockStub = nil 262 fake.parseCABlockReturns = struct { 263 result1 map[string][]byte 264 result2 error 265 }{result1, result2} 266 } 267 268 func (fake *CAConfig) ParseCABlockReturnsOnCall(i int, result1 map[string][]byte, result2 error) { 269 fake.parseCABlockMutex.Lock() 270 defer fake.parseCABlockMutex.Unlock() 271 fake.ParseCABlockStub = nil 272 if fake.parseCABlockReturnsOnCall == nil { 273 fake.parseCABlockReturnsOnCall = make(map[int]struct { 274 result1 map[string][]byte 275 result2 error 276 }) 277 } 278 fake.parseCABlockReturnsOnCall[i] = struct { 279 result1 map[string][]byte 280 result2 error 281 }{result1, result2} 282 } 283 284 func (fake *CAConfig) ParseDBBlock() (map[string][]byte, error) { 285 fake.parseDBBlockMutex.Lock() 286 ret, specificReturn := fake.parseDBBlockReturnsOnCall[len(fake.parseDBBlockArgsForCall)] 287 fake.parseDBBlockArgsForCall = append(fake.parseDBBlockArgsForCall, struct { 288 }{}) 289 stub := fake.ParseDBBlockStub 290 fakeReturns := fake.parseDBBlockReturns 291 fake.recordInvocation("ParseDBBlock", []interface{}{}) 292 fake.parseDBBlockMutex.Unlock() 293 if stub != nil { 294 return stub() 295 } 296 if specificReturn { 297 return ret.result1, ret.result2 298 } 299 return fakeReturns.result1, fakeReturns.result2 300 } 301 302 func (fake *CAConfig) ParseDBBlockCallCount() int { 303 fake.parseDBBlockMutex.RLock() 304 defer fake.parseDBBlockMutex.RUnlock() 305 return len(fake.parseDBBlockArgsForCall) 306 } 307 308 func (fake *CAConfig) ParseDBBlockCalls(stub func() (map[string][]byte, error)) { 309 fake.parseDBBlockMutex.Lock() 310 defer fake.parseDBBlockMutex.Unlock() 311 fake.ParseDBBlockStub = stub 312 } 313 314 func (fake *CAConfig) ParseDBBlockReturns(result1 map[string][]byte, result2 error) { 315 fake.parseDBBlockMutex.Lock() 316 defer fake.parseDBBlockMutex.Unlock() 317 fake.ParseDBBlockStub = nil 318 fake.parseDBBlockReturns = struct { 319 result1 map[string][]byte 320 result2 error 321 }{result1, result2} 322 } 323 324 func (fake *CAConfig) ParseDBBlockReturnsOnCall(i int, result1 map[string][]byte, result2 error) { 325 fake.parseDBBlockMutex.Lock() 326 defer fake.parseDBBlockMutex.Unlock() 327 fake.ParseDBBlockStub = nil 328 if fake.parseDBBlockReturnsOnCall == nil { 329 fake.parseDBBlockReturnsOnCall = make(map[int]struct { 330 result1 map[string][]byte 331 result2 error 332 }) 333 } 334 fake.parseDBBlockReturnsOnCall[i] = struct { 335 result1 map[string][]byte 336 result2 error 337 }{result1, result2} 338 } 339 340 func (fake *CAConfig) ParseIntermediateBlock() (map[string][]byte, error) { 341 fake.parseIntermediateBlockMutex.Lock() 342 ret, specificReturn := fake.parseIntermediateBlockReturnsOnCall[len(fake.parseIntermediateBlockArgsForCall)] 343 fake.parseIntermediateBlockArgsForCall = append(fake.parseIntermediateBlockArgsForCall, struct { 344 }{}) 345 stub := fake.ParseIntermediateBlockStub 346 fakeReturns := fake.parseIntermediateBlockReturns 347 fake.recordInvocation("ParseIntermediateBlock", []interface{}{}) 348 fake.parseIntermediateBlockMutex.Unlock() 349 if stub != nil { 350 return stub() 351 } 352 if specificReturn { 353 return ret.result1, ret.result2 354 } 355 return fakeReturns.result1, fakeReturns.result2 356 } 357 358 func (fake *CAConfig) ParseIntermediateBlockCallCount() int { 359 fake.parseIntermediateBlockMutex.RLock() 360 defer fake.parseIntermediateBlockMutex.RUnlock() 361 return len(fake.parseIntermediateBlockArgsForCall) 362 } 363 364 func (fake *CAConfig) ParseIntermediateBlockCalls(stub func() (map[string][]byte, error)) { 365 fake.parseIntermediateBlockMutex.Lock() 366 defer fake.parseIntermediateBlockMutex.Unlock() 367 fake.ParseIntermediateBlockStub = stub 368 } 369 370 func (fake *CAConfig) ParseIntermediateBlockReturns(result1 map[string][]byte, result2 error) { 371 fake.parseIntermediateBlockMutex.Lock() 372 defer fake.parseIntermediateBlockMutex.Unlock() 373 fake.ParseIntermediateBlockStub = nil 374 fake.parseIntermediateBlockReturns = struct { 375 result1 map[string][]byte 376 result2 error 377 }{result1, result2} 378 } 379 380 func (fake *CAConfig) ParseIntermediateBlockReturnsOnCall(i int, result1 map[string][]byte, result2 error) { 381 fake.parseIntermediateBlockMutex.Lock() 382 defer fake.parseIntermediateBlockMutex.Unlock() 383 fake.ParseIntermediateBlockStub = nil 384 if fake.parseIntermediateBlockReturnsOnCall == nil { 385 fake.parseIntermediateBlockReturnsOnCall = make(map[int]struct { 386 result1 map[string][]byte 387 result2 error 388 }) 389 } 390 fake.parseIntermediateBlockReturnsOnCall[i] = struct { 391 result1 map[string][]byte 392 result2 error 393 }{result1, result2} 394 } 395 396 func (fake *CAConfig) ParseOperationsBlock() (map[string][]byte, error) { 397 fake.parseOperationsBlockMutex.Lock() 398 ret, specificReturn := fake.parseOperationsBlockReturnsOnCall[len(fake.parseOperationsBlockArgsForCall)] 399 fake.parseOperationsBlockArgsForCall = append(fake.parseOperationsBlockArgsForCall, struct { 400 }{}) 401 stub := fake.ParseOperationsBlockStub 402 fakeReturns := fake.parseOperationsBlockReturns 403 fake.recordInvocation("ParseOperationsBlock", []interface{}{}) 404 fake.parseOperationsBlockMutex.Unlock() 405 if stub != nil { 406 return stub() 407 } 408 if specificReturn { 409 return ret.result1, ret.result2 410 } 411 return fakeReturns.result1, fakeReturns.result2 412 } 413 414 func (fake *CAConfig) ParseOperationsBlockCallCount() int { 415 fake.parseOperationsBlockMutex.RLock() 416 defer fake.parseOperationsBlockMutex.RUnlock() 417 return len(fake.parseOperationsBlockArgsForCall) 418 } 419 420 func (fake *CAConfig) ParseOperationsBlockCalls(stub func() (map[string][]byte, error)) { 421 fake.parseOperationsBlockMutex.Lock() 422 defer fake.parseOperationsBlockMutex.Unlock() 423 fake.ParseOperationsBlockStub = stub 424 } 425 426 func (fake *CAConfig) ParseOperationsBlockReturns(result1 map[string][]byte, result2 error) { 427 fake.parseOperationsBlockMutex.Lock() 428 defer fake.parseOperationsBlockMutex.Unlock() 429 fake.ParseOperationsBlockStub = nil 430 fake.parseOperationsBlockReturns = struct { 431 result1 map[string][]byte 432 result2 error 433 }{result1, result2} 434 } 435 436 func (fake *CAConfig) ParseOperationsBlockReturnsOnCall(i int, result1 map[string][]byte, result2 error) { 437 fake.parseOperationsBlockMutex.Lock() 438 defer fake.parseOperationsBlockMutex.Unlock() 439 fake.ParseOperationsBlockStub = nil 440 if fake.parseOperationsBlockReturnsOnCall == nil { 441 fake.parseOperationsBlockReturnsOnCall = make(map[int]struct { 442 result1 map[string][]byte 443 result2 error 444 }) 445 } 446 fake.parseOperationsBlockReturnsOnCall[i] = struct { 447 result1 map[string][]byte 448 result2 error 449 }{result1, result2} 450 } 451 452 func (fake *CAConfig) ParseTLSBlock() (map[string][]byte, error) { 453 fake.parseTLSBlockMutex.Lock() 454 ret, specificReturn := fake.parseTLSBlockReturnsOnCall[len(fake.parseTLSBlockArgsForCall)] 455 fake.parseTLSBlockArgsForCall = append(fake.parseTLSBlockArgsForCall, struct { 456 }{}) 457 stub := fake.ParseTLSBlockStub 458 fakeReturns := fake.parseTLSBlockReturns 459 fake.recordInvocation("ParseTLSBlock", []interface{}{}) 460 fake.parseTLSBlockMutex.Unlock() 461 if stub != nil { 462 return stub() 463 } 464 if specificReturn { 465 return ret.result1, ret.result2 466 } 467 return fakeReturns.result1, fakeReturns.result2 468 } 469 470 func (fake *CAConfig) ParseTLSBlockCallCount() int { 471 fake.parseTLSBlockMutex.RLock() 472 defer fake.parseTLSBlockMutex.RUnlock() 473 return len(fake.parseTLSBlockArgsForCall) 474 } 475 476 func (fake *CAConfig) ParseTLSBlockCalls(stub func() (map[string][]byte, error)) { 477 fake.parseTLSBlockMutex.Lock() 478 defer fake.parseTLSBlockMutex.Unlock() 479 fake.ParseTLSBlockStub = stub 480 } 481 482 func (fake *CAConfig) ParseTLSBlockReturns(result1 map[string][]byte, result2 error) { 483 fake.parseTLSBlockMutex.Lock() 484 defer fake.parseTLSBlockMutex.Unlock() 485 fake.ParseTLSBlockStub = nil 486 fake.parseTLSBlockReturns = struct { 487 result1 map[string][]byte 488 result2 error 489 }{result1, result2} 490 } 491 492 func (fake *CAConfig) ParseTLSBlockReturnsOnCall(i int, result1 map[string][]byte, result2 error) { 493 fake.parseTLSBlockMutex.Lock() 494 defer fake.parseTLSBlockMutex.Unlock() 495 fake.ParseTLSBlockStub = nil 496 if fake.parseTLSBlockReturnsOnCall == nil { 497 fake.parseTLSBlockReturnsOnCall = make(map[int]struct { 498 result1 map[string][]byte 499 result2 error 500 }) 501 } 502 fake.parseTLSBlockReturnsOnCall[i] = struct { 503 result1 map[string][]byte 504 result2 error 505 }{result1, result2} 506 } 507 508 func (fake *CAConfig) SetMountPaths(arg1 config.Type) { 509 fake.setMountPathsMutex.Lock() 510 fake.setMountPathsArgsForCall = append(fake.setMountPathsArgsForCall, struct { 511 arg1 config.Type 512 }{arg1}) 513 stub := fake.SetMountPathsStub 514 fake.recordInvocation("SetMountPaths", []interface{}{arg1}) 515 fake.setMountPathsMutex.Unlock() 516 if stub != nil { 517 fake.SetMountPathsStub(arg1) 518 } 519 } 520 521 func (fake *CAConfig) SetMountPathsCallCount() int { 522 fake.setMountPathsMutex.RLock() 523 defer fake.setMountPathsMutex.RUnlock() 524 return len(fake.setMountPathsArgsForCall) 525 } 526 527 func (fake *CAConfig) SetMountPathsCalls(stub func(config.Type)) { 528 fake.setMountPathsMutex.Lock() 529 defer fake.setMountPathsMutex.Unlock() 530 fake.SetMountPathsStub = stub 531 } 532 533 func (fake *CAConfig) SetMountPathsArgsForCall(i int) config.Type { 534 fake.setMountPathsMutex.RLock() 535 defer fake.setMountPathsMutex.RUnlock() 536 argsForCall := fake.setMountPathsArgsForCall[i] 537 return argsForCall.arg1 538 } 539 540 func (fake *CAConfig) SetServerConfig(arg1 *v1.ServerConfig) { 541 fake.setServerConfigMutex.Lock() 542 fake.setServerConfigArgsForCall = append(fake.setServerConfigArgsForCall, struct { 543 arg1 *v1.ServerConfig 544 }{arg1}) 545 stub := fake.SetServerConfigStub 546 fake.recordInvocation("SetServerConfig", []interface{}{arg1}) 547 fake.setServerConfigMutex.Unlock() 548 if stub != nil { 549 fake.SetServerConfigStub(arg1) 550 } 551 } 552 553 func (fake *CAConfig) SetServerConfigCallCount() int { 554 fake.setServerConfigMutex.RLock() 555 defer fake.setServerConfigMutex.RUnlock() 556 return len(fake.setServerConfigArgsForCall) 557 } 558 559 func (fake *CAConfig) SetServerConfigCalls(stub func(*v1.ServerConfig)) { 560 fake.setServerConfigMutex.Lock() 561 defer fake.setServerConfigMutex.Unlock() 562 fake.SetServerConfigStub = stub 563 } 564 565 func (fake *CAConfig) SetServerConfigArgsForCall(i int) *v1.ServerConfig { 566 fake.setServerConfigMutex.RLock() 567 defer fake.setServerConfigMutex.RUnlock() 568 argsForCall := fake.setServerConfigArgsForCall[i] 569 return argsForCall.arg1 570 } 571 572 func (fake *CAConfig) SetUpdate(arg1 bool) { 573 fake.setUpdateMutex.Lock() 574 fake.setUpdateArgsForCall = append(fake.setUpdateArgsForCall, struct { 575 arg1 bool 576 }{arg1}) 577 stub := fake.SetUpdateStub 578 fake.recordInvocation("SetUpdate", []interface{}{arg1}) 579 fake.setUpdateMutex.Unlock() 580 if stub != nil { 581 fake.SetUpdateStub(arg1) 582 } 583 } 584 585 func (fake *CAConfig) SetUpdateCallCount() int { 586 fake.setUpdateMutex.RLock() 587 defer fake.setUpdateMutex.RUnlock() 588 return len(fake.setUpdateArgsForCall) 589 } 590 591 func (fake *CAConfig) SetUpdateCalls(stub func(bool)) { 592 fake.setUpdateMutex.Lock() 593 defer fake.setUpdateMutex.Unlock() 594 fake.SetUpdateStub = stub 595 } 596 597 func (fake *CAConfig) SetUpdateArgsForCall(i int) bool { 598 fake.setUpdateMutex.RLock() 599 defer fake.setUpdateMutex.RUnlock() 600 argsForCall := fake.setUpdateArgsForCall[i] 601 return argsForCall.arg1 602 } 603 604 func (fake *CAConfig) UsingPKCS11() bool { 605 fake.usingPKCS11Mutex.Lock() 606 ret, specificReturn := fake.usingPKCS11ReturnsOnCall[len(fake.usingPKCS11ArgsForCall)] 607 fake.usingPKCS11ArgsForCall = append(fake.usingPKCS11ArgsForCall, struct { 608 }{}) 609 stub := fake.UsingPKCS11Stub 610 fakeReturns := fake.usingPKCS11Returns 611 fake.recordInvocation("UsingPKCS11", []interface{}{}) 612 fake.usingPKCS11Mutex.Unlock() 613 if stub != nil { 614 return stub() 615 } 616 if specificReturn { 617 return ret.result1 618 } 619 return fakeReturns.result1 620 } 621 622 func (fake *CAConfig) UsingPKCS11CallCount() int { 623 fake.usingPKCS11Mutex.RLock() 624 defer fake.usingPKCS11Mutex.RUnlock() 625 return len(fake.usingPKCS11ArgsForCall) 626 } 627 628 func (fake *CAConfig) UsingPKCS11Calls(stub func() bool) { 629 fake.usingPKCS11Mutex.Lock() 630 defer fake.usingPKCS11Mutex.Unlock() 631 fake.UsingPKCS11Stub = stub 632 } 633 634 func (fake *CAConfig) UsingPKCS11Returns(result1 bool) { 635 fake.usingPKCS11Mutex.Lock() 636 defer fake.usingPKCS11Mutex.Unlock() 637 fake.UsingPKCS11Stub = nil 638 fake.usingPKCS11Returns = struct { 639 result1 bool 640 }{result1} 641 } 642 643 func (fake *CAConfig) UsingPKCS11ReturnsOnCall(i int, result1 bool) { 644 fake.usingPKCS11Mutex.Lock() 645 defer fake.usingPKCS11Mutex.Unlock() 646 fake.UsingPKCS11Stub = nil 647 if fake.usingPKCS11ReturnsOnCall == nil { 648 fake.usingPKCS11ReturnsOnCall = make(map[int]struct { 649 result1 bool 650 }) 651 } 652 fake.usingPKCS11ReturnsOnCall[i] = struct { 653 result1 bool 654 }{result1} 655 } 656 657 func (fake *CAConfig) Invocations() map[string][][]interface{} { 658 fake.invocationsMutex.RLock() 659 defer fake.invocationsMutex.RUnlock() 660 fake.getHomeDirMutex.RLock() 661 defer fake.getHomeDirMutex.RUnlock() 662 fake.getServerConfigMutex.RLock() 663 defer fake.getServerConfigMutex.RUnlock() 664 fake.parseCABlockMutex.RLock() 665 defer fake.parseCABlockMutex.RUnlock() 666 fake.parseDBBlockMutex.RLock() 667 defer fake.parseDBBlockMutex.RUnlock() 668 fake.parseIntermediateBlockMutex.RLock() 669 defer fake.parseIntermediateBlockMutex.RUnlock() 670 fake.parseOperationsBlockMutex.RLock() 671 defer fake.parseOperationsBlockMutex.RUnlock() 672 fake.parseTLSBlockMutex.RLock() 673 defer fake.parseTLSBlockMutex.RUnlock() 674 fake.setMountPathsMutex.RLock() 675 defer fake.setMountPathsMutex.RUnlock() 676 fake.setServerConfigMutex.RLock() 677 defer fake.setServerConfigMutex.RUnlock() 678 fake.setUpdateMutex.RLock() 679 defer fake.setUpdateMutex.RUnlock() 680 fake.usingPKCS11Mutex.RLock() 681 defer fake.usingPKCS11Mutex.RUnlock() 682 copiedInvocations := map[string][][]interface{}{} 683 for key, value := range fake.invocations { 684 copiedInvocations[key] = value 685 } 686 return copiedInvocations 687 } 688 689 func (fake *CAConfig) recordInvocation(key string, args []interface{}) { 690 fake.invocationsMutex.Lock() 691 defer fake.invocationsMutex.Unlock() 692 if fake.invocations == nil { 693 fake.invocations = map[string][][]interface{}{} 694 } 695 if fake.invocations[key] == nil { 696 fake.invocations[key] = [][]interface{}{} 697 } 698 fake.invocations[key] = append(fake.invocations[key], args) 699 } 700 701 var _ initializer.CAConfig = new(CAConfig)