github.com/hyperledger-labs/bdls@v2.1.1+incompatible/core/chaincode/lifecycle/mock/msp.go (about) 1 // Code generated by counterfeiter. DO NOT EDIT. 2 package mock 3 4 import ( 5 "sync" 6 7 mspa "github.com/hyperledger/fabric-protos-go/msp" 8 "github.com/hyperledger/fabric/msp" 9 ) 10 11 type MSP struct { 12 DeserializeIdentityStub func([]byte) (msp.Identity, error) 13 deserializeIdentityMutex sync.RWMutex 14 deserializeIdentityArgsForCall []struct { 15 arg1 []byte 16 } 17 deserializeIdentityReturns struct { 18 result1 msp.Identity 19 result2 error 20 } 21 deserializeIdentityReturnsOnCall map[int]struct { 22 result1 msp.Identity 23 result2 error 24 } 25 GetDefaultSigningIdentityStub func() (msp.SigningIdentity, error) 26 getDefaultSigningIdentityMutex sync.RWMutex 27 getDefaultSigningIdentityArgsForCall []struct { 28 } 29 getDefaultSigningIdentityReturns struct { 30 result1 msp.SigningIdentity 31 result2 error 32 } 33 getDefaultSigningIdentityReturnsOnCall map[int]struct { 34 result1 msp.SigningIdentity 35 result2 error 36 } 37 GetIdentifierStub func() (string, error) 38 getIdentifierMutex sync.RWMutex 39 getIdentifierArgsForCall []struct { 40 } 41 getIdentifierReturns struct { 42 result1 string 43 result2 error 44 } 45 getIdentifierReturnsOnCall map[int]struct { 46 result1 string 47 result2 error 48 } 49 GetSigningIdentityStub func(*msp.IdentityIdentifier) (msp.SigningIdentity, error) 50 getSigningIdentityMutex sync.RWMutex 51 getSigningIdentityArgsForCall []struct { 52 arg1 *msp.IdentityIdentifier 53 } 54 getSigningIdentityReturns struct { 55 result1 msp.SigningIdentity 56 result2 error 57 } 58 getSigningIdentityReturnsOnCall map[int]struct { 59 result1 msp.SigningIdentity 60 result2 error 61 } 62 GetTLSIntermediateCertsStub func() [][]byte 63 getTLSIntermediateCertsMutex sync.RWMutex 64 getTLSIntermediateCertsArgsForCall []struct { 65 } 66 getTLSIntermediateCertsReturns struct { 67 result1 [][]byte 68 } 69 getTLSIntermediateCertsReturnsOnCall map[int]struct { 70 result1 [][]byte 71 } 72 GetTLSRootCertsStub func() [][]byte 73 getTLSRootCertsMutex sync.RWMutex 74 getTLSRootCertsArgsForCall []struct { 75 } 76 getTLSRootCertsReturns struct { 77 result1 [][]byte 78 } 79 getTLSRootCertsReturnsOnCall map[int]struct { 80 result1 [][]byte 81 } 82 GetTypeStub func() msp.ProviderType 83 getTypeMutex sync.RWMutex 84 getTypeArgsForCall []struct { 85 } 86 getTypeReturns struct { 87 result1 msp.ProviderType 88 } 89 getTypeReturnsOnCall map[int]struct { 90 result1 msp.ProviderType 91 } 92 GetVersionStub func() msp.MSPVersion 93 getVersionMutex sync.RWMutex 94 getVersionArgsForCall []struct { 95 } 96 getVersionReturns struct { 97 result1 msp.MSPVersion 98 } 99 getVersionReturnsOnCall map[int]struct { 100 result1 msp.MSPVersion 101 } 102 IsWellFormedStub func(*mspa.SerializedIdentity) error 103 isWellFormedMutex sync.RWMutex 104 isWellFormedArgsForCall []struct { 105 arg1 *mspa.SerializedIdentity 106 } 107 isWellFormedReturns struct { 108 result1 error 109 } 110 isWellFormedReturnsOnCall map[int]struct { 111 result1 error 112 } 113 SatisfiesPrincipalStub func(msp.Identity, *mspa.MSPPrincipal) error 114 satisfiesPrincipalMutex sync.RWMutex 115 satisfiesPrincipalArgsForCall []struct { 116 arg1 msp.Identity 117 arg2 *mspa.MSPPrincipal 118 } 119 satisfiesPrincipalReturns struct { 120 result1 error 121 } 122 satisfiesPrincipalReturnsOnCall map[int]struct { 123 result1 error 124 } 125 SetupStub func(*mspa.MSPConfig) error 126 setupMutex sync.RWMutex 127 setupArgsForCall []struct { 128 arg1 *mspa.MSPConfig 129 } 130 setupReturns struct { 131 result1 error 132 } 133 setupReturnsOnCall map[int]struct { 134 result1 error 135 } 136 ValidateStub func(msp.Identity) error 137 validateMutex sync.RWMutex 138 validateArgsForCall []struct { 139 arg1 msp.Identity 140 } 141 validateReturns struct { 142 result1 error 143 } 144 validateReturnsOnCall map[int]struct { 145 result1 error 146 } 147 invocations map[string][][]interface{} 148 invocationsMutex sync.RWMutex 149 } 150 151 func (fake *MSP) DeserializeIdentity(arg1 []byte) (msp.Identity, error) { 152 var arg1Copy []byte 153 if arg1 != nil { 154 arg1Copy = make([]byte, len(arg1)) 155 copy(arg1Copy, arg1) 156 } 157 fake.deserializeIdentityMutex.Lock() 158 ret, specificReturn := fake.deserializeIdentityReturnsOnCall[len(fake.deserializeIdentityArgsForCall)] 159 fake.deserializeIdentityArgsForCall = append(fake.deserializeIdentityArgsForCall, struct { 160 arg1 []byte 161 }{arg1Copy}) 162 fake.recordInvocation("DeserializeIdentity", []interface{}{arg1Copy}) 163 fake.deserializeIdentityMutex.Unlock() 164 if fake.DeserializeIdentityStub != nil { 165 return fake.DeserializeIdentityStub(arg1) 166 } 167 if specificReturn { 168 return ret.result1, ret.result2 169 } 170 fakeReturns := fake.deserializeIdentityReturns 171 return fakeReturns.result1, fakeReturns.result2 172 } 173 174 func (fake *MSP) DeserializeIdentityCallCount() int { 175 fake.deserializeIdentityMutex.RLock() 176 defer fake.deserializeIdentityMutex.RUnlock() 177 return len(fake.deserializeIdentityArgsForCall) 178 } 179 180 func (fake *MSP) DeserializeIdentityCalls(stub func([]byte) (msp.Identity, error)) { 181 fake.deserializeIdentityMutex.Lock() 182 defer fake.deserializeIdentityMutex.Unlock() 183 fake.DeserializeIdentityStub = stub 184 } 185 186 func (fake *MSP) DeserializeIdentityArgsForCall(i int) []byte { 187 fake.deserializeIdentityMutex.RLock() 188 defer fake.deserializeIdentityMutex.RUnlock() 189 argsForCall := fake.deserializeIdentityArgsForCall[i] 190 return argsForCall.arg1 191 } 192 193 func (fake *MSP) DeserializeIdentityReturns(result1 msp.Identity, result2 error) { 194 fake.deserializeIdentityMutex.Lock() 195 defer fake.deserializeIdentityMutex.Unlock() 196 fake.DeserializeIdentityStub = nil 197 fake.deserializeIdentityReturns = struct { 198 result1 msp.Identity 199 result2 error 200 }{result1, result2} 201 } 202 203 func (fake *MSP) DeserializeIdentityReturnsOnCall(i int, result1 msp.Identity, result2 error) { 204 fake.deserializeIdentityMutex.Lock() 205 defer fake.deserializeIdentityMutex.Unlock() 206 fake.DeserializeIdentityStub = nil 207 if fake.deserializeIdentityReturnsOnCall == nil { 208 fake.deserializeIdentityReturnsOnCall = make(map[int]struct { 209 result1 msp.Identity 210 result2 error 211 }) 212 } 213 fake.deserializeIdentityReturnsOnCall[i] = struct { 214 result1 msp.Identity 215 result2 error 216 }{result1, result2} 217 } 218 219 func (fake *MSP) GetDefaultSigningIdentity() (msp.SigningIdentity, error) { 220 fake.getDefaultSigningIdentityMutex.Lock() 221 ret, specificReturn := fake.getDefaultSigningIdentityReturnsOnCall[len(fake.getDefaultSigningIdentityArgsForCall)] 222 fake.getDefaultSigningIdentityArgsForCall = append(fake.getDefaultSigningIdentityArgsForCall, struct { 223 }{}) 224 fake.recordInvocation("GetDefaultSigningIdentity", []interface{}{}) 225 fake.getDefaultSigningIdentityMutex.Unlock() 226 if fake.GetDefaultSigningIdentityStub != nil { 227 return fake.GetDefaultSigningIdentityStub() 228 } 229 if specificReturn { 230 return ret.result1, ret.result2 231 } 232 fakeReturns := fake.getDefaultSigningIdentityReturns 233 return fakeReturns.result1, fakeReturns.result2 234 } 235 236 func (fake *MSP) GetDefaultSigningIdentityCallCount() int { 237 fake.getDefaultSigningIdentityMutex.RLock() 238 defer fake.getDefaultSigningIdentityMutex.RUnlock() 239 return len(fake.getDefaultSigningIdentityArgsForCall) 240 } 241 242 func (fake *MSP) GetDefaultSigningIdentityCalls(stub func() (msp.SigningIdentity, error)) { 243 fake.getDefaultSigningIdentityMutex.Lock() 244 defer fake.getDefaultSigningIdentityMutex.Unlock() 245 fake.GetDefaultSigningIdentityStub = stub 246 } 247 248 func (fake *MSP) GetDefaultSigningIdentityReturns(result1 msp.SigningIdentity, result2 error) { 249 fake.getDefaultSigningIdentityMutex.Lock() 250 defer fake.getDefaultSigningIdentityMutex.Unlock() 251 fake.GetDefaultSigningIdentityStub = nil 252 fake.getDefaultSigningIdentityReturns = struct { 253 result1 msp.SigningIdentity 254 result2 error 255 }{result1, result2} 256 } 257 258 func (fake *MSP) GetDefaultSigningIdentityReturnsOnCall(i int, result1 msp.SigningIdentity, result2 error) { 259 fake.getDefaultSigningIdentityMutex.Lock() 260 defer fake.getDefaultSigningIdentityMutex.Unlock() 261 fake.GetDefaultSigningIdentityStub = nil 262 if fake.getDefaultSigningIdentityReturnsOnCall == nil { 263 fake.getDefaultSigningIdentityReturnsOnCall = make(map[int]struct { 264 result1 msp.SigningIdentity 265 result2 error 266 }) 267 } 268 fake.getDefaultSigningIdentityReturnsOnCall[i] = struct { 269 result1 msp.SigningIdentity 270 result2 error 271 }{result1, result2} 272 } 273 274 func (fake *MSP) GetIdentifier() (string, error) { 275 fake.getIdentifierMutex.Lock() 276 ret, specificReturn := fake.getIdentifierReturnsOnCall[len(fake.getIdentifierArgsForCall)] 277 fake.getIdentifierArgsForCall = append(fake.getIdentifierArgsForCall, struct { 278 }{}) 279 fake.recordInvocation("GetIdentifier", []interface{}{}) 280 fake.getIdentifierMutex.Unlock() 281 if fake.GetIdentifierStub != nil { 282 return fake.GetIdentifierStub() 283 } 284 if specificReturn { 285 return ret.result1, ret.result2 286 } 287 fakeReturns := fake.getIdentifierReturns 288 return fakeReturns.result1, fakeReturns.result2 289 } 290 291 func (fake *MSP) GetIdentifierCallCount() int { 292 fake.getIdentifierMutex.RLock() 293 defer fake.getIdentifierMutex.RUnlock() 294 return len(fake.getIdentifierArgsForCall) 295 } 296 297 func (fake *MSP) GetIdentifierCalls(stub func() (string, error)) { 298 fake.getIdentifierMutex.Lock() 299 defer fake.getIdentifierMutex.Unlock() 300 fake.GetIdentifierStub = stub 301 } 302 303 func (fake *MSP) GetIdentifierReturns(result1 string, result2 error) { 304 fake.getIdentifierMutex.Lock() 305 defer fake.getIdentifierMutex.Unlock() 306 fake.GetIdentifierStub = nil 307 fake.getIdentifierReturns = struct { 308 result1 string 309 result2 error 310 }{result1, result2} 311 } 312 313 func (fake *MSP) GetIdentifierReturnsOnCall(i int, result1 string, result2 error) { 314 fake.getIdentifierMutex.Lock() 315 defer fake.getIdentifierMutex.Unlock() 316 fake.GetIdentifierStub = nil 317 if fake.getIdentifierReturnsOnCall == nil { 318 fake.getIdentifierReturnsOnCall = make(map[int]struct { 319 result1 string 320 result2 error 321 }) 322 } 323 fake.getIdentifierReturnsOnCall[i] = struct { 324 result1 string 325 result2 error 326 }{result1, result2} 327 } 328 329 func (fake *MSP) GetSigningIdentity(arg1 *msp.IdentityIdentifier) (msp.SigningIdentity, error) { 330 fake.getSigningIdentityMutex.Lock() 331 ret, specificReturn := fake.getSigningIdentityReturnsOnCall[len(fake.getSigningIdentityArgsForCall)] 332 fake.getSigningIdentityArgsForCall = append(fake.getSigningIdentityArgsForCall, struct { 333 arg1 *msp.IdentityIdentifier 334 }{arg1}) 335 fake.recordInvocation("GetSigningIdentity", []interface{}{arg1}) 336 fake.getSigningIdentityMutex.Unlock() 337 if fake.GetSigningIdentityStub != nil { 338 return fake.GetSigningIdentityStub(arg1) 339 } 340 if specificReturn { 341 return ret.result1, ret.result2 342 } 343 fakeReturns := fake.getSigningIdentityReturns 344 return fakeReturns.result1, fakeReturns.result2 345 } 346 347 func (fake *MSP) GetSigningIdentityCallCount() int { 348 fake.getSigningIdentityMutex.RLock() 349 defer fake.getSigningIdentityMutex.RUnlock() 350 return len(fake.getSigningIdentityArgsForCall) 351 } 352 353 func (fake *MSP) GetSigningIdentityCalls(stub func(*msp.IdentityIdentifier) (msp.SigningIdentity, error)) { 354 fake.getSigningIdentityMutex.Lock() 355 defer fake.getSigningIdentityMutex.Unlock() 356 fake.GetSigningIdentityStub = stub 357 } 358 359 func (fake *MSP) GetSigningIdentityArgsForCall(i int) *msp.IdentityIdentifier { 360 fake.getSigningIdentityMutex.RLock() 361 defer fake.getSigningIdentityMutex.RUnlock() 362 argsForCall := fake.getSigningIdentityArgsForCall[i] 363 return argsForCall.arg1 364 } 365 366 func (fake *MSP) GetSigningIdentityReturns(result1 msp.SigningIdentity, result2 error) { 367 fake.getSigningIdentityMutex.Lock() 368 defer fake.getSigningIdentityMutex.Unlock() 369 fake.GetSigningIdentityStub = nil 370 fake.getSigningIdentityReturns = struct { 371 result1 msp.SigningIdentity 372 result2 error 373 }{result1, result2} 374 } 375 376 func (fake *MSP) GetSigningIdentityReturnsOnCall(i int, result1 msp.SigningIdentity, result2 error) { 377 fake.getSigningIdentityMutex.Lock() 378 defer fake.getSigningIdentityMutex.Unlock() 379 fake.GetSigningIdentityStub = nil 380 if fake.getSigningIdentityReturnsOnCall == nil { 381 fake.getSigningIdentityReturnsOnCall = make(map[int]struct { 382 result1 msp.SigningIdentity 383 result2 error 384 }) 385 } 386 fake.getSigningIdentityReturnsOnCall[i] = struct { 387 result1 msp.SigningIdentity 388 result2 error 389 }{result1, result2} 390 } 391 392 func (fake *MSP) GetTLSIntermediateCerts() [][]byte { 393 fake.getTLSIntermediateCertsMutex.Lock() 394 ret, specificReturn := fake.getTLSIntermediateCertsReturnsOnCall[len(fake.getTLSIntermediateCertsArgsForCall)] 395 fake.getTLSIntermediateCertsArgsForCall = append(fake.getTLSIntermediateCertsArgsForCall, struct { 396 }{}) 397 fake.recordInvocation("GetTLSIntermediateCerts", []interface{}{}) 398 fake.getTLSIntermediateCertsMutex.Unlock() 399 if fake.GetTLSIntermediateCertsStub != nil { 400 return fake.GetTLSIntermediateCertsStub() 401 } 402 if specificReturn { 403 return ret.result1 404 } 405 fakeReturns := fake.getTLSIntermediateCertsReturns 406 return fakeReturns.result1 407 } 408 409 func (fake *MSP) GetTLSIntermediateCertsCallCount() int { 410 fake.getTLSIntermediateCertsMutex.RLock() 411 defer fake.getTLSIntermediateCertsMutex.RUnlock() 412 return len(fake.getTLSIntermediateCertsArgsForCall) 413 } 414 415 func (fake *MSP) GetTLSIntermediateCertsCalls(stub func() [][]byte) { 416 fake.getTLSIntermediateCertsMutex.Lock() 417 defer fake.getTLSIntermediateCertsMutex.Unlock() 418 fake.GetTLSIntermediateCertsStub = stub 419 } 420 421 func (fake *MSP) GetTLSIntermediateCertsReturns(result1 [][]byte) { 422 fake.getTLSIntermediateCertsMutex.Lock() 423 defer fake.getTLSIntermediateCertsMutex.Unlock() 424 fake.GetTLSIntermediateCertsStub = nil 425 fake.getTLSIntermediateCertsReturns = struct { 426 result1 [][]byte 427 }{result1} 428 } 429 430 func (fake *MSP) GetTLSIntermediateCertsReturnsOnCall(i int, result1 [][]byte) { 431 fake.getTLSIntermediateCertsMutex.Lock() 432 defer fake.getTLSIntermediateCertsMutex.Unlock() 433 fake.GetTLSIntermediateCertsStub = nil 434 if fake.getTLSIntermediateCertsReturnsOnCall == nil { 435 fake.getTLSIntermediateCertsReturnsOnCall = make(map[int]struct { 436 result1 [][]byte 437 }) 438 } 439 fake.getTLSIntermediateCertsReturnsOnCall[i] = struct { 440 result1 [][]byte 441 }{result1} 442 } 443 444 func (fake *MSP) GetTLSRootCerts() [][]byte { 445 fake.getTLSRootCertsMutex.Lock() 446 ret, specificReturn := fake.getTLSRootCertsReturnsOnCall[len(fake.getTLSRootCertsArgsForCall)] 447 fake.getTLSRootCertsArgsForCall = append(fake.getTLSRootCertsArgsForCall, struct { 448 }{}) 449 fake.recordInvocation("GetTLSRootCerts", []interface{}{}) 450 fake.getTLSRootCertsMutex.Unlock() 451 if fake.GetTLSRootCertsStub != nil { 452 return fake.GetTLSRootCertsStub() 453 } 454 if specificReturn { 455 return ret.result1 456 } 457 fakeReturns := fake.getTLSRootCertsReturns 458 return fakeReturns.result1 459 } 460 461 func (fake *MSP) GetTLSRootCertsCallCount() int { 462 fake.getTLSRootCertsMutex.RLock() 463 defer fake.getTLSRootCertsMutex.RUnlock() 464 return len(fake.getTLSRootCertsArgsForCall) 465 } 466 467 func (fake *MSP) GetTLSRootCertsCalls(stub func() [][]byte) { 468 fake.getTLSRootCertsMutex.Lock() 469 defer fake.getTLSRootCertsMutex.Unlock() 470 fake.GetTLSRootCertsStub = stub 471 } 472 473 func (fake *MSP) GetTLSRootCertsReturns(result1 [][]byte) { 474 fake.getTLSRootCertsMutex.Lock() 475 defer fake.getTLSRootCertsMutex.Unlock() 476 fake.GetTLSRootCertsStub = nil 477 fake.getTLSRootCertsReturns = struct { 478 result1 [][]byte 479 }{result1} 480 } 481 482 func (fake *MSP) GetTLSRootCertsReturnsOnCall(i int, result1 [][]byte) { 483 fake.getTLSRootCertsMutex.Lock() 484 defer fake.getTLSRootCertsMutex.Unlock() 485 fake.GetTLSRootCertsStub = nil 486 if fake.getTLSRootCertsReturnsOnCall == nil { 487 fake.getTLSRootCertsReturnsOnCall = make(map[int]struct { 488 result1 [][]byte 489 }) 490 } 491 fake.getTLSRootCertsReturnsOnCall[i] = struct { 492 result1 [][]byte 493 }{result1} 494 } 495 496 func (fake *MSP) GetType() msp.ProviderType { 497 fake.getTypeMutex.Lock() 498 ret, specificReturn := fake.getTypeReturnsOnCall[len(fake.getTypeArgsForCall)] 499 fake.getTypeArgsForCall = append(fake.getTypeArgsForCall, struct { 500 }{}) 501 fake.recordInvocation("GetType", []interface{}{}) 502 fake.getTypeMutex.Unlock() 503 if fake.GetTypeStub != nil { 504 return fake.GetTypeStub() 505 } 506 if specificReturn { 507 return ret.result1 508 } 509 fakeReturns := fake.getTypeReturns 510 return fakeReturns.result1 511 } 512 513 func (fake *MSP) GetTypeCallCount() int { 514 fake.getTypeMutex.RLock() 515 defer fake.getTypeMutex.RUnlock() 516 return len(fake.getTypeArgsForCall) 517 } 518 519 func (fake *MSP) GetTypeCalls(stub func() msp.ProviderType) { 520 fake.getTypeMutex.Lock() 521 defer fake.getTypeMutex.Unlock() 522 fake.GetTypeStub = stub 523 } 524 525 func (fake *MSP) GetTypeReturns(result1 msp.ProviderType) { 526 fake.getTypeMutex.Lock() 527 defer fake.getTypeMutex.Unlock() 528 fake.GetTypeStub = nil 529 fake.getTypeReturns = struct { 530 result1 msp.ProviderType 531 }{result1} 532 } 533 534 func (fake *MSP) GetTypeReturnsOnCall(i int, result1 msp.ProviderType) { 535 fake.getTypeMutex.Lock() 536 defer fake.getTypeMutex.Unlock() 537 fake.GetTypeStub = nil 538 if fake.getTypeReturnsOnCall == nil { 539 fake.getTypeReturnsOnCall = make(map[int]struct { 540 result1 msp.ProviderType 541 }) 542 } 543 fake.getTypeReturnsOnCall[i] = struct { 544 result1 msp.ProviderType 545 }{result1} 546 } 547 548 func (fake *MSP) GetVersion() msp.MSPVersion { 549 fake.getVersionMutex.Lock() 550 ret, specificReturn := fake.getVersionReturnsOnCall[len(fake.getVersionArgsForCall)] 551 fake.getVersionArgsForCall = append(fake.getVersionArgsForCall, struct { 552 }{}) 553 fake.recordInvocation("GetVersion", []interface{}{}) 554 fake.getVersionMutex.Unlock() 555 if fake.GetVersionStub != nil { 556 return fake.GetVersionStub() 557 } 558 if specificReturn { 559 return ret.result1 560 } 561 fakeReturns := fake.getVersionReturns 562 return fakeReturns.result1 563 } 564 565 func (fake *MSP) GetVersionCallCount() int { 566 fake.getVersionMutex.RLock() 567 defer fake.getVersionMutex.RUnlock() 568 return len(fake.getVersionArgsForCall) 569 } 570 571 func (fake *MSP) GetVersionCalls(stub func() msp.MSPVersion) { 572 fake.getVersionMutex.Lock() 573 defer fake.getVersionMutex.Unlock() 574 fake.GetVersionStub = stub 575 } 576 577 func (fake *MSP) GetVersionReturns(result1 msp.MSPVersion) { 578 fake.getVersionMutex.Lock() 579 defer fake.getVersionMutex.Unlock() 580 fake.GetVersionStub = nil 581 fake.getVersionReturns = struct { 582 result1 msp.MSPVersion 583 }{result1} 584 } 585 586 func (fake *MSP) GetVersionReturnsOnCall(i int, result1 msp.MSPVersion) { 587 fake.getVersionMutex.Lock() 588 defer fake.getVersionMutex.Unlock() 589 fake.GetVersionStub = nil 590 if fake.getVersionReturnsOnCall == nil { 591 fake.getVersionReturnsOnCall = make(map[int]struct { 592 result1 msp.MSPVersion 593 }) 594 } 595 fake.getVersionReturnsOnCall[i] = struct { 596 result1 msp.MSPVersion 597 }{result1} 598 } 599 600 func (fake *MSP) IsWellFormed(arg1 *mspa.SerializedIdentity) error { 601 fake.isWellFormedMutex.Lock() 602 ret, specificReturn := fake.isWellFormedReturnsOnCall[len(fake.isWellFormedArgsForCall)] 603 fake.isWellFormedArgsForCall = append(fake.isWellFormedArgsForCall, struct { 604 arg1 *mspa.SerializedIdentity 605 }{arg1}) 606 fake.recordInvocation("IsWellFormed", []interface{}{arg1}) 607 fake.isWellFormedMutex.Unlock() 608 if fake.IsWellFormedStub != nil { 609 return fake.IsWellFormedStub(arg1) 610 } 611 if specificReturn { 612 return ret.result1 613 } 614 fakeReturns := fake.isWellFormedReturns 615 return fakeReturns.result1 616 } 617 618 func (fake *MSP) IsWellFormedCallCount() int { 619 fake.isWellFormedMutex.RLock() 620 defer fake.isWellFormedMutex.RUnlock() 621 return len(fake.isWellFormedArgsForCall) 622 } 623 624 func (fake *MSP) IsWellFormedCalls(stub func(*mspa.SerializedIdentity) error) { 625 fake.isWellFormedMutex.Lock() 626 defer fake.isWellFormedMutex.Unlock() 627 fake.IsWellFormedStub = stub 628 } 629 630 func (fake *MSP) IsWellFormedArgsForCall(i int) *mspa.SerializedIdentity { 631 fake.isWellFormedMutex.RLock() 632 defer fake.isWellFormedMutex.RUnlock() 633 argsForCall := fake.isWellFormedArgsForCall[i] 634 return argsForCall.arg1 635 } 636 637 func (fake *MSP) IsWellFormedReturns(result1 error) { 638 fake.isWellFormedMutex.Lock() 639 defer fake.isWellFormedMutex.Unlock() 640 fake.IsWellFormedStub = nil 641 fake.isWellFormedReturns = struct { 642 result1 error 643 }{result1} 644 } 645 646 func (fake *MSP) IsWellFormedReturnsOnCall(i int, result1 error) { 647 fake.isWellFormedMutex.Lock() 648 defer fake.isWellFormedMutex.Unlock() 649 fake.IsWellFormedStub = nil 650 if fake.isWellFormedReturnsOnCall == nil { 651 fake.isWellFormedReturnsOnCall = make(map[int]struct { 652 result1 error 653 }) 654 } 655 fake.isWellFormedReturnsOnCall[i] = struct { 656 result1 error 657 }{result1} 658 } 659 660 func (fake *MSP) SatisfiesPrincipal(arg1 msp.Identity, arg2 *mspa.MSPPrincipal) error { 661 fake.satisfiesPrincipalMutex.Lock() 662 ret, specificReturn := fake.satisfiesPrincipalReturnsOnCall[len(fake.satisfiesPrincipalArgsForCall)] 663 fake.satisfiesPrincipalArgsForCall = append(fake.satisfiesPrincipalArgsForCall, struct { 664 arg1 msp.Identity 665 arg2 *mspa.MSPPrincipal 666 }{arg1, arg2}) 667 fake.recordInvocation("SatisfiesPrincipal", []interface{}{arg1, arg2}) 668 fake.satisfiesPrincipalMutex.Unlock() 669 if fake.SatisfiesPrincipalStub != nil { 670 return fake.SatisfiesPrincipalStub(arg1, arg2) 671 } 672 if specificReturn { 673 return ret.result1 674 } 675 fakeReturns := fake.satisfiesPrincipalReturns 676 return fakeReturns.result1 677 } 678 679 func (fake *MSP) SatisfiesPrincipalCallCount() int { 680 fake.satisfiesPrincipalMutex.RLock() 681 defer fake.satisfiesPrincipalMutex.RUnlock() 682 return len(fake.satisfiesPrincipalArgsForCall) 683 } 684 685 func (fake *MSP) SatisfiesPrincipalCalls(stub func(msp.Identity, *mspa.MSPPrincipal) error) { 686 fake.satisfiesPrincipalMutex.Lock() 687 defer fake.satisfiesPrincipalMutex.Unlock() 688 fake.SatisfiesPrincipalStub = stub 689 } 690 691 func (fake *MSP) SatisfiesPrincipalArgsForCall(i int) (msp.Identity, *mspa.MSPPrincipal) { 692 fake.satisfiesPrincipalMutex.RLock() 693 defer fake.satisfiesPrincipalMutex.RUnlock() 694 argsForCall := fake.satisfiesPrincipalArgsForCall[i] 695 return argsForCall.arg1, argsForCall.arg2 696 } 697 698 func (fake *MSP) SatisfiesPrincipalReturns(result1 error) { 699 fake.satisfiesPrincipalMutex.Lock() 700 defer fake.satisfiesPrincipalMutex.Unlock() 701 fake.SatisfiesPrincipalStub = nil 702 fake.satisfiesPrincipalReturns = struct { 703 result1 error 704 }{result1} 705 } 706 707 func (fake *MSP) SatisfiesPrincipalReturnsOnCall(i int, result1 error) { 708 fake.satisfiesPrincipalMutex.Lock() 709 defer fake.satisfiesPrincipalMutex.Unlock() 710 fake.SatisfiesPrincipalStub = nil 711 if fake.satisfiesPrincipalReturnsOnCall == nil { 712 fake.satisfiesPrincipalReturnsOnCall = make(map[int]struct { 713 result1 error 714 }) 715 } 716 fake.satisfiesPrincipalReturnsOnCall[i] = struct { 717 result1 error 718 }{result1} 719 } 720 721 func (fake *MSP) Setup(arg1 *mspa.MSPConfig) error { 722 fake.setupMutex.Lock() 723 ret, specificReturn := fake.setupReturnsOnCall[len(fake.setupArgsForCall)] 724 fake.setupArgsForCall = append(fake.setupArgsForCall, struct { 725 arg1 *mspa.MSPConfig 726 }{arg1}) 727 fake.recordInvocation("Setup", []interface{}{arg1}) 728 fake.setupMutex.Unlock() 729 if fake.SetupStub != nil { 730 return fake.SetupStub(arg1) 731 } 732 if specificReturn { 733 return ret.result1 734 } 735 fakeReturns := fake.setupReturns 736 return fakeReturns.result1 737 } 738 739 func (fake *MSP) SetupCallCount() int { 740 fake.setupMutex.RLock() 741 defer fake.setupMutex.RUnlock() 742 return len(fake.setupArgsForCall) 743 } 744 745 func (fake *MSP) SetupCalls(stub func(*mspa.MSPConfig) error) { 746 fake.setupMutex.Lock() 747 defer fake.setupMutex.Unlock() 748 fake.SetupStub = stub 749 } 750 751 func (fake *MSP) SetupArgsForCall(i int) *mspa.MSPConfig { 752 fake.setupMutex.RLock() 753 defer fake.setupMutex.RUnlock() 754 argsForCall := fake.setupArgsForCall[i] 755 return argsForCall.arg1 756 } 757 758 func (fake *MSP) SetupReturns(result1 error) { 759 fake.setupMutex.Lock() 760 defer fake.setupMutex.Unlock() 761 fake.SetupStub = nil 762 fake.setupReturns = struct { 763 result1 error 764 }{result1} 765 } 766 767 func (fake *MSP) SetupReturnsOnCall(i int, result1 error) { 768 fake.setupMutex.Lock() 769 defer fake.setupMutex.Unlock() 770 fake.SetupStub = nil 771 if fake.setupReturnsOnCall == nil { 772 fake.setupReturnsOnCall = make(map[int]struct { 773 result1 error 774 }) 775 } 776 fake.setupReturnsOnCall[i] = struct { 777 result1 error 778 }{result1} 779 } 780 781 func (fake *MSP) Validate(arg1 msp.Identity) error { 782 fake.validateMutex.Lock() 783 ret, specificReturn := fake.validateReturnsOnCall[len(fake.validateArgsForCall)] 784 fake.validateArgsForCall = append(fake.validateArgsForCall, struct { 785 arg1 msp.Identity 786 }{arg1}) 787 fake.recordInvocation("Validate", []interface{}{arg1}) 788 fake.validateMutex.Unlock() 789 if fake.ValidateStub != nil { 790 return fake.ValidateStub(arg1) 791 } 792 if specificReturn { 793 return ret.result1 794 } 795 fakeReturns := fake.validateReturns 796 return fakeReturns.result1 797 } 798 799 func (fake *MSP) ValidateCallCount() int { 800 fake.validateMutex.RLock() 801 defer fake.validateMutex.RUnlock() 802 return len(fake.validateArgsForCall) 803 } 804 805 func (fake *MSP) ValidateCalls(stub func(msp.Identity) error) { 806 fake.validateMutex.Lock() 807 defer fake.validateMutex.Unlock() 808 fake.ValidateStub = stub 809 } 810 811 func (fake *MSP) ValidateArgsForCall(i int) msp.Identity { 812 fake.validateMutex.RLock() 813 defer fake.validateMutex.RUnlock() 814 argsForCall := fake.validateArgsForCall[i] 815 return argsForCall.arg1 816 } 817 818 func (fake *MSP) ValidateReturns(result1 error) { 819 fake.validateMutex.Lock() 820 defer fake.validateMutex.Unlock() 821 fake.ValidateStub = nil 822 fake.validateReturns = struct { 823 result1 error 824 }{result1} 825 } 826 827 func (fake *MSP) ValidateReturnsOnCall(i int, result1 error) { 828 fake.validateMutex.Lock() 829 defer fake.validateMutex.Unlock() 830 fake.ValidateStub = nil 831 if fake.validateReturnsOnCall == nil { 832 fake.validateReturnsOnCall = make(map[int]struct { 833 result1 error 834 }) 835 } 836 fake.validateReturnsOnCall[i] = struct { 837 result1 error 838 }{result1} 839 } 840 841 func (fake *MSP) Invocations() map[string][][]interface{} { 842 fake.invocationsMutex.RLock() 843 defer fake.invocationsMutex.RUnlock() 844 fake.deserializeIdentityMutex.RLock() 845 defer fake.deserializeIdentityMutex.RUnlock() 846 fake.getDefaultSigningIdentityMutex.RLock() 847 defer fake.getDefaultSigningIdentityMutex.RUnlock() 848 fake.getIdentifierMutex.RLock() 849 defer fake.getIdentifierMutex.RUnlock() 850 fake.getSigningIdentityMutex.RLock() 851 defer fake.getSigningIdentityMutex.RUnlock() 852 fake.getTLSIntermediateCertsMutex.RLock() 853 defer fake.getTLSIntermediateCertsMutex.RUnlock() 854 fake.getTLSRootCertsMutex.RLock() 855 defer fake.getTLSRootCertsMutex.RUnlock() 856 fake.getTypeMutex.RLock() 857 defer fake.getTypeMutex.RUnlock() 858 fake.getVersionMutex.RLock() 859 defer fake.getVersionMutex.RUnlock() 860 fake.isWellFormedMutex.RLock() 861 defer fake.isWellFormedMutex.RUnlock() 862 fake.satisfiesPrincipalMutex.RLock() 863 defer fake.satisfiesPrincipalMutex.RUnlock() 864 fake.setupMutex.RLock() 865 defer fake.setupMutex.RUnlock() 866 fake.validateMutex.RLock() 867 defer fake.validateMutex.RUnlock() 868 copiedInvocations := map[string][][]interface{}{} 869 for key, value := range fake.invocations { 870 copiedInvocations[key] = value 871 } 872 return copiedInvocations 873 } 874 875 func (fake *MSP) recordInvocation(key string, args []interface{}) { 876 fake.invocationsMutex.Lock() 877 defer fake.invocationsMutex.Unlock() 878 if fake.invocations == nil { 879 fake.invocations = map[string][][]interface{}{} 880 } 881 if fake.invocations[key] == nil { 882 fake.invocations[key] = [][]interface{}{} 883 } 884 fake.invocations[key] = append(fake.invocations[key], args) 885 }