github.com/hechain20/hechain@v0.0.0-20220316014945-b544036ba106/core/chaincode/lifecycle/mock/legacy_ccinfo.go (about) 1 // Code generated by counterfeiter. DO NOT EDIT. 2 package mock 3 4 import ( 5 "sync" 6 7 "github.com/hyperledger/fabric-protos-go/ledger/rwset/kvrwset" 8 "github.com/hyperledger/fabric-protos-go/peer" 9 "github.com/hechain20/hechain/core/chaincode/lifecycle" 10 "github.com/hechain20/hechain/core/ledger" 11 ) 12 13 type LegacyDeployedCCInfoProvider struct { 14 AllChaincodesInfoStub func(string, ledger.SimpleQueryExecutor) (map[string]*ledger.DeployedChaincodeInfo, error) 15 allChaincodesInfoMutex sync.RWMutex 16 allChaincodesInfoArgsForCall []struct { 17 arg1 string 18 arg2 ledger.SimpleQueryExecutor 19 } 20 allChaincodesInfoReturns struct { 21 result1 map[string]*ledger.DeployedChaincodeInfo 22 result2 error 23 } 24 allChaincodesInfoReturnsOnCall map[int]struct { 25 result1 map[string]*ledger.DeployedChaincodeInfo 26 result2 error 27 } 28 AllCollectionsConfigPkgStub func(string, string, ledger.SimpleQueryExecutor) (*peer.CollectionConfigPackage, error) 29 allCollectionsConfigPkgMutex sync.RWMutex 30 allCollectionsConfigPkgArgsForCall []struct { 31 arg1 string 32 arg2 string 33 arg3 ledger.SimpleQueryExecutor 34 } 35 allCollectionsConfigPkgReturns struct { 36 result1 *peer.CollectionConfigPackage 37 result2 error 38 } 39 allCollectionsConfigPkgReturnsOnCall map[int]struct { 40 result1 *peer.CollectionConfigPackage 41 result2 error 42 } 43 ChaincodeInfoStub func(string, string, ledger.SimpleQueryExecutor) (*ledger.DeployedChaincodeInfo, error) 44 chaincodeInfoMutex sync.RWMutex 45 chaincodeInfoArgsForCall []struct { 46 arg1 string 47 arg2 string 48 arg3 ledger.SimpleQueryExecutor 49 } 50 chaincodeInfoReturns struct { 51 result1 *ledger.DeployedChaincodeInfo 52 result2 error 53 } 54 chaincodeInfoReturnsOnCall map[int]struct { 55 result1 *ledger.DeployedChaincodeInfo 56 result2 error 57 } 58 CollectionInfoStub func(string, string, string, ledger.SimpleQueryExecutor) (*peer.StaticCollectionConfig, error) 59 collectionInfoMutex sync.RWMutex 60 collectionInfoArgsForCall []struct { 61 arg1 string 62 arg2 string 63 arg3 string 64 arg4 ledger.SimpleQueryExecutor 65 } 66 collectionInfoReturns struct { 67 result1 *peer.StaticCollectionConfig 68 result2 error 69 } 70 collectionInfoReturnsOnCall map[int]struct { 71 result1 *peer.StaticCollectionConfig 72 result2 error 73 } 74 GenerateImplicitCollectionForOrgStub func(string) *peer.StaticCollectionConfig 75 generateImplicitCollectionForOrgMutex sync.RWMutex 76 generateImplicitCollectionForOrgArgsForCall []struct { 77 arg1 string 78 } 79 generateImplicitCollectionForOrgReturns struct { 80 result1 *peer.StaticCollectionConfig 81 } 82 generateImplicitCollectionForOrgReturnsOnCall map[int]struct { 83 result1 *peer.StaticCollectionConfig 84 } 85 ImplicitCollectionsStub func(string, string, ledger.SimpleQueryExecutor) ([]*peer.StaticCollectionConfig, error) 86 implicitCollectionsMutex sync.RWMutex 87 implicitCollectionsArgsForCall []struct { 88 arg1 string 89 arg2 string 90 arg3 ledger.SimpleQueryExecutor 91 } 92 implicitCollectionsReturns struct { 93 result1 []*peer.StaticCollectionConfig 94 result2 error 95 } 96 implicitCollectionsReturnsOnCall map[int]struct { 97 result1 []*peer.StaticCollectionConfig 98 result2 error 99 } 100 NamespacesStub func() []string 101 namespacesMutex sync.RWMutex 102 namespacesArgsForCall []struct { 103 } 104 namespacesReturns struct { 105 result1 []string 106 } 107 namespacesReturnsOnCall map[int]struct { 108 result1 []string 109 } 110 UpdatedChaincodesStub func(map[string][]*kvrwset.KVWrite) ([]*ledger.ChaincodeLifecycleInfo, error) 111 updatedChaincodesMutex sync.RWMutex 112 updatedChaincodesArgsForCall []struct { 113 arg1 map[string][]*kvrwset.KVWrite 114 } 115 updatedChaincodesReturns struct { 116 result1 []*ledger.ChaincodeLifecycleInfo 117 result2 error 118 } 119 updatedChaincodesReturnsOnCall map[int]struct { 120 result1 []*ledger.ChaincodeLifecycleInfo 121 result2 error 122 } 123 invocations map[string][][]interface{} 124 invocationsMutex sync.RWMutex 125 } 126 127 func (fake *LegacyDeployedCCInfoProvider) AllChaincodesInfo(arg1 string, arg2 ledger.SimpleQueryExecutor) (map[string]*ledger.DeployedChaincodeInfo, error) { 128 fake.allChaincodesInfoMutex.Lock() 129 ret, specificReturn := fake.allChaincodesInfoReturnsOnCall[len(fake.allChaincodesInfoArgsForCall)] 130 fake.allChaincodesInfoArgsForCall = append(fake.allChaincodesInfoArgsForCall, struct { 131 arg1 string 132 arg2 ledger.SimpleQueryExecutor 133 }{arg1, arg2}) 134 fake.recordInvocation("AllChaincodesInfo", []interface{}{arg1, arg2}) 135 fake.allChaincodesInfoMutex.Unlock() 136 if fake.AllChaincodesInfoStub != nil { 137 return fake.AllChaincodesInfoStub(arg1, arg2) 138 } 139 if specificReturn { 140 return ret.result1, ret.result2 141 } 142 fakeReturns := fake.allChaincodesInfoReturns 143 return fakeReturns.result1, fakeReturns.result2 144 } 145 146 func (fake *LegacyDeployedCCInfoProvider) AllChaincodesInfoCallCount() int { 147 fake.allChaincodesInfoMutex.RLock() 148 defer fake.allChaincodesInfoMutex.RUnlock() 149 return len(fake.allChaincodesInfoArgsForCall) 150 } 151 152 func (fake *LegacyDeployedCCInfoProvider) AllChaincodesInfoCalls(stub func(string, ledger.SimpleQueryExecutor) (map[string]*ledger.DeployedChaincodeInfo, error)) { 153 fake.allChaincodesInfoMutex.Lock() 154 defer fake.allChaincodesInfoMutex.Unlock() 155 fake.AllChaincodesInfoStub = stub 156 } 157 158 func (fake *LegacyDeployedCCInfoProvider) AllChaincodesInfoArgsForCall(i int) (string, ledger.SimpleQueryExecutor) { 159 fake.allChaincodesInfoMutex.RLock() 160 defer fake.allChaincodesInfoMutex.RUnlock() 161 argsForCall := fake.allChaincodesInfoArgsForCall[i] 162 return argsForCall.arg1, argsForCall.arg2 163 } 164 165 func (fake *LegacyDeployedCCInfoProvider) AllChaincodesInfoReturns(result1 map[string]*ledger.DeployedChaincodeInfo, result2 error) { 166 fake.allChaincodesInfoMutex.Lock() 167 defer fake.allChaincodesInfoMutex.Unlock() 168 fake.AllChaincodesInfoStub = nil 169 fake.allChaincodesInfoReturns = struct { 170 result1 map[string]*ledger.DeployedChaincodeInfo 171 result2 error 172 }{result1, result2} 173 } 174 175 func (fake *LegacyDeployedCCInfoProvider) AllChaincodesInfoReturnsOnCall(i int, result1 map[string]*ledger.DeployedChaincodeInfo, result2 error) { 176 fake.allChaincodesInfoMutex.Lock() 177 defer fake.allChaincodesInfoMutex.Unlock() 178 fake.AllChaincodesInfoStub = nil 179 if fake.allChaincodesInfoReturnsOnCall == nil { 180 fake.allChaincodesInfoReturnsOnCall = make(map[int]struct { 181 result1 map[string]*ledger.DeployedChaincodeInfo 182 result2 error 183 }) 184 } 185 fake.allChaincodesInfoReturnsOnCall[i] = struct { 186 result1 map[string]*ledger.DeployedChaincodeInfo 187 result2 error 188 }{result1, result2} 189 } 190 191 func (fake *LegacyDeployedCCInfoProvider) AllCollectionsConfigPkg(arg1 string, arg2 string, arg3 ledger.SimpleQueryExecutor) (*peer.CollectionConfigPackage, error) { 192 fake.allCollectionsConfigPkgMutex.Lock() 193 ret, specificReturn := fake.allCollectionsConfigPkgReturnsOnCall[len(fake.allCollectionsConfigPkgArgsForCall)] 194 fake.allCollectionsConfigPkgArgsForCall = append(fake.allCollectionsConfigPkgArgsForCall, struct { 195 arg1 string 196 arg2 string 197 arg3 ledger.SimpleQueryExecutor 198 }{arg1, arg2, arg3}) 199 fake.recordInvocation("AllCollectionsConfigPkg", []interface{}{arg1, arg2, arg3}) 200 fake.allCollectionsConfigPkgMutex.Unlock() 201 if fake.AllCollectionsConfigPkgStub != nil { 202 return fake.AllCollectionsConfigPkgStub(arg1, arg2, arg3) 203 } 204 if specificReturn { 205 return ret.result1, ret.result2 206 } 207 fakeReturns := fake.allCollectionsConfigPkgReturns 208 return fakeReturns.result1, fakeReturns.result2 209 } 210 211 func (fake *LegacyDeployedCCInfoProvider) AllCollectionsConfigPkgCallCount() int { 212 fake.allCollectionsConfigPkgMutex.RLock() 213 defer fake.allCollectionsConfigPkgMutex.RUnlock() 214 return len(fake.allCollectionsConfigPkgArgsForCall) 215 } 216 217 func (fake *LegacyDeployedCCInfoProvider) AllCollectionsConfigPkgCalls(stub func(string, string, ledger.SimpleQueryExecutor) (*peer.CollectionConfigPackage, error)) { 218 fake.allCollectionsConfigPkgMutex.Lock() 219 defer fake.allCollectionsConfigPkgMutex.Unlock() 220 fake.AllCollectionsConfigPkgStub = stub 221 } 222 223 func (fake *LegacyDeployedCCInfoProvider) AllCollectionsConfigPkgArgsForCall(i int) (string, string, ledger.SimpleQueryExecutor) { 224 fake.allCollectionsConfigPkgMutex.RLock() 225 defer fake.allCollectionsConfigPkgMutex.RUnlock() 226 argsForCall := fake.allCollectionsConfigPkgArgsForCall[i] 227 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 228 } 229 230 func (fake *LegacyDeployedCCInfoProvider) AllCollectionsConfigPkgReturns(result1 *peer.CollectionConfigPackage, result2 error) { 231 fake.allCollectionsConfigPkgMutex.Lock() 232 defer fake.allCollectionsConfigPkgMutex.Unlock() 233 fake.AllCollectionsConfigPkgStub = nil 234 fake.allCollectionsConfigPkgReturns = struct { 235 result1 *peer.CollectionConfigPackage 236 result2 error 237 }{result1, result2} 238 } 239 240 func (fake *LegacyDeployedCCInfoProvider) AllCollectionsConfigPkgReturnsOnCall(i int, result1 *peer.CollectionConfigPackage, result2 error) { 241 fake.allCollectionsConfigPkgMutex.Lock() 242 defer fake.allCollectionsConfigPkgMutex.Unlock() 243 fake.AllCollectionsConfigPkgStub = nil 244 if fake.allCollectionsConfigPkgReturnsOnCall == nil { 245 fake.allCollectionsConfigPkgReturnsOnCall = make(map[int]struct { 246 result1 *peer.CollectionConfigPackage 247 result2 error 248 }) 249 } 250 fake.allCollectionsConfigPkgReturnsOnCall[i] = struct { 251 result1 *peer.CollectionConfigPackage 252 result2 error 253 }{result1, result2} 254 } 255 256 func (fake *LegacyDeployedCCInfoProvider) ChaincodeInfo(arg1 string, arg2 string, arg3 ledger.SimpleQueryExecutor) (*ledger.DeployedChaincodeInfo, error) { 257 fake.chaincodeInfoMutex.Lock() 258 ret, specificReturn := fake.chaincodeInfoReturnsOnCall[len(fake.chaincodeInfoArgsForCall)] 259 fake.chaincodeInfoArgsForCall = append(fake.chaincodeInfoArgsForCall, struct { 260 arg1 string 261 arg2 string 262 arg3 ledger.SimpleQueryExecutor 263 }{arg1, arg2, arg3}) 264 fake.recordInvocation("ChaincodeInfo", []interface{}{arg1, arg2, arg3}) 265 fake.chaincodeInfoMutex.Unlock() 266 if fake.ChaincodeInfoStub != nil { 267 return fake.ChaincodeInfoStub(arg1, arg2, arg3) 268 } 269 if specificReturn { 270 return ret.result1, ret.result2 271 } 272 fakeReturns := fake.chaincodeInfoReturns 273 return fakeReturns.result1, fakeReturns.result2 274 } 275 276 func (fake *LegacyDeployedCCInfoProvider) ChaincodeInfoCallCount() int { 277 fake.chaincodeInfoMutex.RLock() 278 defer fake.chaincodeInfoMutex.RUnlock() 279 return len(fake.chaincodeInfoArgsForCall) 280 } 281 282 func (fake *LegacyDeployedCCInfoProvider) ChaincodeInfoCalls(stub func(string, string, ledger.SimpleQueryExecutor) (*ledger.DeployedChaincodeInfo, error)) { 283 fake.chaincodeInfoMutex.Lock() 284 defer fake.chaincodeInfoMutex.Unlock() 285 fake.ChaincodeInfoStub = stub 286 } 287 288 func (fake *LegacyDeployedCCInfoProvider) ChaincodeInfoArgsForCall(i int) (string, string, ledger.SimpleQueryExecutor) { 289 fake.chaincodeInfoMutex.RLock() 290 defer fake.chaincodeInfoMutex.RUnlock() 291 argsForCall := fake.chaincodeInfoArgsForCall[i] 292 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 293 } 294 295 func (fake *LegacyDeployedCCInfoProvider) ChaincodeInfoReturns(result1 *ledger.DeployedChaincodeInfo, result2 error) { 296 fake.chaincodeInfoMutex.Lock() 297 defer fake.chaincodeInfoMutex.Unlock() 298 fake.ChaincodeInfoStub = nil 299 fake.chaincodeInfoReturns = struct { 300 result1 *ledger.DeployedChaincodeInfo 301 result2 error 302 }{result1, result2} 303 } 304 305 func (fake *LegacyDeployedCCInfoProvider) ChaincodeInfoReturnsOnCall(i int, result1 *ledger.DeployedChaincodeInfo, result2 error) { 306 fake.chaincodeInfoMutex.Lock() 307 defer fake.chaincodeInfoMutex.Unlock() 308 fake.ChaincodeInfoStub = nil 309 if fake.chaincodeInfoReturnsOnCall == nil { 310 fake.chaincodeInfoReturnsOnCall = make(map[int]struct { 311 result1 *ledger.DeployedChaincodeInfo 312 result2 error 313 }) 314 } 315 fake.chaincodeInfoReturnsOnCall[i] = struct { 316 result1 *ledger.DeployedChaincodeInfo 317 result2 error 318 }{result1, result2} 319 } 320 321 func (fake *LegacyDeployedCCInfoProvider) CollectionInfo(arg1 string, arg2 string, arg3 string, arg4 ledger.SimpleQueryExecutor) (*peer.StaticCollectionConfig, error) { 322 fake.collectionInfoMutex.Lock() 323 ret, specificReturn := fake.collectionInfoReturnsOnCall[len(fake.collectionInfoArgsForCall)] 324 fake.collectionInfoArgsForCall = append(fake.collectionInfoArgsForCall, struct { 325 arg1 string 326 arg2 string 327 arg3 string 328 arg4 ledger.SimpleQueryExecutor 329 }{arg1, arg2, arg3, arg4}) 330 fake.recordInvocation("CollectionInfo", []interface{}{arg1, arg2, arg3, arg4}) 331 fake.collectionInfoMutex.Unlock() 332 if fake.CollectionInfoStub != nil { 333 return fake.CollectionInfoStub(arg1, arg2, arg3, arg4) 334 } 335 if specificReturn { 336 return ret.result1, ret.result2 337 } 338 fakeReturns := fake.collectionInfoReturns 339 return fakeReturns.result1, fakeReturns.result2 340 } 341 342 func (fake *LegacyDeployedCCInfoProvider) CollectionInfoCallCount() int { 343 fake.collectionInfoMutex.RLock() 344 defer fake.collectionInfoMutex.RUnlock() 345 return len(fake.collectionInfoArgsForCall) 346 } 347 348 func (fake *LegacyDeployedCCInfoProvider) CollectionInfoCalls(stub func(string, string, string, ledger.SimpleQueryExecutor) (*peer.StaticCollectionConfig, error)) { 349 fake.collectionInfoMutex.Lock() 350 defer fake.collectionInfoMutex.Unlock() 351 fake.CollectionInfoStub = stub 352 } 353 354 func (fake *LegacyDeployedCCInfoProvider) CollectionInfoArgsForCall(i int) (string, string, string, ledger.SimpleQueryExecutor) { 355 fake.collectionInfoMutex.RLock() 356 defer fake.collectionInfoMutex.RUnlock() 357 argsForCall := fake.collectionInfoArgsForCall[i] 358 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4 359 } 360 361 func (fake *LegacyDeployedCCInfoProvider) CollectionInfoReturns(result1 *peer.StaticCollectionConfig, result2 error) { 362 fake.collectionInfoMutex.Lock() 363 defer fake.collectionInfoMutex.Unlock() 364 fake.CollectionInfoStub = nil 365 fake.collectionInfoReturns = struct { 366 result1 *peer.StaticCollectionConfig 367 result2 error 368 }{result1, result2} 369 } 370 371 func (fake *LegacyDeployedCCInfoProvider) CollectionInfoReturnsOnCall(i int, result1 *peer.StaticCollectionConfig, result2 error) { 372 fake.collectionInfoMutex.Lock() 373 defer fake.collectionInfoMutex.Unlock() 374 fake.CollectionInfoStub = nil 375 if fake.collectionInfoReturnsOnCall == nil { 376 fake.collectionInfoReturnsOnCall = make(map[int]struct { 377 result1 *peer.StaticCollectionConfig 378 result2 error 379 }) 380 } 381 fake.collectionInfoReturnsOnCall[i] = struct { 382 result1 *peer.StaticCollectionConfig 383 result2 error 384 }{result1, result2} 385 } 386 387 func (fake *LegacyDeployedCCInfoProvider) GenerateImplicitCollectionForOrg(arg1 string) *peer.StaticCollectionConfig { 388 fake.generateImplicitCollectionForOrgMutex.Lock() 389 ret, specificReturn := fake.generateImplicitCollectionForOrgReturnsOnCall[len(fake.generateImplicitCollectionForOrgArgsForCall)] 390 fake.generateImplicitCollectionForOrgArgsForCall = append(fake.generateImplicitCollectionForOrgArgsForCall, struct { 391 arg1 string 392 }{arg1}) 393 fake.recordInvocation("GenerateImplicitCollectionForOrg", []interface{}{arg1}) 394 fake.generateImplicitCollectionForOrgMutex.Unlock() 395 if fake.GenerateImplicitCollectionForOrgStub != nil { 396 return fake.GenerateImplicitCollectionForOrgStub(arg1) 397 } 398 if specificReturn { 399 return ret.result1 400 } 401 fakeReturns := fake.generateImplicitCollectionForOrgReturns 402 return fakeReturns.result1 403 } 404 405 func (fake *LegacyDeployedCCInfoProvider) GenerateImplicitCollectionForOrgCallCount() int { 406 fake.generateImplicitCollectionForOrgMutex.RLock() 407 defer fake.generateImplicitCollectionForOrgMutex.RUnlock() 408 return len(fake.generateImplicitCollectionForOrgArgsForCall) 409 } 410 411 func (fake *LegacyDeployedCCInfoProvider) GenerateImplicitCollectionForOrgCalls(stub func(string) *peer.StaticCollectionConfig) { 412 fake.generateImplicitCollectionForOrgMutex.Lock() 413 defer fake.generateImplicitCollectionForOrgMutex.Unlock() 414 fake.GenerateImplicitCollectionForOrgStub = stub 415 } 416 417 func (fake *LegacyDeployedCCInfoProvider) GenerateImplicitCollectionForOrgArgsForCall(i int) string { 418 fake.generateImplicitCollectionForOrgMutex.RLock() 419 defer fake.generateImplicitCollectionForOrgMutex.RUnlock() 420 argsForCall := fake.generateImplicitCollectionForOrgArgsForCall[i] 421 return argsForCall.arg1 422 } 423 424 func (fake *LegacyDeployedCCInfoProvider) GenerateImplicitCollectionForOrgReturns(result1 *peer.StaticCollectionConfig) { 425 fake.generateImplicitCollectionForOrgMutex.Lock() 426 defer fake.generateImplicitCollectionForOrgMutex.Unlock() 427 fake.GenerateImplicitCollectionForOrgStub = nil 428 fake.generateImplicitCollectionForOrgReturns = struct { 429 result1 *peer.StaticCollectionConfig 430 }{result1} 431 } 432 433 func (fake *LegacyDeployedCCInfoProvider) GenerateImplicitCollectionForOrgReturnsOnCall(i int, result1 *peer.StaticCollectionConfig) { 434 fake.generateImplicitCollectionForOrgMutex.Lock() 435 defer fake.generateImplicitCollectionForOrgMutex.Unlock() 436 fake.GenerateImplicitCollectionForOrgStub = nil 437 if fake.generateImplicitCollectionForOrgReturnsOnCall == nil { 438 fake.generateImplicitCollectionForOrgReturnsOnCall = make(map[int]struct { 439 result1 *peer.StaticCollectionConfig 440 }) 441 } 442 fake.generateImplicitCollectionForOrgReturnsOnCall[i] = struct { 443 result1 *peer.StaticCollectionConfig 444 }{result1} 445 } 446 447 func (fake *LegacyDeployedCCInfoProvider) ImplicitCollections(arg1 string, arg2 string, arg3 ledger.SimpleQueryExecutor) ([]*peer.StaticCollectionConfig, error) { 448 fake.implicitCollectionsMutex.Lock() 449 ret, specificReturn := fake.implicitCollectionsReturnsOnCall[len(fake.implicitCollectionsArgsForCall)] 450 fake.implicitCollectionsArgsForCall = append(fake.implicitCollectionsArgsForCall, struct { 451 arg1 string 452 arg2 string 453 arg3 ledger.SimpleQueryExecutor 454 }{arg1, arg2, arg3}) 455 fake.recordInvocation("ImplicitCollections", []interface{}{arg1, arg2, arg3}) 456 fake.implicitCollectionsMutex.Unlock() 457 if fake.ImplicitCollectionsStub != nil { 458 return fake.ImplicitCollectionsStub(arg1, arg2, arg3) 459 } 460 if specificReturn { 461 return ret.result1, ret.result2 462 } 463 fakeReturns := fake.implicitCollectionsReturns 464 return fakeReturns.result1, fakeReturns.result2 465 } 466 467 func (fake *LegacyDeployedCCInfoProvider) ImplicitCollectionsCallCount() int { 468 fake.implicitCollectionsMutex.RLock() 469 defer fake.implicitCollectionsMutex.RUnlock() 470 return len(fake.implicitCollectionsArgsForCall) 471 } 472 473 func (fake *LegacyDeployedCCInfoProvider) ImplicitCollectionsCalls(stub func(string, string, ledger.SimpleQueryExecutor) ([]*peer.StaticCollectionConfig, error)) { 474 fake.implicitCollectionsMutex.Lock() 475 defer fake.implicitCollectionsMutex.Unlock() 476 fake.ImplicitCollectionsStub = stub 477 } 478 479 func (fake *LegacyDeployedCCInfoProvider) ImplicitCollectionsArgsForCall(i int) (string, string, ledger.SimpleQueryExecutor) { 480 fake.implicitCollectionsMutex.RLock() 481 defer fake.implicitCollectionsMutex.RUnlock() 482 argsForCall := fake.implicitCollectionsArgsForCall[i] 483 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 484 } 485 486 func (fake *LegacyDeployedCCInfoProvider) ImplicitCollectionsReturns(result1 []*peer.StaticCollectionConfig, result2 error) { 487 fake.implicitCollectionsMutex.Lock() 488 defer fake.implicitCollectionsMutex.Unlock() 489 fake.ImplicitCollectionsStub = nil 490 fake.implicitCollectionsReturns = struct { 491 result1 []*peer.StaticCollectionConfig 492 result2 error 493 }{result1, result2} 494 } 495 496 func (fake *LegacyDeployedCCInfoProvider) ImplicitCollectionsReturnsOnCall(i int, result1 []*peer.StaticCollectionConfig, result2 error) { 497 fake.implicitCollectionsMutex.Lock() 498 defer fake.implicitCollectionsMutex.Unlock() 499 fake.ImplicitCollectionsStub = nil 500 if fake.implicitCollectionsReturnsOnCall == nil { 501 fake.implicitCollectionsReturnsOnCall = make(map[int]struct { 502 result1 []*peer.StaticCollectionConfig 503 result2 error 504 }) 505 } 506 fake.implicitCollectionsReturnsOnCall[i] = struct { 507 result1 []*peer.StaticCollectionConfig 508 result2 error 509 }{result1, result2} 510 } 511 512 func (fake *LegacyDeployedCCInfoProvider) Namespaces() []string { 513 fake.namespacesMutex.Lock() 514 ret, specificReturn := fake.namespacesReturnsOnCall[len(fake.namespacesArgsForCall)] 515 fake.namespacesArgsForCall = append(fake.namespacesArgsForCall, struct { 516 }{}) 517 fake.recordInvocation("Namespaces", []interface{}{}) 518 fake.namespacesMutex.Unlock() 519 if fake.NamespacesStub != nil { 520 return fake.NamespacesStub() 521 } 522 if specificReturn { 523 return ret.result1 524 } 525 fakeReturns := fake.namespacesReturns 526 return fakeReturns.result1 527 } 528 529 func (fake *LegacyDeployedCCInfoProvider) NamespacesCallCount() int { 530 fake.namespacesMutex.RLock() 531 defer fake.namespacesMutex.RUnlock() 532 return len(fake.namespacesArgsForCall) 533 } 534 535 func (fake *LegacyDeployedCCInfoProvider) NamespacesCalls(stub func() []string) { 536 fake.namespacesMutex.Lock() 537 defer fake.namespacesMutex.Unlock() 538 fake.NamespacesStub = stub 539 } 540 541 func (fake *LegacyDeployedCCInfoProvider) NamespacesReturns(result1 []string) { 542 fake.namespacesMutex.Lock() 543 defer fake.namespacesMutex.Unlock() 544 fake.NamespacesStub = nil 545 fake.namespacesReturns = struct { 546 result1 []string 547 }{result1} 548 } 549 550 func (fake *LegacyDeployedCCInfoProvider) NamespacesReturnsOnCall(i int, result1 []string) { 551 fake.namespacesMutex.Lock() 552 defer fake.namespacesMutex.Unlock() 553 fake.NamespacesStub = nil 554 if fake.namespacesReturnsOnCall == nil { 555 fake.namespacesReturnsOnCall = make(map[int]struct { 556 result1 []string 557 }) 558 } 559 fake.namespacesReturnsOnCall[i] = struct { 560 result1 []string 561 }{result1} 562 } 563 564 func (fake *LegacyDeployedCCInfoProvider) UpdatedChaincodes(arg1 map[string][]*kvrwset.KVWrite) ([]*ledger.ChaincodeLifecycleInfo, error) { 565 fake.updatedChaincodesMutex.Lock() 566 ret, specificReturn := fake.updatedChaincodesReturnsOnCall[len(fake.updatedChaincodesArgsForCall)] 567 fake.updatedChaincodesArgsForCall = append(fake.updatedChaincodesArgsForCall, struct { 568 arg1 map[string][]*kvrwset.KVWrite 569 }{arg1}) 570 fake.recordInvocation("UpdatedChaincodes", []interface{}{arg1}) 571 fake.updatedChaincodesMutex.Unlock() 572 if fake.UpdatedChaincodesStub != nil { 573 return fake.UpdatedChaincodesStub(arg1) 574 } 575 if specificReturn { 576 return ret.result1, ret.result2 577 } 578 fakeReturns := fake.updatedChaincodesReturns 579 return fakeReturns.result1, fakeReturns.result2 580 } 581 582 func (fake *LegacyDeployedCCInfoProvider) UpdatedChaincodesCallCount() int { 583 fake.updatedChaincodesMutex.RLock() 584 defer fake.updatedChaincodesMutex.RUnlock() 585 return len(fake.updatedChaincodesArgsForCall) 586 } 587 588 func (fake *LegacyDeployedCCInfoProvider) UpdatedChaincodesCalls(stub func(map[string][]*kvrwset.KVWrite) ([]*ledger.ChaincodeLifecycleInfo, error)) { 589 fake.updatedChaincodesMutex.Lock() 590 defer fake.updatedChaincodesMutex.Unlock() 591 fake.UpdatedChaincodesStub = stub 592 } 593 594 func (fake *LegacyDeployedCCInfoProvider) UpdatedChaincodesArgsForCall(i int) map[string][]*kvrwset.KVWrite { 595 fake.updatedChaincodesMutex.RLock() 596 defer fake.updatedChaincodesMutex.RUnlock() 597 argsForCall := fake.updatedChaincodesArgsForCall[i] 598 return argsForCall.arg1 599 } 600 601 func (fake *LegacyDeployedCCInfoProvider) UpdatedChaincodesReturns(result1 []*ledger.ChaincodeLifecycleInfo, result2 error) { 602 fake.updatedChaincodesMutex.Lock() 603 defer fake.updatedChaincodesMutex.Unlock() 604 fake.UpdatedChaincodesStub = nil 605 fake.updatedChaincodesReturns = struct { 606 result1 []*ledger.ChaincodeLifecycleInfo 607 result2 error 608 }{result1, result2} 609 } 610 611 func (fake *LegacyDeployedCCInfoProvider) UpdatedChaincodesReturnsOnCall(i int, result1 []*ledger.ChaincodeLifecycleInfo, result2 error) { 612 fake.updatedChaincodesMutex.Lock() 613 defer fake.updatedChaincodesMutex.Unlock() 614 fake.UpdatedChaincodesStub = nil 615 if fake.updatedChaincodesReturnsOnCall == nil { 616 fake.updatedChaincodesReturnsOnCall = make(map[int]struct { 617 result1 []*ledger.ChaincodeLifecycleInfo 618 result2 error 619 }) 620 } 621 fake.updatedChaincodesReturnsOnCall[i] = struct { 622 result1 []*ledger.ChaincodeLifecycleInfo 623 result2 error 624 }{result1, result2} 625 } 626 627 func (fake *LegacyDeployedCCInfoProvider) Invocations() map[string][][]interface{} { 628 fake.invocationsMutex.RLock() 629 defer fake.invocationsMutex.RUnlock() 630 fake.allChaincodesInfoMutex.RLock() 631 defer fake.allChaincodesInfoMutex.RUnlock() 632 fake.allCollectionsConfigPkgMutex.RLock() 633 defer fake.allCollectionsConfigPkgMutex.RUnlock() 634 fake.chaincodeInfoMutex.RLock() 635 defer fake.chaincodeInfoMutex.RUnlock() 636 fake.collectionInfoMutex.RLock() 637 defer fake.collectionInfoMutex.RUnlock() 638 fake.generateImplicitCollectionForOrgMutex.RLock() 639 defer fake.generateImplicitCollectionForOrgMutex.RUnlock() 640 fake.implicitCollectionsMutex.RLock() 641 defer fake.implicitCollectionsMutex.RUnlock() 642 fake.namespacesMutex.RLock() 643 defer fake.namespacesMutex.RUnlock() 644 fake.updatedChaincodesMutex.RLock() 645 defer fake.updatedChaincodesMutex.RUnlock() 646 copiedInvocations := map[string][][]interface{}{} 647 for key, value := range fake.invocations { 648 copiedInvocations[key] = value 649 } 650 return copiedInvocations 651 } 652 653 func (fake *LegacyDeployedCCInfoProvider) recordInvocation(key string, args []interface{}) { 654 fake.invocationsMutex.Lock() 655 defer fake.invocationsMutex.Unlock() 656 if fake.invocations == nil { 657 fake.invocations = map[string][][]interface{}{} 658 } 659 if fake.invocations[key] == nil { 660 fake.invocations[key] = [][]interface{}{} 661 } 662 fake.invocations[key] = append(fake.invocations[key], args) 663 } 664 665 var _ lifecycle.LegacyDeployedCCInfoProvider = new(LegacyDeployedCCInfoProvider)