github.com/operator-framework/operator-lifecycle-manager@v0.30.0/pkg/package-server/client/fakes/fake_registry_client.go (about) 1 // Code generated by counterfeiter. DO NOT EDIT. 2 package fakes 3 4 import ( 5 "context" 6 "sync" 7 8 "github.com/operator-framework/operator-registry/pkg/api" 9 "google.golang.org/grpc" 10 ) 11 12 type FakeRegistryClient struct { 13 GetBundleStub func(context.Context, *api.GetBundleRequest, ...grpc.CallOption) (*api.Bundle, error) 14 getBundleMutex sync.RWMutex 15 getBundleArgsForCall []struct { 16 arg1 context.Context 17 arg2 *api.GetBundleRequest 18 arg3 []grpc.CallOption 19 } 20 getBundleReturns struct { 21 result1 *api.Bundle 22 result2 error 23 } 24 getBundleReturnsOnCall map[int]struct { 25 result1 *api.Bundle 26 result2 error 27 } 28 GetBundleForChannelStub func(context.Context, *api.GetBundleInChannelRequest, ...grpc.CallOption) (*api.Bundle, error) 29 getBundleForChannelMutex sync.RWMutex 30 getBundleForChannelArgsForCall []struct { 31 arg1 context.Context 32 arg2 *api.GetBundleInChannelRequest 33 arg3 []grpc.CallOption 34 } 35 getBundleForChannelReturns struct { 36 result1 *api.Bundle 37 result2 error 38 } 39 getBundleForChannelReturnsOnCall map[int]struct { 40 result1 *api.Bundle 41 result2 error 42 } 43 GetBundleThatReplacesStub func(context.Context, *api.GetReplacementRequest, ...grpc.CallOption) (*api.Bundle, error) 44 getBundleThatReplacesMutex sync.RWMutex 45 getBundleThatReplacesArgsForCall []struct { 46 arg1 context.Context 47 arg2 *api.GetReplacementRequest 48 arg3 []grpc.CallOption 49 } 50 getBundleThatReplacesReturns struct { 51 result1 *api.Bundle 52 result2 error 53 } 54 getBundleThatReplacesReturnsOnCall map[int]struct { 55 result1 *api.Bundle 56 result2 error 57 } 58 GetChannelEntriesThatProvideStub func(context.Context, *api.GetAllProvidersRequest, ...grpc.CallOption) (api.Registry_GetChannelEntriesThatProvideClient, error) 59 getChannelEntriesThatProvideMutex sync.RWMutex 60 getChannelEntriesThatProvideArgsForCall []struct { 61 arg1 context.Context 62 arg2 *api.GetAllProvidersRequest 63 arg3 []grpc.CallOption 64 } 65 getChannelEntriesThatProvideReturns struct { 66 result1 api.Registry_GetChannelEntriesThatProvideClient 67 result2 error 68 } 69 getChannelEntriesThatProvideReturnsOnCall map[int]struct { 70 result1 api.Registry_GetChannelEntriesThatProvideClient 71 result2 error 72 } 73 GetChannelEntriesThatReplaceStub func(context.Context, *api.GetAllReplacementsRequest, ...grpc.CallOption) (api.Registry_GetChannelEntriesThatReplaceClient, error) 74 getChannelEntriesThatReplaceMutex sync.RWMutex 75 getChannelEntriesThatReplaceArgsForCall []struct { 76 arg1 context.Context 77 arg2 *api.GetAllReplacementsRequest 78 arg3 []grpc.CallOption 79 } 80 getChannelEntriesThatReplaceReturns struct { 81 result1 api.Registry_GetChannelEntriesThatReplaceClient 82 result2 error 83 } 84 getChannelEntriesThatReplaceReturnsOnCall map[int]struct { 85 result1 api.Registry_GetChannelEntriesThatReplaceClient 86 result2 error 87 } 88 GetDefaultBundleThatProvidesStub func(context.Context, *api.GetDefaultProviderRequest, ...grpc.CallOption) (*api.Bundle, error) 89 getDefaultBundleThatProvidesMutex sync.RWMutex 90 getDefaultBundleThatProvidesArgsForCall []struct { 91 arg1 context.Context 92 arg2 *api.GetDefaultProviderRequest 93 arg3 []grpc.CallOption 94 } 95 getDefaultBundleThatProvidesReturns struct { 96 result1 *api.Bundle 97 result2 error 98 } 99 getDefaultBundleThatProvidesReturnsOnCall map[int]struct { 100 result1 *api.Bundle 101 result2 error 102 } 103 GetLatestChannelEntriesThatProvideStub func(context.Context, *api.GetLatestProvidersRequest, ...grpc.CallOption) (api.Registry_GetLatestChannelEntriesThatProvideClient, error) 104 getLatestChannelEntriesThatProvideMutex sync.RWMutex 105 getLatestChannelEntriesThatProvideArgsForCall []struct { 106 arg1 context.Context 107 arg2 *api.GetLatestProvidersRequest 108 arg3 []grpc.CallOption 109 } 110 getLatestChannelEntriesThatProvideReturns struct { 111 result1 api.Registry_GetLatestChannelEntriesThatProvideClient 112 result2 error 113 } 114 getLatestChannelEntriesThatProvideReturnsOnCall map[int]struct { 115 result1 api.Registry_GetLatestChannelEntriesThatProvideClient 116 result2 error 117 } 118 GetPackageStub func(context.Context, *api.GetPackageRequest, ...grpc.CallOption) (*api.Package, error) 119 getPackageMutex sync.RWMutex 120 getPackageArgsForCall []struct { 121 arg1 context.Context 122 arg2 *api.GetPackageRequest 123 arg3 []grpc.CallOption 124 } 125 getPackageReturns struct { 126 result1 *api.Package 127 result2 error 128 } 129 getPackageReturnsOnCall map[int]struct { 130 result1 *api.Package 131 result2 error 132 } 133 ListBundlesStub func(context.Context, *api.ListBundlesRequest, ...grpc.CallOption) (api.Registry_ListBundlesClient, error) 134 listBundlesMutex sync.RWMutex 135 listBundlesArgsForCall []struct { 136 arg1 context.Context 137 arg2 *api.ListBundlesRequest 138 arg3 []grpc.CallOption 139 } 140 listBundlesReturns struct { 141 result1 api.Registry_ListBundlesClient 142 result2 error 143 } 144 listBundlesReturnsOnCall map[int]struct { 145 result1 api.Registry_ListBundlesClient 146 result2 error 147 } 148 ListPackagesStub func(context.Context, *api.ListPackageRequest, ...grpc.CallOption) (api.Registry_ListPackagesClient, error) 149 listPackagesMutex sync.RWMutex 150 listPackagesArgsForCall []struct { 151 arg1 context.Context 152 arg2 *api.ListPackageRequest 153 arg3 []grpc.CallOption 154 } 155 listPackagesReturns struct { 156 result1 api.Registry_ListPackagesClient 157 result2 error 158 } 159 listPackagesReturnsOnCall map[int]struct { 160 result1 api.Registry_ListPackagesClient 161 result2 error 162 } 163 invocations map[string][][]interface{} 164 invocationsMutex sync.RWMutex 165 } 166 167 func (fake *FakeRegistryClient) GetBundle(arg1 context.Context, arg2 *api.GetBundleRequest, arg3 ...grpc.CallOption) (*api.Bundle, error) { 168 fake.getBundleMutex.Lock() 169 ret, specificReturn := fake.getBundleReturnsOnCall[len(fake.getBundleArgsForCall)] 170 fake.getBundleArgsForCall = append(fake.getBundleArgsForCall, struct { 171 arg1 context.Context 172 arg2 *api.GetBundleRequest 173 arg3 []grpc.CallOption 174 }{arg1, arg2, arg3}) 175 stub := fake.GetBundleStub 176 fakeReturns := fake.getBundleReturns 177 fake.recordInvocation("GetBundle", []interface{}{arg1, arg2, arg3}) 178 fake.getBundleMutex.Unlock() 179 if stub != nil { 180 return stub(arg1, arg2, arg3...) 181 } 182 if specificReturn { 183 return ret.result1, ret.result2 184 } 185 return fakeReturns.result1, fakeReturns.result2 186 } 187 188 func (fake *FakeRegistryClient) GetBundleCallCount() int { 189 fake.getBundleMutex.RLock() 190 defer fake.getBundleMutex.RUnlock() 191 return len(fake.getBundleArgsForCall) 192 } 193 194 func (fake *FakeRegistryClient) GetBundleCalls(stub func(context.Context, *api.GetBundleRequest, ...grpc.CallOption) (*api.Bundle, error)) { 195 fake.getBundleMutex.Lock() 196 defer fake.getBundleMutex.Unlock() 197 fake.GetBundleStub = stub 198 } 199 200 func (fake *FakeRegistryClient) GetBundleArgsForCall(i int) (context.Context, *api.GetBundleRequest, []grpc.CallOption) { 201 fake.getBundleMutex.RLock() 202 defer fake.getBundleMutex.RUnlock() 203 argsForCall := fake.getBundleArgsForCall[i] 204 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 205 } 206 207 func (fake *FakeRegistryClient) GetBundleReturns(result1 *api.Bundle, result2 error) { 208 fake.getBundleMutex.Lock() 209 defer fake.getBundleMutex.Unlock() 210 fake.GetBundleStub = nil 211 fake.getBundleReturns = struct { 212 result1 *api.Bundle 213 result2 error 214 }{result1, result2} 215 } 216 217 func (fake *FakeRegistryClient) GetBundleReturnsOnCall(i int, result1 *api.Bundle, result2 error) { 218 fake.getBundleMutex.Lock() 219 defer fake.getBundleMutex.Unlock() 220 fake.GetBundleStub = nil 221 if fake.getBundleReturnsOnCall == nil { 222 fake.getBundleReturnsOnCall = make(map[int]struct { 223 result1 *api.Bundle 224 result2 error 225 }) 226 } 227 fake.getBundleReturnsOnCall[i] = struct { 228 result1 *api.Bundle 229 result2 error 230 }{result1, result2} 231 } 232 233 func (fake *FakeRegistryClient) GetBundleForChannel(arg1 context.Context, arg2 *api.GetBundleInChannelRequest, arg3 ...grpc.CallOption) (*api.Bundle, error) { 234 fake.getBundleForChannelMutex.Lock() 235 ret, specificReturn := fake.getBundleForChannelReturnsOnCall[len(fake.getBundleForChannelArgsForCall)] 236 fake.getBundleForChannelArgsForCall = append(fake.getBundleForChannelArgsForCall, struct { 237 arg1 context.Context 238 arg2 *api.GetBundleInChannelRequest 239 arg3 []grpc.CallOption 240 }{arg1, arg2, arg3}) 241 stub := fake.GetBundleForChannelStub 242 fakeReturns := fake.getBundleForChannelReturns 243 fake.recordInvocation("GetBundleForChannel", []interface{}{arg1, arg2, arg3}) 244 fake.getBundleForChannelMutex.Unlock() 245 if stub != nil { 246 return stub(arg1, arg2, arg3...) 247 } 248 if specificReturn { 249 return ret.result1, ret.result2 250 } 251 return fakeReturns.result1, fakeReturns.result2 252 } 253 254 func (fake *FakeRegistryClient) GetBundleForChannelCallCount() int { 255 fake.getBundleForChannelMutex.RLock() 256 defer fake.getBundleForChannelMutex.RUnlock() 257 return len(fake.getBundleForChannelArgsForCall) 258 } 259 260 func (fake *FakeRegistryClient) GetBundleForChannelCalls(stub func(context.Context, *api.GetBundleInChannelRequest, ...grpc.CallOption) (*api.Bundle, error)) { 261 fake.getBundleForChannelMutex.Lock() 262 defer fake.getBundleForChannelMutex.Unlock() 263 fake.GetBundleForChannelStub = stub 264 } 265 266 func (fake *FakeRegistryClient) GetBundleForChannelArgsForCall(i int) (context.Context, *api.GetBundleInChannelRequest, []grpc.CallOption) { 267 fake.getBundleForChannelMutex.RLock() 268 defer fake.getBundleForChannelMutex.RUnlock() 269 argsForCall := fake.getBundleForChannelArgsForCall[i] 270 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 271 } 272 273 func (fake *FakeRegistryClient) GetBundleForChannelReturns(result1 *api.Bundle, result2 error) { 274 fake.getBundleForChannelMutex.Lock() 275 defer fake.getBundleForChannelMutex.Unlock() 276 fake.GetBundleForChannelStub = nil 277 fake.getBundleForChannelReturns = struct { 278 result1 *api.Bundle 279 result2 error 280 }{result1, result2} 281 } 282 283 func (fake *FakeRegistryClient) GetBundleForChannelReturnsOnCall(i int, result1 *api.Bundle, result2 error) { 284 fake.getBundleForChannelMutex.Lock() 285 defer fake.getBundleForChannelMutex.Unlock() 286 fake.GetBundleForChannelStub = nil 287 if fake.getBundleForChannelReturnsOnCall == nil { 288 fake.getBundleForChannelReturnsOnCall = make(map[int]struct { 289 result1 *api.Bundle 290 result2 error 291 }) 292 } 293 fake.getBundleForChannelReturnsOnCall[i] = struct { 294 result1 *api.Bundle 295 result2 error 296 }{result1, result2} 297 } 298 299 func (fake *FakeRegistryClient) GetBundleThatReplaces(arg1 context.Context, arg2 *api.GetReplacementRequest, arg3 ...grpc.CallOption) (*api.Bundle, error) { 300 fake.getBundleThatReplacesMutex.Lock() 301 ret, specificReturn := fake.getBundleThatReplacesReturnsOnCall[len(fake.getBundleThatReplacesArgsForCall)] 302 fake.getBundleThatReplacesArgsForCall = append(fake.getBundleThatReplacesArgsForCall, struct { 303 arg1 context.Context 304 arg2 *api.GetReplacementRequest 305 arg3 []grpc.CallOption 306 }{arg1, arg2, arg3}) 307 stub := fake.GetBundleThatReplacesStub 308 fakeReturns := fake.getBundleThatReplacesReturns 309 fake.recordInvocation("GetBundleThatReplaces", []interface{}{arg1, arg2, arg3}) 310 fake.getBundleThatReplacesMutex.Unlock() 311 if stub != nil { 312 return stub(arg1, arg2, arg3...) 313 } 314 if specificReturn { 315 return ret.result1, ret.result2 316 } 317 return fakeReturns.result1, fakeReturns.result2 318 } 319 320 func (fake *FakeRegistryClient) GetBundleThatReplacesCallCount() int { 321 fake.getBundleThatReplacesMutex.RLock() 322 defer fake.getBundleThatReplacesMutex.RUnlock() 323 return len(fake.getBundleThatReplacesArgsForCall) 324 } 325 326 func (fake *FakeRegistryClient) GetBundleThatReplacesCalls(stub func(context.Context, *api.GetReplacementRequest, ...grpc.CallOption) (*api.Bundle, error)) { 327 fake.getBundleThatReplacesMutex.Lock() 328 defer fake.getBundleThatReplacesMutex.Unlock() 329 fake.GetBundleThatReplacesStub = stub 330 } 331 332 func (fake *FakeRegistryClient) GetBundleThatReplacesArgsForCall(i int) (context.Context, *api.GetReplacementRequest, []grpc.CallOption) { 333 fake.getBundleThatReplacesMutex.RLock() 334 defer fake.getBundleThatReplacesMutex.RUnlock() 335 argsForCall := fake.getBundleThatReplacesArgsForCall[i] 336 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 337 } 338 339 func (fake *FakeRegistryClient) GetBundleThatReplacesReturns(result1 *api.Bundle, result2 error) { 340 fake.getBundleThatReplacesMutex.Lock() 341 defer fake.getBundleThatReplacesMutex.Unlock() 342 fake.GetBundleThatReplacesStub = nil 343 fake.getBundleThatReplacesReturns = struct { 344 result1 *api.Bundle 345 result2 error 346 }{result1, result2} 347 } 348 349 func (fake *FakeRegistryClient) GetBundleThatReplacesReturnsOnCall(i int, result1 *api.Bundle, result2 error) { 350 fake.getBundleThatReplacesMutex.Lock() 351 defer fake.getBundleThatReplacesMutex.Unlock() 352 fake.GetBundleThatReplacesStub = nil 353 if fake.getBundleThatReplacesReturnsOnCall == nil { 354 fake.getBundleThatReplacesReturnsOnCall = make(map[int]struct { 355 result1 *api.Bundle 356 result2 error 357 }) 358 } 359 fake.getBundleThatReplacesReturnsOnCall[i] = struct { 360 result1 *api.Bundle 361 result2 error 362 }{result1, result2} 363 } 364 365 func (fake *FakeRegistryClient) GetChannelEntriesThatProvide(arg1 context.Context, arg2 *api.GetAllProvidersRequest, arg3 ...grpc.CallOption) (api.Registry_GetChannelEntriesThatProvideClient, error) { 366 fake.getChannelEntriesThatProvideMutex.Lock() 367 ret, specificReturn := fake.getChannelEntriesThatProvideReturnsOnCall[len(fake.getChannelEntriesThatProvideArgsForCall)] 368 fake.getChannelEntriesThatProvideArgsForCall = append(fake.getChannelEntriesThatProvideArgsForCall, struct { 369 arg1 context.Context 370 arg2 *api.GetAllProvidersRequest 371 arg3 []grpc.CallOption 372 }{arg1, arg2, arg3}) 373 stub := fake.GetChannelEntriesThatProvideStub 374 fakeReturns := fake.getChannelEntriesThatProvideReturns 375 fake.recordInvocation("GetChannelEntriesThatProvide", []interface{}{arg1, arg2, arg3}) 376 fake.getChannelEntriesThatProvideMutex.Unlock() 377 if stub != nil { 378 return stub(arg1, arg2, arg3...) 379 } 380 if specificReturn { 381 return ret.result1, ret.result2 382 } 383 return fakeReturns.result1, fakeReturns.result2 384 } 385 386 func (fake *FakeRegistryClient) GetChannelEntriesThatProvideCallCount() int { 387 fake.getChannelEntriesThatProvideMutex.RLock() 388 defer fake.getChannelEntriesThatProvideMutex.RUnlock() 389 return len(fake.getChannelEntriesThatProvideArgsForCall) 390 } 391 392 func (fake *FakeRegistryClient) GetChannelEntriesThatProvideCalls(stub func(context.Context, *api.GetAllProvidersRequest, ...grpc.CallOption) (api.Registry_GetChannelEntriesThatProvideClient, error)) { 393 fake.getChannelEntriesThatProvideMutex.Lock() 394 defer fake.getChannelEntriesThatProvideMutex.Unlock() 395 fake.GetChannelEntriesThatProvideStub = stub 396 } 397 398 func (fake *FakeRegistryClient) GetChannelEntriesThatProvideArgsForCall(i int) (context.Context, *api.GetAllProvidersRequest, []grpc.CallOption) { 399 fake.getChannelEntriesThatProvideMutex.RLock() 400 defer fake.getChannelEntriesThatProvideMutex.RUnlock() 401 argsForCall := fake.getChannelEntriesThatProvideArgsForCall[i] 402 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 403 } 404 405 func (fake *FakeRegistryClient) GetChannelEntriesThatProvideReturns(result1 api.Registry_GetChannelEntriesThatProvideClient, result2 error) { 406 fake.getChannelEntriesThatProvideMutex.Lock() 407 defer fake.getChannelEntriesThatProvideMutex.Unlock() 408 fake.GetChannelEntriesThatProvideStub = nil 409 fake.getChannelEntriesThatProvideReturns = struct { 410 result1 api.Registry_GetChannelEntriesThatProvideClient 411 result2 error 412 }{result1, result2} 413 } 414 415 func (fake *FakeRegistryClient) GetChannelEntriesThatProvideReturnsOnCall(i int, result1 api.Registry_GetChannelEntriesThatProvideClient, result2 error) { 416 fake.getChannelEntriesThatProvideMutex.Lock() 417 defer fake.getChannelEntriesThatProvideMutex.Unlock() 418 fake.GetChannelEntriesThatProvideStub = nil 419 if fake.getChannelEntriesThatProvideReturnsOnCall == nil { 420 fake.getChannelEntriesThatProvideReturnsOnCall = make(map[int]struct { 421 result1 api.Registry_GetChannelEntriesThatProvideClient 422 result2 error 423 }) 424 } 425 fake.getChannelEntriesThatProvideReturnsOnCall[i] = struct { 426 result1 api.Registry_GetChannelEntriesThatProvideClient 427 result2 error 428 }{result1, result2} 429 } 430 431 func (fake *FakeRegistryClient) GetChannelEntriesThatReplace(arg1 context.Context, arg2 *api.GetAllReplacementsRequest, arg3 ...grpc.CallOption) (api.Registry_GetChannelEntriesThatReplaceClient, error) { 432 fake.getChannelEntriesThatReplaceMutex.Lock() 433 ret, specificReturn := fake.getChannelEntriesThatReplaceReturnsOnCall[len(fake.getChannelEntriesThatReplaceArgsForCall)] 434 fake.getChannelEntriesThatReplaceArgsForCall = append(fake.getChannelEntriesThatReplaceArgsForCall, struct { 435 arg1 context.Context 436 arg2 *api.GetAllReplacementsRequest 437 arg3 []grpc.CallOption 438 }{arg1, arg2, arg3}) 439 stub := fake.GetChannelEntriesThatReplaceStub 440 fakeReturns := fake.getChannelEntriesThatReplaceReturns 441 fake.recordInvocation("GetChannelEntriesThatReplace", []interface{}{arg1, arg2, arg3}) 442 fake.getChannelEntriesThatReplaceMutex.Unlock() 443 if stub != nil { 444 return stub(arg1, arg2, arg3...) 445 } 446 if specificReturn { 447 return ret.result1, ret.result2 448 } 449 return fakeReturns.result1, fakeReturns.result2 450 } 451 452 func (fake *FakeRegistryClient) GetChannelEntriesThatReplaceCallCount() int { 453 fake.getChannelEntriesThatReplaceMutex.RLock() 454 defer fake.getChannelEntriesThatReplaceMutex.RUnlock() 455 return len(fake.getChannelEntriesThatReplaceArgsForCall) 456 } 457 458 func (fake *FakeRegistryClient) GetChannelEntriesThatReplaceCalls(stub func(context.Context, *api.GetAllReplacementsRequest, ...grpc.CallOption) (api.Registry_GetChannelEntriesThatReplaceClient, error)) { 459 fake.getChannelEntriesThatReplaceMutex.Lock() 460 defer fake.getChannelEntriesThatReplaceMutex.Unlock() 461 fake.GetChannelEntriesThatReplaceStub = stub 462 } 463 464 func (fake *FakeRegistryClient) GetChannelEntriesThatReplaceArgsForCall(i int) (context.Context, *api.GetAllReplacementsRequest, []grpc.CallOption) { 465 fake.getChannelEntriesThatReplaceMutex.RLock() 466 defer fake.getChannelEntriesThatReplaceMutex.RUnlock() 467 argsForCall := fake.getChannelEntriesThatReplaceArgsForCall[i] 468 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 469 } 470 471 func (fake *FakeRegistryClient) GetChannelEntriesThatReplaceReturns(result1 api.Registry_GetChannelEntriesThatReplaceClient, result2 error) { 472 fake.getChannelEntriesThatReplaceMutex.Lock() 473 defer fake.getChannelEntriesThatReplaceMutex.Unlock() 474 fake.GetChannelEntriesThatReplaceStub = nil 475 fake.getChannelEntriesThatReplaceReturns = struct { 476 result1 api.Registry_GetChannelEntriesThatReplaceClient 477 result2 error 478 }{result1, result2} 479 } 480 481 func (fake *FakeRegistryClient) GetChannelEntriesThatReplaceReturnsOnCall(i int, result1 api.Registry_GetChannelEntriesThatReplaceClient, result2 error) { 482 fake.getChannelEntriesThatReplaceMutex.Lock() 483 defer fake.getChannelEntriesThatReplaceMutex.Unlock() 484 fake.GetChannelEntriesThatReplaceStub = nil 485 if fake.getChannelEntriesThatReplaceReturnsOnCall == nil { 486 fake.getChannelEntriesThatReplaceReturnsOnCall = make(map[int]struct { 487 result1 api.Registry_GetChannelEntriesThatReplaceClient 488 result2 error 489 }) 490 } 491 fake.getChannelEntriesThatReplaceReturnsOnCall[i] = struct { 492 result1 api.Registry_GetChannelEntriesThatReplaceClient 493 result2 error 494 }{result1, result2} 495 } 496 497 func (fake *FakeRegistryClient) GetDefaultBundleThatProvides(arg1 context.Context, arg2 *api.GetDefaultProviderRequest, arg3 ...grpc.CallOption) (*api.Bundle, error) { 498 fake.getDefaultBundleThatProvidesMutex.Lock() 499 ret, specificReturn := fake.getDefaultBundleThatProvidesReturnsOnCall[len(fake.getDefaultBundleThatProvidesArgsForCall)] 500 fake.getDefaultBundleThatProvidesArgsForCall = append(fake.getDefaultBundleThatProvidesArgsForCall, struct { 501 arg1 context.Context 502 arg2 *api.GetDefaultProviderRequest 503 arg3 []grpc.CallOption 504 }{arg1, arg2, arg3}) 505 stub := fake.GetDefaultBundleThatProvidesStub 506 fakeReturns := fake.getDefaultBundleThatProvidesReturns 507 fake.recordInvocation("GetDefaultBundleThatProvides", []interface{}{arg1, arg2, arg3}) 508 fake.getDefaultBundleThatProvidesMutex.Unlock() 509 if stub != nil { 510 return stub(arg1, arg2, arg3...) 511 } 512 if specificReturn { 513 return ret.result1, ret.result2 514 } 515 return fakeReturns.result1, fakeReturns.result2 516 } 517 518 func (fake *FakeRegistryClient) GetDefaultBundleThatProvidesCallCount() int { 519 fake.getDefaultBundleThatProvidesMutex.RLock() 520 defer fake.getDefaultBundleThatProvidesMutex.RUnlock() 521 return len(fake.getDefaultBundleThatProvidesArgsForCall) 522 } 523 524 func (fake *FakeRegistryClient) GetDefaultBundleThatProvidesCalls(stub func(context.Context, *api.GetDefaultProviderRequest, ...grpc.CallOption) (*api.Bundle, error)) { 525 fake.getDefaultBundleThatProvidesMutex.Lock() 526 defer fake.getDefaultBundleThatProvidesMutex.Unlock() 527 fake.GetDefaultBundleThatProvidesStub = stub 528 } 529 530 func (fake *FakeRegistryClient) GetDefaultBundleThatProvidesArgsForCall(i int) (context.Context, *api.GetDefaultProviderRequest, []grpc.CallOption) { 531 fake.getDefaultBundleThatProvidesMutex.RLock() 532 defer fake.getDefaultBundleThatProvidesMutex.RUnlock() 533 argsForCall := fake.getDefaultBundleThatProvidesArgsForCall[i] 534 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 535 } 536 537 func (fake *FakeRegistryClient) GetDefaultBundleThatProvidesReturns(result1 *api.Bundle, result2 error) { 538 fake.getDefaultBundleThatProvidesMutex.Lock() 539 defer fake.getDefaultBundleThatProvidesMutex.Unlock() 540 fake.GetDefaultBundleThatProvidesStub = nil 541 fake.getDefaultBundleThatProvidesReturns = struct { 542 result1 *api.Bundle 543 result2 error 544 }{result1, result2} 545 } 546 547 func (fake *FakeRegistryClient) GetDefaultBundleThatProvidesReturnsOnCall(i int, result1 *api.Bundle, result2 error) { 548 fake.getDefaultBundleThatProvidesMutex.Lock() 549 defer fake.getDefaultBundleThatProvidesMutex.Unlock() 550 fake.GetDefaultBundleThatProvidesStub = nil 551 if fake.getDefaultBundleThatProvidesReturnsOnCall == nil { 552 fake.getDefaultBundleThatProvidesReturnsOnCall = make(map[int]struct { 553 result1 *api.Bundle 554 result2 error 555 }) 556 } 557 fake.getDefaultBundleThatProvidesReturnsOnCall[i] = struct { 558 result1 *api.Bundle 559 result2 error 560 }{result1, result2} 561 } 562 563 func (fake *FakeRegistryClient) GetLatestChannelEntriesThatProvide(arg1 context.Context, arg2 *api.GetLatestProvidersRequest, arg3 ...grpc.CallOption) (api.Registry_GetLatestChannelEntriesThatProvideClient, error) { 564 fake.getLatestChannelEntriesThatProvideMutex.Lock() 565 ret, specificReturn := fake.getLatestChannelEntriesThatProvideReturnsOnCall[len(fake.getLatestChannelEntriesThatProvideArgsForCall)] 566 fake.getLatestChannelEntriesThatProvideArgsForCall = append(fake.getLatestChannelEntriesThatProvideArgsForCall, struct { 567 arg1 context.Context 568 arg2 *api.GetLatestProvidersRequest 569 arg3 []grpc.CallOption 570 }{arg1, arg2, arg3}) 571 stub := fake.GetLatestChannelEntriesThatProvideStub 572 fakeReturns := fake.getLatestChannelEntriesThatProvideReturns 573 fake.recordInvocation("GetLatestChannelEntriesThatProvide", []interface{}{arg1, arg2, arg3}) 574 fake.getLatestChannelEntriesThatProvideMutex.Unlock() 575 if stub != nil { 576 return stub(arg1, arg2, arg3...) 577 } 578 if specificReturn { 579 return ret.result1, ret.result2 580 } 581 return fakeReturns.result1, fakeReturns.result2 582 } 583 584 func (fake *FakeRegistryClient) GetLatestChannelEntriesThatProvideCallCount() int { 585 fake.getLatestChannelEntriesThatProvideMutex.RLock() 586 defer fake.getLatestChannelEntriesThatProvideMutex.RUnlock() 587 return len(fake.getLatestChannelEntriesThatProvideArgsForCall) 588 } 589 590 func (fake *FakeRegistryClient) GetLatestChannelEntriesThatProvideCalls(stub func(context.Context, *api.GetLatestProvidersRequest, ...grpc.CallOption) (api.Registry_GetLatestChannelEntriesThatProvideClient, error)) { 591 fake.getLatestChannelEntriesThatProvideMutex.Lock() 592 defer fake.getLatestChannelEntriesThatProvideMutex.Unlock() 593 fake.GetLatestChannelEntriesThatProvideStub = stub 594 } 595 596 func (fake *FakeRegistryClient) GetLatestChannelEntriesThatProvideArgsForCall(i int) (context.Context, *api.GetLatestProvidersRequest, []grpc.CallOption) { 597 fake.getLatestChannelEntriesThatProvideMutex.RLock() 598 defer fake.getLatestChannelEntriesThatProvideMutex.RUnlock() 599 argsForCall := fake.getLatestChannelEntriesThatProvideArgsForCall[i] 600 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 601 } 602 603 func (fake *FakeRegistryClient) GetLatestChannelEntriesThatProvideReturns(result1 api.Registry_GetLatestChannelEntriesThatProvideClient, result2 error) { 604 fake.getLatestChannelEntriesThatProvideMutex.Lock() 605 defer fake.getLatestChannelEntriesThatProvideMutex.Unlock() 606 fake.GetLatestChannelEntriesThatProvideStub = nil 607 fake.getLatestChannelEntriesThatProvideReturns = struct { 608 result1 api.Registry_GetLatestChannelEntriesThatProvideClient 609 result2 error 610 }{result1, result2} 611 } 612 613 func (fake *FakeRegistryClient) GetLatestChannelEntriesThatProvideReturnsOnCall(i int, result1 api.Registry_GetLatestChannelEntriesThatProvideClient, result2 error) { 614 fake.getLatestChannelEntriesThatProvideMutex.Lock() 615 defer fake.getLatestChannelEntriesThatProvideMutex.Unlock() 616 fake.GetLatestChannelEntriesThatProvideStub = nil 617 if fake.getLatestChannelEntriesThatProvideReturnsOnCall == nil { 618 fake.getLatestChannelEntriesThatProvideReturnsOnCall = make(map[int]struct { 619 result1 api.Registry_GetLatestChannelEntriesThatProvideClient 620 result2 error 621 }) 622 } 623 fake.getLatestChannelEntriesThatProvideReturnsOnCall[i] = struct { 624 result1 api.Registry_GetLatestChannelEntriesThatProvideClient 625 result2 error 626 }{result1, result2} 627 } 628 629 func (fake *FakeRegistryClient) GetPackage(arg1 context.Context, arg2 *api.GetPackageRequest, arg3 ...grpc.CallOption) (*api.Package, error) { 630 fake.getPackageMutex.Lock() 631 ret, specificReturn := fake.getPackageReturnsOnCall[len(fake.getPackageArgsForCall)] 632 fake.getPackageArgsForCall = append(fake.getPackageArgsForCall, struct { 633 arg1 context.Context 634 arg2 *api.GetPackageRequest 635 arg3 []grpc.CallOption 636 }{arg1, arg2, arg3}) 637 stub := fake.GetPackageStub 638 fakeReturns := fake.getPackageReturns 639 fake.recordInvocation("GetPackage", []interface{}{arg1, arg2, arg3}) 640 fake.getPackageMutex.Unlock() 641 if stub != nil { 642 return stub(arg1, arg2, arg3...) 643 } 644 if specificReturn { 645 return ret.result1, ret.result2 646 } 647 return fakeReturns.result1, fakeReturns.result2 648 } 649 650 func (fake *FakeRegistryClient) GetPackageCallCount() int { 651 fake.getPackageMutex.RLock() 652 defer fake.getPackageMutex.RUnlock() 653 return len(fake.getPackageArgsForCall) 654 } 655 656 func (fake *FakeRegistryClient) GetPackageCalls(stub func(context.Context, *api.GetPackageRequest, ...grpc.CallOption) (*api.Package, error)) { 657 fake.getPackageMutex.Lock() 658 defer fake.getPackageMutex.Unlock() 659 fake.GetPackageStub = stub 660 } 661 662 func (fake *FakeRegistryClient) GetPackageArgsForCall(i int) (context.Context, *api.GetPackageRequest, []grpc.CallOption) { 663 fake.getPackageMutex.RLock() 664 defer fake.getPackageMutex.RUnlock() 665 argsForCall := fake.getPackageArgsForCall[i] 666 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 667 } 668 669 func (fake *FakeRegistryClient) GetPackageReturns(result1 *api.Package, result2 error) { 670 fake.getPackageMutex.Lock() 671 defer fake.getPackageMutex.Unlock() 672 fake.GetPackageStub = nil 673 fake.getPackageReturns = struct { 674 result1 *api.Package 675 result2 error 676 }{result1, result2} 677 } 678 679 func (fake *FakeRegistryClient) GetPackageReturnsOnCall(i int, result1 *api.Package, result2 error) { 680 fake.getPackageMutex.Lock() 681 defer fake.getPackageMutex.Unlock() 682 fake.GetPackageStub = nil 683 if fake.getPackageReturnsOnCall == nil { 684 fake.getPackageReturnsOnCall = make(map[int]struct { 685 result1 *api.Package 686 result2 error 687 }) 688 } 689 fake.getPackageReturnsOnCall[i] = struct { 690 result1 *api.Package 691 result2 error 692 }{result1, result2} 693 } 694 695 func (fake *FakeRegistryClient) ListBundles(arg1 context.Context, arg2 *api.ListBundlesRequest, arg3 ...grpc.CallOption) (api.Registry_ListBundlesClient, error) { 696 fake.listBundlesMutex.Lock() 697 ret, specificReturn := fake.listBundlesReturnsOnCall[len(fake.listBundlesArgsForCall)] 698 fake.listBundlesArgsForCall = append(fake.listBundlesArgsForCall, struct { 699 arg1 context.Context 700 arg2 *api.ListBundlesRequest 701 arg3 []grpc.CallOption 702 }{arg1, arg2, arg3}) 703 stub := fake.ListBundlesStub 704 fakeReturns := fake.listBundlesReturns 705 fake.recordInvocation("ListBundles", []interface{}{arg1, arg2, arg3}) 706 fake.listBundlesMutex.Unlock() 707 if stub != nil { 708 return stub(arg1, arg2, arg3...) 709 } 710 if specificReturn { 711 return ret.result1, ret.result2 712 } 713 return fakeReturns.result1, fakeReturns.result2 714 } 715 716 func (fake *FakeRegistryClient) ListBundlesCallCount() int { 717 fake.listBundlesMutex.RLock() 718 defer fake.listBundlesMutex.RUnlock() 719 return len(fake.listBundlesArgsForCall) 720 } 721 722 func (fake *FakeRegistryClient) ListBundlesCalls(stub func(context.Context, *api.ListBundlesRequest, ...grpc.CallOption) (api.Registry_ListBundlesClient, error)) { 723 fake.listBundlesMutex.Lock() 724 defer fake.listBundlesMutex.Unlock() 725 fake.ListBundlesStub = stub 726 } 727 728 func (fake *FakeRegistryClient) ListBundlesArgsForCall(i int) (context.Context, *api.ListBundlesRequest, []grpc.CallOption) { 729 fake.listBundlesMutex.RLock() 730 defer fake.listBundlesMutex.RUnlock() 731 argsForCall := fake.listBundlesArgsForCall[i] 732 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 733 } 734 735 func (fake *FakeRegistryClient) ListBundlesReturns(result1 api.Registry_ListBundlesClient, result2 error) { 736 fake.listBundlesMutex.Lock() 737 defer fake.listBundlesMutex.Unlock() 738 fake.ListBundlesStub = nil 739 fake.listBundlesReturns = struct { 740 result1 api.Registry_ListBundlesClient 741 result2 error 742 }{result1, result2} 743 } 744 745 func (fake *FakeRegistryClient) ListBundlesReturnsOnCall(i int, result1 api.Registry_ListBundlesClient, result2 error) { 746 fake.listBundlesMutex.Lock() 747 defer fake.listBundlesMutex.Unlock() 748 fake.ListBundlesStub = nil 749 if fake.listBundlesReturnsOnCall == nil { 750 fake.listBundlesReturnsOnCall = make(map[int]struct { 751 result1 api.Registry_ListBundlesClient 752 result2 error 753 }) 754 } 755 fake.listBundlesReturnsOnCall[i] = struct { 756 result1 api.Registry_ListBundlesClient 757 result2 error 758 }{result1, result2} 759 } 760 761 func (fake *FakeRegistryClient) ListPackages(arg1 context.Context, arg2 *api.ListPackageRequest, arg3 ...grpc.CallOption) (api.Registry_ListPackagesClient, error) { 762 fake.listPackagesMutex.Lock() 763 ret, specificReturn := fake.listPackagesReturnsOnCall[len(fake.listPackagesArgsForCall)] 764 fake.listPackagesArgsForCall = append(fake.listPackagesArgsForCall, struct { 765 arg1 context.Context 766 arg2 *api.ListPackageRequest 767 arg3 []grpc.CallOption 768 }{arg1, arg2, arg3}) 769 stub := fake.ListPackagesStub 770 fakeReturns := fake.listPackagesReturns 771 fake.recordInvocation("ListPackages", []interface{}{arg1, arg2, arg3}) 772 fake.listPackagesMutex.Unlock() 773 if stub != nil { 774 return stub(arg1, arg2, arg3...) 775 } 776 if specificReturn { 777 return ret.result1, ret.result2 778 } 779 return fakeReturns.result1, fakeReturns.result2 780 } 781 782 func (fake *FakeRegistryClient) ListPackagesCallCount() int { 783 fake.listPackagesMutex.RLock() 784 defer fake.listPackagesMutex.RUnlock() 785 return len(fake.listPackagesArgsForCall) 786 } 787 788 func (fake *FakeRegistryClient) ListPackagesCalls(stub func(context.Context, *api.ListPackageRequest, ...grpc.CallOption) (api.Registry_ListPackagesClient, error)) { 789 fake.listPackagesMutex.Lock() 790 defer fake.listPackagesMutex.Unlock() 791 fake.ListPackagesStub = stub 792 } 793 794 func (fake *FakeRegistryClient) ListPackagesArgsForCall(i int) (context.Context, *api.ListPackageRequest, []grpc.CallOption) { 795 fake.listPackagesMutex.RLock() 796 defer fake.listPackagesMutex.RUnlock() 797 argsForCall := fake.listPackagesArgsForCall[i] 798 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 799 } 800 801 func (fake *FakeRegistryClient) ListPackagesReturns(result1 api.Registry_ListPackagesClient, result2 error) { 802 fake.listPackagesMutex.Lock() 803 defer fake.listPackagesMutex.Unlock() 804 fake.ListPackagesStub = nil 805 fake.listPackagesReturns = struct { 806 result1 api.Registry_ListPackagesClient 807 result2 error 808 }{result1, result2} 809 } 810 811 func (fake *FakeRegistryClient) ListPackagesReturnsOnCall(i int, result1 api.Registry_ListPackagesClient, result2 error) { 812 fake.listPackagesMutex.Lock() 813 defer fake.listPackagesMutex.Unlock() 814 fake.ListPackagesStub = nil 815 if fake.listPackagesReturnsOnCall == nil { 816 fake.listPackagesReturnsOnCall = make(map[int]struct { 817 result1 api.Registry_ListPackagesClient 818 result2 error 819 }) 820 } 821 fake.listPackagesReturnsOnCall[i] = struct { 822 result1 api.Registry_ListPackagesClient 823 result2 error 824 }{result1, result2} 825 } 826 827 func (fake *FakeRegistryClient) Invocations() map[string][][]interface{} { 828 fake.invocationsMutex.RLock() 829 defer fake.invocationsMutex.RUnlock() 830 fake.getBundleMutex.RLock() 831 defer fake.getBundleMutex.RUnlock() 832 fake.getBundleForChannelMutex.RLock() 833 defer fake.getBundleForChannelMutex.RUnlock() 834 fake.getBundleThatReplacesMutex.RLock() 835 defer fake.getBundleThatReplacesMutex.RUnlock() 836 fake.getChannelEntriesThatProvideMutex.RLock() 837 defer fake.getChannelEntriesThatProvideMutex.RUnlock() 838 fake.getChannelEntriesThatReplaceMutex.RLock() 839 defer fake.getChannelEntriesThatReplaceMutex.RUnlock() 840 fake.getDefaultBundleThatProvidesMutex.RLock() 841 defer fake.getDefaultBundleThatProvidesMutex.RUnlock() 842 fake.getLatestChannelEntriesThatProvideMutex.RLock() 843 defer fake.getLatestChannelEntriesThatProvideMutex.RUnlock() 844 fake.getPackageMutex.RLock() 845 defer fake.getPackageMutex.RUnlock() 846 fake.listBundlesMutex.RLock() 847 defer fake.listBundlesMutex.RUnlock() 848 fake.listPackagesMutex.RLock() 849 defer fake.listPackagesMutex.RUnlock() 850 copiedInvocations := map[string][][]interface{}{} 851 for key, value := range fake.invocations { 852 copiedInvocations[key] = value 853 } 854 return copiedInvocations 855 } 856 857 func (fake *FakeRegistryClient) recordInvocation(key string, args []interface{}) { 858 fake.invocationsMutex.Lock() 859 defer fake.invocationsMutex.Unlock() 860 if fake.invocations == nil { 861 fake.invocations = map[string][][]interface{}{} 862 } 863 if fake.invocations[key] == nil { 864 fake.invocations[key] = [][]interface{}{} 865 } 866 fake.invocations[key] = append(fake.invocations[key], args) 867 } 868 869 var _ api.RegistryClient = new(FakeRegistryClient)