github.com/true-sqn/fabric@v2.1.1+incompatible/core/chaincode/mock/collection_store.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/peer" 8 "github.com/hyperledger/fabric/core/common/privdata" 9 "github.com/hyperledger/fabric/core/ledger" 10 ) 11 12 type CollectionStore struct { 13 AccessFilterStub func(string, *peer.CollectionPolicyConfig) (privdata.Filter, error) 14 accessFilterMutex sync.RWMutex 15 accessFilterArgsForCall []struct { 16 arg1 string 17 arg2 *peer.CollectionPolicyConfig 18 } 19 accessFilterReturns struct { 20 result1 privdata.Filter 21 result2 error 22 } 23 accessFilterReturnsOnCall map[int]struct { 24 result1 privdata.Filter 25 result2 error 26 } 27 RetrieveCollectionStub func(privdata.CollectionCriteria) (privdata.Collection, error) 28 retrieveCollectionMutex sync.RWMutex 29 retrieveCollectionArgsForCall []struct { 30 arg1 privdata.CollectionCriteria 31 } 32 retrieveCollectionReturns struct { 33 result1 privdata.Collection 34 result2 error 35 } 36 retrieveCollectionReturnsOnCall map[int]struct { 37 result1 privdata.Collection 38 result2 error 39 } 40 RetrieveCollectionAccessPolicyStub func(privdata.CollectionCriteria) (privdata.CollectionAccessPolicy, error) 41 retrieveCollectionAccessPolicyMutex sync.RWMutex 42 retrieveCollectionAccessPolicyArgsForCall []struct { 43 arg1 privdata.CollectionCriteria 44 } 45 retrieveCollectionAccessPolicyReturns struct { 46 result1 privdata.CollectionAccessPolicy 47 result2 error 48 } 49 retrieveCollectionAccessPolicyReturnsOnCall map[int]struct { 50 result1 privdata.CollectionAccessPolicy 51 result2 error 52 } 53 RetrieveCollectionConfigStub func(privdata.CollectionCriteria) (*peer.StaticCollectionConfig, error) 54 retrieveCollectionConfigMutex sync.RWMutex 55 retrieveCollectionConfigArgsForCall []struct { 56 arg1 privdata.CollectionCriteria 57 } 58 retrieveCollectionConfigReturns struct { 59 result1 *peer.StaticCollectionConfig 60 result2 error 61 } 62 retrieveCollectionConfigReturnsOnCall map[int]struct { 63 result1 *peer.StaticCollectionConfig 64 result2 error 65 } 66 RetrieveCollectionConfigPackageStub func(privdata.CollectionCriteria) (*peer.CollectionConfigPackage, error) 67 retrieveCollectionConfigPackageMutex sync.RWMutex 68 retrieveCollectionConfigPackageArgsForCall []struct { 69 arg1 privdata.CollectionCriteria 70 } 71 retrieveCollectionConfigPackageReturns struct { 72 result1 *peer.CollectionConfigPackage 73 result2 error 74 } 75 retrieveCollectionConfigPackageReturnsOnCall map[int]struct { 76 result1 *peer.CollectionConfigPackage 77 result2 error 78 } 79 RetrieveCollectionPersistenceConfigsStub func(privdata.CollectionCriteria) (privdata.CollectionPersistenceConfigs, error) 80 retrieveCollectionPersistenceConfigsMutex sync.RWMutex 81 retrieveCollectionPersistenceConfigsArgsForCall []struct { 82 arg1 privdata.CollectionCriteria 83 } 84 retrieveCollectionPersistenceConfigsReturns struct { 85 result1 privdata.CollectionPersistenceConfigs 86 result2 error 87 } 88 retrieveCollectionPersistenceConfigsReturnsOnCall map[int]struct { 89 result1 privdata.CollectionPersistenceConfigs 90 result2 error 91 } 92 RetrieveReadWritePermissionStub func(privdata.CollectionCriteria, *peer.SignedProposal, ledger.QueryExecutor) (bool, bool, error) 93 retrieveReadWritePermissionMutex sync.RWMutex 94 retrieveReadWritePermissionArgsForCall []struct { 95 arg1 privdata.CollectionCriteria 96 arg2 *peer.SignedProposal 97 arg3 ledger.QueryExecutor 98 } 99 retrieveReadWritePermissionReturns struct { 100 result1 bool 101 result2 bool 102 result3 error 103 } 104 retrieveReadWritePermissionReturnsOnCall map[int]struct { 105 result1 bool 106 result2 bool 107 result3 error 108 } 109 invocations map[string][][]interface{} 110 invocationsMutex sync.RWMutex 111 } 112 113 func (fake *CollectionStore) AccessFilter(arg1 string, arg2 *peer.CollectionPolicyConfig) (privdata.Filter, error) { 114 fake.accessFilterMutex.Lock() 115 ret, specificReturn := fake.accessFilterReturnsOnCall[len(fake.accessFilterArgsForCall)] 116 fake.accessFilterArgsForCall = append(fake.accessFilterArgsForCall, struct { 117 arg1 string 118 arg2 *peer.CollectionPolicyConfig 119 }{arg1, arg2}) 120 fake.recordInvocation("AccessFilter", []interface{}{arg1, arg2}) 121 fake.accessFilterMutex.Unlock() 122 if fake.AccessFilterStub != nil { 123 return fake.AccessFilterStub(arg1, arg2) 124 } 125 if specificReturn { 126 return ret.result1, ret.result2 127 } 128 fakeReturns := fake.accessFilterReturns 129 return fakeReturns.result1, fakeReturns.result2 130 } 131 132 func (fake *CollectionStore) AccessFilterCallCount() int { 133 fake.accessFilterMutex.RLock() 134 defer fake.accessFilterMutex.RUnlock() 135 return len(fake.accessFilterArgsForCall) 136 } 137 138 func (fake *CollectionStore) AccessFilterCalls(stub func(string, *peer.CollectionPolicyConfig) (privdata.Filter, error)) { 139 fake.accessFilterMutex.Lock() 140 defer fake.accessFilterMutex.Unlock() 141 fake.AccessFilterStub = stub 142 } 143 144 func (fake *CollectionStore) AccessFilterArgsForCall(i int) (string, *peer.CollectionPolicyConfig) { 145 fake.accessFilterMutex.RLock() 146 defer fake.accessFilterMutex.RUnlock() 147 argsForCall := fake.accessFilterArgsForCall[i] 148 return argsForCall.arg1, argsForCall.arg2 149 } 150 151 func (fake *CollectionStore) AccessFilterReturns(result1 privdata.Filter, result2 error) { 152 fake.accessFilterMutex.Lock() 153 defer fake.accessFilterMutex.Unlock() 154 fake.AccessFilterStub = nil 155 fake.accessFilterReturns = struct { 156 result1 privdata.Filter 157 result2 error 158 }{result1, result2} 159 } 160 161 func (fake *CollectionStore) AccessFilterReturnsOnCall(i int, result1 privdata.Filter, result2 error) { 162 fake.accessFilterMutex.Lock() 163 defer fake.accessFilterMutex.Unlock() 164 fake.AccessFilterStub = nil 165 if fake.accessFilterReturnsOnCall == nil { 166 fake.accessFilterReturnsOnCall = make(map[int]struct { 167 result1 privdata.Filter 168 result2 error 169 }) 170 } 171 fake.accessFilterReturnsOnCall[i] = struct { 172 result1 privdata.Filter 173 result2 error 174 }{result1, result2} 175 } 176 177 func (fake *CollectionStore) RetrieveCollection(arg1 privdata.CollectionCriteria) (privdata.Collection, error) { 178 fake.retrieveCollectionMutex.Lock() 179 ret, specificReturn := fake.retrieveCollectionReturnsOnCall[len(fake.retrieveCollectionArgsForCall)] 180 fake.retrieveCollectionArgsForCall = append(fake.retrieveCollectionArgsForCall, struct { 181 arg1 privdata.CollectionCriteria 182 }{arg1}) 183 fake.recordInvocation("RetrieveCollection", []interface{}{arg1}) 184 fake.retrieveCollectionMutex.Unlock() 185 if fake.RetrieveCollectionStub != nil { 186 return fake.RetrieveCollectionStub(arg1) 187 } 188 if specificReturn { 189 return ret.result1, ret.result2 190 } 191 fakeReturns := fake.retrieveCollectionReturns 192 return fakeReturns.result1, fakeReturns.result2 193 } 194 195 func (fake *CollectionStore) RetrieveCollectionCallCount() int { 196 fake.retrieveCollectionMutex.RLock() 197 defer fake.retrieveCollectionMutex.RUnlock() 198 return len(fake.retrieveCollectionArgsForCall) 199 } 200 201 func (fake *CollectionStore) RetrieveCollectionCalls(stub func(privdata.CollectionCriteria) (privdata.Collection, error)) { 202 fake.retrieveCollectionMutex.Lock() 203 defer fake.retrieveCollectionMutex.Unlock() 204 fake.RetrieveCollectionStub = stub 205 } 206 207 func (fake *CollectionStore) RetrieveCollectionArgsForCall(i int) privdata.CollectionCriteria { 208 fake.retrieveCollectionMutex.RLock() 209 defer fake.retrieveCollectionMutex.RUnlock() 210 argsForCall := fake.retrieveCollectionArgsForCall[i] 211 return argsForCall.arg1 212 } 213 214 func (fake *CollectionStore) RetrieveCollectionReturns(result1 privdata.Collection, result2 error) { 215 fake.retrieveCollectionMutex.Lock() 216 defer fake.retrieveCollectionMutex.Unlock() 217 fake.RetrieveCollectionStub = nil 218 fake.retrieveCollectionReturns = struct { 219 result1 privdata.Collection 220 result2 error 221 }{result1, result2} 222 } 223 224 func (fake *CollectionStore) RetrieveCollectionReturnsOnCall(i int, result1 privdata.Collection, result2 error) { 225 fake.retrieveCollectionMutex.Lock() 226 defer fake.retrieveCollectionMutex.Unlock() 227 fake.RetrieveCollectionStub = nil 228 if fake.retrieveCollectionReturnsOnCall == nil { 229 fake.retrieveCollectionReturnsOnCall = make(map[int]struct { 230 result1 privdata.Collection 231 result2 error 232 }) 233 } 234 fake.retrieveCollectionReturnsOnCall[i] = struct { 235 result1 privdata.Collection 236 result2 error 237 }{result1, result2} 238 } 239 240 func (fake *CollectionStore) RetrieveCollectionAccessPolicy(arg1 privdata.CollectionCriteria) (privdata.CollectionAccessPolicy, error) { 241 fake.retrieveCollectionAccessPolicyMutex.Lock() 242 ret, specificReturn := fake.retrieveCollectionAccessPolicyReturnsOnCall[len(fake.retrieveCollectionAccessPolicyArgsForCall)] 243 fake.retrieveCollectionAccessPolicyArgsForCall = append(fake.retrieveCollectionAccessPolicyArgsForCall, struct { 244 arg1 privdata.CollectionCriteria 245 }{arg1}) 246 fake.recordInvocation("RetrieveCollectionAccessPolicy", []interface{}{arg1}) 247 fake.retrieveCollectionAccessPolicyMutex.Unlock() 248 if fake.RetrieveCollectionAccessPolicyStub != nil { 249 return fake.RetrieveCollectionAccessPolicyStub(arg1) 250 } 251 if specificReturn { 252 return ret.result1, ret.result2 253 } 254 fakeReturns := fake.retrieveCollectionAccessPolicyReturns 255 return fakeReturns.result1, fakeReturns.result2 256 } 257 258 func (fake *CollectionStore) RetrieveCollectionAccessPolicyCallCount() int { 259 fake.retrieveCollectionAccessPolicyMutex.RLock() 260 defer fake.retrieveCollectionAccessPolicyMutex.RUnlock() 261 return len(fake.retrieveCollectionAccessPolicyArgsForCall) 262 } 263 264 func (fake *CollectionStore) RetrieveCollectionAccessPolicyCalls(stub func(privdata.CollectionCriteria) (privdata.CollectionAccessPolicy, error)) { 265 fake.retrieveCollectionAccessPolicyMutex.Lock() 266 defer fake.retrieveCollectionAccessPolicyMutex.Unlock() 267 fake.RetrieveCollectionAccessPolicyStub = stub 268 } 269 270 func (fake *CollectionStore) RetrieveCollectionAccessPolicyArgsForCall(i int) privdata.CollectionCriteria { 271 fake.retrieveCollectionAccessPolicyMutex.RLock() 272 defer fake.retrieveCollectionAccessPolicyMutex.RUnlock() 273 argsForCall := fake.retrieveCollectionAccessPolicyArgsForCall[i] 274 return argsForCall.arg1 275 } 276 277 func (fake *CollectionStore) RetrieveCollectionAccessPolicyReturns(result1 privdata.CollectionAccessPolicy, result2 error) { 278 fake.retrieveCollectionAccessPolicyMutex.Lock() 279 defer fake.retrieveCollectionAccessPolicyMutex.Unlock() 280 fake.RetrieveCollectionAccessPolicyStub = nil 281 fake.retrieveCollectionAccessPolicyReturns = struct { 282 result1 privdata.CollectionAccessPolicy 283 result2 error 284 }{result1, result2} 285 } 286 287 func (fake *CollectionStore) RetrieveCollectionAccessPolicyReturnsOnCall(i int, result1 privdata.CollectionAccessPolicy, result2 error) { 288 fake.retrieveCollectionAccessPolicyMutex.Lock() 289 defer fake.retrieveCollectionAccessPolicyMutex.Unlock() 290 fake.RetrieveCollectionAccessPolicyStub = nil 291 if fake.retrieveCollectionAccessPolicyReturnsOnCall == nil { 292 fake.retrieveCollectionAccessPolicyReturnsOnCall = make(map[int]struct { 293 result1 privdata.CollectionAccessPolicy 294 result2 error 295 }) 296 } 297 fake.retrieveCollectionAccessPolicyReturnsOnCall[i] = struct { 298 result1 privdata.CollectionAccessPolicy 299 result2 error 300 }{result1, result2} 301 } 302 303 func (fake *CollectionStore) RetrieveCollectionConfig(arg1 privdata.CollectionCriteria) (*peer.StaticCollectionConfig, error) { 304 fake.retrieveCollectionConfigMutex.Lock() 305 ret, specificReturn := fake.retrieveCollectionConfigReturnsOnCall[len(fake.retrieveCollectionConfigArgsForCall)] 306 fake.retrieveCollectionConfigArgsForCall = append(fake.retrieveCollectionConfigArgsForCall, struct { 307 arg1 privdata.CollectionCriteria 308 }{arg1}) 309 fake.recordInvocation("RetrieveCollectionConfig", []interface{}{arg1}) 310 fake.retrieveCollectionConfigMutex.Unlock() 311 if fake.RetrieveCollectionConfigStub != nil { 312 return fake.RetrieveCollectionConfigStub(arg1) 313 } 314 if specificReturn { 315 return ret.result1, ret.result2 316 } 317 fakeReturns := fake.retrieveCollectionConfigReturns 318 return fakeReturns.result1, fakeReturns.result2 319 } 320 321 func (fake *CollectionStore) RetrieveCollectionConfigCallCount() int { 322 fake.retrieveCollectionConfigMutex.RLock() 323 defer fake.retrieveCollectionConfigMutex.RUnlock() 324 return len(fake.retrieveCollectionConfigArgsForCall) 325 } 326 327 func (fake *CollectionStore) RetrieveCollectionConfigCalls(stub func(privdata.CollectionCriteria) (*peer.StaticCollectionConfig, error)) { 328 fake.retrieveCollectionConfigMutex.Lock() 329 defer fake.retrieveCollectionConfigMutex.Unlock() 330 fake.RetrieveCollectionConfigStub = stub 331 } 332 333 func (fake *CollectionStore) RetrieveCollectionConfigArgsForCall(i int) privdata.CollectionCriteria { 334 fake.retrieveCollectionConfigMutex.RLock() 335 defer fake.retrieveCollectionConfigMutex.RUnlock() 336 argsForCall := fake.retrieveCollectionConfigArgsForCall[i] 337 return argsForCall.arg1 338 } 339 340 func (fake *CollectionStore) RetrieveCollectionConfigReturns(result1 *peer.StaticCollectionConfig, result2 error) { 341 fake.retrieveCollectionConfigMutex.Lock() 342 defer fake.retrieveCollectionConfigMutex.Unlock() 343 fake.RetrieveCollectionConfigStub = nil 344 fake.retrieveCollectionConfigReturns = struct { 345 result1 *peer.StaticCollectionConfig 346 result2 error 347 }{result1, result2} 348 } 349 350 func (fake *CollectionStore) RetrieveCollectionConfigReturnsOnCall(i int, result1 *peer.StaticCollectionConfig, result2 error) { 351 fake.retrieveCollectionConfigMutex.Lock() 352 defer fake.retrieveCollectionConfigMutex.Unlock() 353 fake.RetrieveCollectionConfigStub = nil 354 if fake.retrieveCollectionConfigReturnsOnCall == nil { 355 fake.retrieveCollectionConfigReturnsOnCall = make(map[int]struct { 356 result1 *peer.StaticCollectionConfig 357 result2 error 358 }) 359 } 360 fake.retrieveCollectionConfigReturnsOnCall[i] = struct { 361 result1 *peer.StaticCollectionConfig 362 result2 error 363 }{result1, result2} 364 } 365 366 func (fake *CollectionStore) RetrieveCollectionConfigPackage(arg1 privdata.CollectionCriteria) (*peer.CollectionConfigPackage, error) { 367 fake.retrieveCollectionConfigPackageMutex.Lock() 368 ret, specificReturn := fake.retrieveCollectionConfigPackageReturnsOnCall[len(fake.retrieveCollectionConfigPackageArgsForCall)] 369 fake.retrieveCollectionConfigPackageArgsForCall = append(fake.retrieveCollectionConfigPackageArgsForCall, struct { 370 arg1 privdata.CollectionCriteria 371 }{arg1}) 372 fake.recordInvocation("RetrieveCollectionConfigPackage", []interface{}{arg1}) 373 fake.retrieveCollectionConfigPackageMutex.Unlock() 374 if fake.RetrieveCollectionConfigPackageStub != nil { 375 return fake.RetrieveCollectionConfigPackageStub(arg1) 376 } 377 if specificReturn { 378 return ret.result1, ret.result2 379 } 380 fakeReturns := fake.retrieveCollectionConfigPackageReturns 381 return fakeReturns.result1, fakeReturns.result2 382 } 383 384 func (fake *CollectionStore) RetrieveCollectionConfigPackageCallCount() int { 385 fake.retrieveCollectionConfigPackageMutex.RLock() 386 defer fake.retrieveCollectionConfigPackageMutex.RUnlock() 387 return len(fake.retrieveCollectionConfigPackageArgsForCall) 388 } 389 390 func (fake *CollectionStore) RetrieveCollectionConfigPackageCalls(stub func(privdata.CollectionCriteria) (*peer.CollectionConfigPackage, error)) { 391 fake.retrieveCollectionConfigPackageMutex.Lock() 392 defer fake.retrieveCollectionConfigPackageMutex.Unlock() 393 fake.RetrieveCollectionConfigPackageStub = stub 394 } 395 396 func (fake *CollectionStore) RetrieveCollectionConfigPackageArgsForCall(i int) privdata.CollectionCriteria { 397 fake.retrieveCollectionConfigPackageMutex.RLock() 398 defer fake.retrieveCollectionConfigPackageMutex.RUnlock() 399 argsForCall := fake.retrieveCollectionConfigPackageArgsForCall[i] 400 return argsForCall.arg1 401 } 402 403 func (fake *CollectionStore) RetrieveCollectionConfigPackageReturns(result1 *peer.CollectionConfigPackage, result2 error) { 404 fake.retrieveCollectionConfigPackageMutex.Lock() 405 defer fake.retrieveCollectionConfigPackageMutex.Unlock() 406 fake.RetrieveCollectionConfigPackageStub = nil 407 fake.retrieveCollectionConfigPackageReturns = struct { 408 result1 *peer.CollectionConfigPackage 409 result2 error 410 }{result1, result2} 411 } 412 413 func (fake *CollectionStore) RetrieveCollectionConfigPackageReturnsOnCall(i int, result1 *peer.CollectionConfigPackage, result2 error) { 414 fake.retrieveCollectionConfigPackageMutex.Lock() 415 defer fake.retrieveCollectionConfigPackageMutex.Unlock() 416 fake.RetrieveCollectionConfigPackageStub = nil 417 if fake.retrieveCollectionConfigPackageReturnsOnCall == nil { 418 fake.retrieveCollectionConfigPackageReturnsOnCall = make(map[int]struct { 419 result1 *peer.CollectionConfigPackage 420 result2 error 421 }) 422 } 423 fake.retrieveCollectionConfigPackageReturnsOnCall[i] = struct { 424 result1 *peer.CollectionConfigPackage 425 result2 error 426 }{result1, result2} 427 } 428 429 func (fake *CollectionStore) RetrieveCollectionPersistenceConfigs(arg1 privdata.CollectionCriteria) (privdata.CollectionPersistenceConfigs, error) { 430 fake.retrieveCollectionPersistenceConfigsMutex.Lock() 431 ret, specificReturn := fake.retrieveCollectionPersistenceConfigsReturnsOnCall[len(fake.retrieveCollectionPersistenceConfigsArgsForCall)] 432 fake.retrieveCollectionPersistenceConfigsArgsForCall = append(fake.retrieveCollectionPersistenceConfigsArgsForCall, struct { 433 arg1 privdata.CollectionCriteria 434 }{arg1}) 435 fake.recordInvocation("RetrieveCollectionPersistenceConfigs", []interface{}{arg1}) 436 fake.retrieveCollectionPersistenceConfigsMutex.Unlock() 437 if fake.RetrieveCollectionPersistenceConfigsStub != nil { 438 return fake.RetrieveCollectionPersistenceConfigsStub(arg1) 439 } 440 if specificReturn { 441 return ret.result1, ret.result2 442 } 443 fakeReturns := fake.retrieveCollectionPersistenceConfigsReturns 444 return fakeReturns.result1, fakeReturns.result2 445 } 446 447 func (fake *CollectionStore) RetrieveCollectionPersistenceConfigsCallCount() int { 448 fake.retrieveCollectionPersistenceConfigsMutex.RLock() 449 defer fake.retrieveCollectionPersistenceConfigsMutex.RUnlock() 450 return len(fake.retrieveCollectionPersistenceConfigsArgsForCall) 451 } 452 453 func (fake *CollectionStore) RetrieveCollectionPersistenceConfigsCalls(stub func(privdata.CollectionCriteria) (privdata.CollectionPersistenceConfigs, error)) { 454 fake.retrieveCollectionPersistenceConfigsMutex.Lock() 455 defer fake.retrieveCollectionPersistenceConfigsMutex.Unlock() 456 fake.RetrieveCollectionPersistenceConfigsStub = stub 457 } 458 459 func (fake *CollectionStore) RetrieveCollectionPersistenceConfigsArgsForCall(i int) privdata.CollectionCriteria { 460 fake.retrieveCollectionPersistenceConfigsMutex.RLock() 461 defer fake.retrieveCollectionPersistenceConfigsMutex.RUnlock() 462 argsForCall := fake.retrieveCollectionPersistenceConfigsArgsForCall[i] 463 return argsForCall.arg1 464 } 465 466 func (fake *CollectionStore) RetrieveCollectionPersistenceConfigsReturns(result1 privdata.CollectionPersistenceConfigs, result2 error) { 467 fake.retrieveCollectionPersistenceConfigsMutex.Lock() 468 defer fake.retrieveCollectionPersistenceConfigsMutex.Unlock() 469 fake.RetrieveCollectionPersistenceConfigsStub = nil 470 fake.retrieveCollectionPersistenceConfigsReturns = struct { 471 result1 privdata.CollectionPersistenceConfigs 472 result2 error 473 }{result1, result2} 474 } 475 476 func (fake *CollectionStore) RetrieveCollectionPersistenceConfigsReturnsOnCall(i int, result1 privdata.CollectionPersistenceConfigs, result2 error) { 477 fake.retrieveCollectionPersistenceConfigsMutex.Lock() 478 defer fake.retrieveCollectionPersistenceConfigsMutex.Unlock() 479 fake.RetrieveCollectionPersistenceConfigsStub = nil 480 if fake.retrieveCollectionPersistenceConfigsReturnsOnCall == nil { 481 fake.retrieveCollectionPersistenceConfigsReturnsOnCall = make(map[int]struct { 482 result1 privdata.CollectionPersistenceConfigs 483 result2 error 484 }) 485 } 486 fake.retrieveCollectionPersistenceConfigsReturnsOnCall[i] = struct { 487 result1 privdata.CollectionPersistenceConfigs 488 result2 error 489 }{result1, result2} 490 } 491 492 func (fake *CollectionStore) RetrieveReadWritePermission(arg1 privdata.CollectionCriteria, arg2 *peer.SignedProposal, arg3 ledger.QueryExecutor) (bool, bool, error) { 493 fake.retrieveReadWritePermissionMutex.Lock() 494 ret, specificReturn := fake.retrieveReadWritePermissionReturnsOnCall[len(fake.retrieveReadWritePermissionArgsForCall)] 495 fake.retrieveReadWritePermissionArgsForCall = append(fake.retrieveReadWritePermissionArgsForCall, struct { 496 arg1 privdata.CollectionCriteria 497 arg2 *peer.SignedProposal 498 arg3 ledger.QueryExecutor 499 }{arg1, arg2, arg3}) 500 fake.recordInvocation("RetrieveReadWritePermission", []interface{}{arg1, arg2, arg3}) 501 fake.retrieveReadWritePermissionMutex.Unlock() 502 if fake.RetrieveReadWritePermissionStub != nil { 503 return fake.RetrieveReadWritePermissionStub(arg1, arg2, arg3) 504 } 505 if specificReturn { 506 return ret.result1, ret.result2, ret.result3 507 } 508 fakeReturns := fake.retrieveReadWritePermissionReturns 509 return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3 510 } 511 512 func (fake *CollectionStore) RetrieveReadWritePermissionCallCount() int { 513 fake.retrieveReadWritePermissionMutex.RLock() 514 defer fake.retrieveReadWritePermissionMutex.RUnlock() 515 return len(fake.retrieveReadWritePermissionArgsForCall) 516 } 517 518 func (fake *CollectionStore) RetrieveReadWritePermissionCalls(stub func(privdata.CollectionCriteria, *peer.SignedProposal, ledger.QueryExecutor) (bool, bool, error)) { 519 fake.retrieveReadWritePermissionMutex.Lock() 520 defer fake.retrieveReadWritePermissionMutex.Unlock() 521 fake.RetrieveReadWritePermissionStub = stub 522 } 523 524 func (fake *CollectionStore) RetrieveReadWritePermissionArgsForCall(i int) (privdata.CollectionCriteria, *peer.SignedProposal, ledger.QueryExecutor) { 525 fake.retrieveReadWritePermissionMutex.RLock() 526 defer fake.retrieveReadWritePermissionMutex.RUnlock() 527 argsForCall := fake.retrieveReadWritePermissionArgsForCall[i] 528 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 529 } 530 531 func (fake *CollectionStore) RetrieveReadWritePermissionReturns(result1 bool, result2 bool, result3 error) { 532 fake.retrieveReadWritePermissionMutex.Lock() 533 defer fake.retrieveReadWritePermissionMutex.Unlock() 534 fake.RetrieveReadWritePermissionStub = nil 535 fake.retrieveReadWritePermissionReturns = struct { 536 result1 bool 537 result2 bool 538 result3 error 539 }{result1, result2, result3} 540 } 541 542 func (fake *CollectionStore) RetrieveReadWritePermissionReturnsOnCall(i int, result1 bool, result2 bool, result3 error) { 543 fake.retrieveReadWritePermissionMutex.Lock() 544 defer fake.retrieveReadWritePermissionMutex.Unlock() 545 fake.RetrieveReadWritePermissionStub = nil 546 if fake.retrieveReadWritePermissionReturnsOnCall == nil { 547 fake.retrieveReadWritePermissionReturnsOnCall = make(map[int]struct { 548 result1 bool 549 result2 bool 550 result3 error 551 }) 552 } 553 fake.retrieveReadWritePermissionReturnsOnCall[i] = struct { 554 result1 bool 555 result2 bool 556 result3 error 557 }{result1, result2, result3} 558 } 559 560 func (fake *CollectionStore) Invocations() map[string][][]interface{} { 561 fake.invocationsMutex.RLock() 562 defer fake.invocationsMutex.RUnlock() 563 fake.accessFilterMutex.RLock() 564 defer fake.accessFilterMutex.RUnlock() 565 fake.retrieveCollectionMutex.RLock() 566 defer fake.retrieveCollectionMutex.RUnlock() 567 fake.retrieveCollectionAccessPolicyMutex.RLock() 568 defer fake.retrieveCollectionAccessPolicyMutex.RUnlock() 569 fake.retrieveCollectionConfigMutex.RLock() 570 defer fake.retrieveCollectionConfigMutex.RUnlock() 571 fake.retrieveCollectionConfigPackageMutex.RLock() 572 defer fake.retrieveCollectionConfigPackageMutex.RUnlock() 573 fake.retrieveCollectionPersistenceConfigsMutex.RLock() 574 defer fake.retrieveCollectionPersistenceConfigsMutex.RUnlock() 575 fake.retrieveReadWritePermissionMutex.RLock() 576 defer fake.retrieveReadWritePermissionMutex.RUnlock() 577 copiedInvocations := map[string][][]interface{}{} 578 for key, value := range fake.invocations { 579 copiedInvocations[key] = value 580 } 581 return copiedInvocations 582 } 583 584 func (fake *CollectionStore) recordInvocation(key string, args []interface{}) { 585 fake.invocationsMutex.Lock() 586 defer fake.invocationsMutex.Unlock() 587 if fake.invocations == nil { 588 fake.invocations = map[string][][]interface{}{} 589 } 590 if fake.invocations[key] == nil { 591 fake.invocations[key] = [][]interface{}{} 592 } 593 fake.invocations[key] = append(fake.invocations[key], args) 594 }