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