/
CloudProvider.go
1587 lines (1323 loc) · 64.8 KB
/
CloudProvider.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by mockery v2.32.0. DO NOT EDIT.
package mocks
import (
context "context"
cluster "github.com/app-net-interface/kubernetes-discovery/cluster"
infrapb "github.com/app-net-interface/awi-infra-guard/grpc/go/infrapb"
mock "github.com/stretchr/testify/mock"
types "github.com/app-net-interface/awi-infra-guard/types"
)
// CloudProvider is an autogenerated mock type for the CloudProvider type
type CloudProvider struct {
mock.Mock
}
type CloudProvider_Expecter struct {
mock *mock.Mock
}
func (_m *CloudProvider) EXPECT() *CloudProvider_Expecter {
return &CloudProvider_Expecter{mock: &_m.Mock}
}
// AddInboundAllowRuleByInstanceIPMatch provides a mock function with given fields: ctx, account, region, vpcID, ruleName, instancesIPs, cidrsToAllow, protocolsAndPorts
func (_m *CloudProvider) AddInboundAllowRuleByInstanceIPMatch(ctx context.Context, account string, region string, vpcID string, ruleName string, instancesIPs []string, cidrsToAllow []string, protocolsAndPorts types.ProtocolsAndPorts) (string, []types.Instance, error) {
ret := _m.Called(ctx, account, region, vpcID, ruleName, instancesIPs, cidrsToAllow, protocolsAndPorts)
var r0 string
var r1 []types.Instance
var r2 error
if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, []string, []string, types.ProtocolsAndPorts) (string, []types.Instance, error)); ok {
return rf(ctx, account, region, vpcID, ruleName, instancesIPs, cidrsToAllow, protocolsAndPorts)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, []string, []string, types.ProtocolsAndPorts) string); ok {
r0 = rf(ctx, account, region, vpcID, ruleName, instancesIPs, cidrsToAllow, protocolsAndPorts)
} else {
r0 = ret.Get(0).(string)
}
if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string, []string, []string, types.ProtocolsAndPorts) []types.Instance); ok {
r1 = rf(ctx, account, region, vpcID, ruleName, instancesIPs, cidrsToAllow, protocolsAndPorts)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).([]types.Instance)
}
}
if rf, ok := ret.Get(2).(func(context.Context, string, string, string, string, []string, []string, types.ProtocolsAndPorts) error); ok {
r2 = rf(ctx, account, region, vpcID, ruleName, instancesIPs, cidrsToAllow, protocolsAndPorts)
} else {
r2 = ret.Error(2)
}
return r0, r1, r2
}
// CloudProvider_AddInboundAllowRuleByInstanceIPMatch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddInboundAllowRuleByInstanceIPMatch'
type CloudProvider_AddInboundAllowRuleByInstanceIPMatch_Call struct {
*mock.Call
}
// AddInboundAllowRuleByInstanceIPMatch is a helper method to define mock.On call
// - ctx context.Context
// - account string
// - region string
// - vpcID string
// - ruleName string
// - instancesIPs []string
// - cidrsToAllow []string
// - protocolsAndPorts types.ProtocolsAndPorts
func (_e *CloudProvider_Expecter) AddInboundAllowRuleByInstanceIPMatch(ctx interface{}, account interface{}, region interface{}, vpcID interface{}, ruleName interface{}, instancesIPs interface{}, cidrsToAllow interface{}, protocolsAndPorts interface{}) *CloudProvider_AddInboundAllowRuleByInstanceIPMatch_Call {
return &CloudProvider_AddInboundAllowRuleByInstanceIPMatch_Call{Call: _e.mock.On("AddInboundAllowRuleByInstanceIPMatch", ctx, account, region, vpcID, ruleName, instancesIPs, cidrsToAllow, protocolsAndPorts)}
}
func (_c *CloudProvider_AddInboundAllowRuleByInstanceIPMatch_Call) Run(run func(ctx context.Context, account string, region string, vpcID string, ruleName string, instancesIPs []string, cidrsToAllow []string, protocolsAndPorts types.ProtocolsAndPorts)) *CloudProvider_AddInboundAllowRuleByInstanceIPMatch_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(string), args[5].([]string), args[6].([]string), args[7].(types.ProtocolsAndPorts))
})
return _c
}
func (_c *CloudProvider_AddInboundAllowRuleByInstanceIPMatch_Call) Return(ruleId string, instances []types.Instance, err error) *CloudProvider_AddInboundAllowRuleByInstanceIPMatch_Call {
_c.Call.Return(ruleId, instances, err)
return _c
}
func (_c *CloudProvider_AddInboundAllowRuleByInstanceIPMatch_Call) RunAndReturn(run func(context.Context, string, string, string, string, []string, []string, types.ProtocolsAndPorts) (string, []types.Instance, error)) *CloudProvider_AddInboundAllowRuleByInstanceIPMatch_Call {
_c.Call.Return(run)
return _c
}
// AddInboundAllowRuleByLabelsMatch provides a mock function with given fields: ctx, account, region, vpcID, ruleName, labels, cidrsToAllow, protocolsAndPorts
func (_m *CloudProvider) AddInboundAllowRuleByLabelsMatch(ctx context.Context, account string, region string, vpcID string, ruleName string, labels map[string]string, cidrsToAllow []string, protocolsAndPorts types.ProtocolsAndPorts) (string, []types.Instance, error) {
ret := _m.Called(ctx, account, region, vpcID, ruleName, labels, cidrsToAllow, protocolsAndPorts)
var r0 string
var r1 []types.Instance
var r2 error
if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, map[string]string, []string, types.ProtocolsAndPorts) (string, []types.Instance, error)); ok {
return rf(ctx, account, region, vpcID, ruleName, labels, cidrsToAllow, protocolsAndPorts)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, map[string]string, []string, types.ProtocolsAndPorts) string); ok {
r0 = rf(ctx, account, region, vpcID, ruleName, labels, cidrsToAllow, protocolsAndPorts)
} else {
r0 = ret.Get(0).(string)
}
if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string, map[string]string, []string, types.ProtocolsAndPorts) []types.Instance); ok {
r1 = rf(ctx, account, region, vpcID, ruleName, labels, cidrsToAllow, protocolsAndPorts)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).([]types.Instance)
}
}
if rf, ok := ret.Get(2).(func(context.Context, string, string, string, string, map[string]string, []string, types.ProtocolsAndPorts) error); ok {
r2 = rf(ctx, account, region, vpcID, ruleName, labels, cidrsToAllow, protocolsAndPorts)
} else {
r2 = ret.Error(2)
}
return r0, r1, r2
}
// CloudProvider_AddInboundAllowRuleByLabelsMatch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddInboundAllowRuleByLabelsMatch'
type CloudProvider_AddInboundAllowRuleByLabelsMatch_Call struct {
*mock.Call
}
// AddInboundAllowRuleByLabelsMatch is a helper method to define mock.On call
// - ctx context.Context
// - account string
// - region string
// - vpcID string
// - ruleName string
// - labels map[string]string
// - cidrsToAllow []string
// - protocolsAndPorts types.ProtocolsAndPorts
func (_e *CloudProvider_Expecter) AddInboundAllowRuleByLabelsMatch(ctx interface{}, account interface{}, region interface{}, vpcID interface{}, ruleName interface{}, labels interface{}, cidrsToAllow interface{}, protocolsAndPorts interface{}) *CloudProvider_AddInboundAllowRuleByLabelsMatch_Call {
return &CloudProvider_AddInboundAllowRuleByLabelsMatch_Call{Call: _e.mock.On("AddInboundAllowRuleByLabelsMatch", ctx, account, region, vpcID, ruleName, labels, cidrsToAllow, protocolsAndPorts)}
}
func (_c *CloudProvider_AddInboundAllowRuleByLabelsMatch_Call) Run(run func(ctx context.Context, account string, region string, vpcID string, ruleName string, labels map[string]string, cidrsToAllow []string, protocolsAndPorts types.ProtocolsAndPorts)) *CloudProvider_AddInboundAllowRuleByLabelsMatch_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(string), args[5].(map[string]string), args[6].([]string), args[7].(types.ProtocolsAndPorts))
})
return _c
}
func (_c *CloudProvider_AddInboundAllowRuleByLabelsMatch_Call) Return(ruleId string, instances []types.Instance, err error) *CloudProvider_AddInboundAllowRuleByLabelsMatch_Call {
_c.Call.Return(ruleId, instances, err)
return _c
}
func (_c *CloudProvider_AddInboundAllowRuleByLabelsMatch_Call) RunAndReturn(run func(context.Context, string, string, string, string, map[string]string, []string, types.ProtocolsAndPorts) (string, []types.Instance, error)) *CloudProvider_AddInboundAllowRuleByLabelsMatch_Call {
_c.Call.Return(run)
return _c
}
// AddInboundAllowRuleBySubnetMatch provides a mock function with given fields: ctx, account, region, vpcID, ruleName, subnetCidrs, cidrsToAllow, protocolsAndPorts
func (_m *CloudProvider) AddInboundAllowRuleBySubnetMatch(ctx context.Context, account string, region string, vpcID string, ruleName string, subnetCidrs []string, cidrsToAllow []string, protocolsAndPorts types.ProtocolsAndPorts) (string, []types.Instance, []types.Subnet, error) {
ret := _m.Called(ctx, account, region, vpcID, ruleName, subnetCidrs, cidrsToAllow, protocolsAndPorts)
var r0 string
var r1 []types.Instance
var r2 []types.Subnet
var r3 error
if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, []string, []string, types.ProtocolsAndPorts) (string, []types.Instance, []types.Subnet, error)); ok {
return rf(ctx, account, region, vpcID, ruleName, subnetCidrs, cidrsToAllow, protocolsAndPorts)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, []string, []string, types.ProtocolsAndPorts) string); ok {
r0 = rf(ctx, account, region, vpcID, ruleName, subnetCidrs, cidrsToAllow, protocolsAndPorts)
} else {
r0 = ret.Get(0).(string)
}
if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string, []string, []string, types.ProtocolsAndPorts) []types.Instance); ok {
r1 = rf(ctx, account, region, vpcID, ruleName, subnetCidrs, cidrsToAllow, protocolsAndPorts)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).([]types.Instance)
}
}
if rf, ok := ret.Get(2).(func(context.Context, string, string, string, string, []string, []string, types.ProtocolsAndPorts) []types.Subnet); ok {
r2 = rf(ctx, account, region, vpcID, ruleName, subnetCidrs, cidrsToAllow, protocolsAndPorts)
} else {
if ret.Get(2) != nil {
r2 = ret.Get(2).([]types.Subnet)
}
}
if rf, ok := ret.Get(3).(func(context.Context, string, string, string, string, []string, []string, types.ProtocolsAndPorts) error); ok {
r3 = rf(ctx, account, region, vpcID, ruleName, subnetCidrs, cidrsToAllow, protocolsAndPorts)
} else {
r3 = ret.Error(3)
}
return r0, r1, r2, r3
}
// CloudProvider_AddInboundAllowRuleBySubnetMatch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddInboundAllowRuleBySubnetMatch'
type CloudProvider_AddInboundAllowRuleBySubnetMatch_Call struct {
*mock.Call
}
// AddInboundAllowRuleBySubnetMatch is a helper method to define mock.On call
// - ctx context.Context
// - account string
// - region string
// - vpcID string
// - ruleName string
// - subnetCidrs []string
// - cidrsToAllow []string
// - protocolsAndPorts types.ProtocolsAndPorts
func (_e *CloudProvider_Expecter) AddInboundAllowRuleBySubnetMatch(ctx interface{}, account interface{}, region interface{}, vpcID interface{}, ruleName interface{}, subnetCidrs interface{}, cidrsToAllow interface{}, protocolsAndPorts interface{}) *CloudProvider_AddInboundAllowRuleBySubnetMatch_Call {
return &CloudProvider_AddInboundAllowRuleBySubnetMatch_Call{Call: _e.mock.On("AddInboundAllowRuleBySubnetMatch", ctx, account, region, vpcID, ruleName, subnetCidrs, cidrsToAllow, protocolsAndPorts)}
}
func (_c *CloudProvider_AddInboundAllowRuleBySubnetMatch_Call) Run(run func(ctx context.Context, account string, region string, vpcID string, ruleName string, subnetCidrs []string, cidrsToAllow []string, protocolsAndPorts types.ProtocolsAndPorts)) *CloudProvider_AddInboundAllowRuleBySubnetMatch_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(string), args[5].([]string), args[6].([]string), args[7].(types.ProtocolsAndPorts))
})
return _c
}
func (_c *CloudProvider_AddInboundAllowRuleBySubnetMatch_Call) Return(ruleId string, instances []types.Instance, subnets []types.Subnet, err error) *CloudProvider_AddInboundAllowRuleBySubnetMatch_Call {
_c.Call.Return(ruleId, instances, subnets, err)
return _c
}
func (_c *CloudProvider_AddInboundAllowRuleBySubnetMatch_Call) RunAndReturn(run func(context.Context, string, string, string, string, []string, []string, types.ProtocolsAndPorts) (string, []types.Instance, []types.Subnet, error)) *CloudProvider_AddInboundAllowRuleBySubnetMatch_Call {
_c.Call.Return(run)
return _c
}
// AddInboundAllowRuleForLoadBalancerByDNS provides a mock function with given fields: ctx, account, region, loadBalancerDNS, vpcID, ruleName, cidrsToAllow, protocolsAndPorts
func (_m *CloudProvider) AddInboundAllowRuleForLoadBalancerByDNS(ctx context.Context, account string, region string, loadBalancerDNS string, vpcID string, ruleName string, cidrsToAllow []string, protocolsAndPorts types.ProtocolsAndPorts) (string, string, error) {
ret := _m.Called(ctx, account, region, loadBalancerDNS, vpcID, ruleName, cidrsToAllow, protocolsAndPorts)
var r0 string
var r1 string
var r2 error
if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, string, []string, types.ProtocolsAndPorts) (string, string, error)); ok {
return rf(ctx, account, region, loadBalancerDNS, vpcID, ruleName, cidrsToAllow, protocolsAndPorts)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, string, []string, types.ProtocolsAndPorts) string); ok {
r0 = rf(ctx, account, region, loadBalancerDNS, vpcID, ruleName, cidrsToAllow, protocolsAndPorts)
} else {
r0 = ret.Get(0).(string)
}
if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string, string, []string, types.ProtocolsAndPorts) string); ok {
r1 = rf(ctx, account, region, loadBalancerDNS, vpcID, ruleName, cidrsToAllow, protocolsAndPorts)
} else {
r1 = ret.Get(1).(string)
}
if rf, ok := ret.Get(2).(func(context.Context, string, string, string, string, string, []string, types.ProtocolsAndPorts) error); ok {
r2 = rf(ctx, account, region, loadBalancerDNS, vpcID, ruleName, cidrsToAllow, protocolsAndPorts)
} else {
r2 = ret.Error(2)
}
return r0, r1, r2
}
// CloudProvider_AddInboundAllowRuleForLoadBalancerByDNS_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddInboundAllowRuleForLoadBalancerByDNS'
type CloudProvider_AddInboundAllowRuleForLoadBalancerByDNS_Call struct {
*mock.Call
}
// AddInboundAllowRuleForLoadBalancerByDNS is a helper method to define mock.On call
// - ctx context.Context
// - account string
// - region string
// - loadBalancerDNS string
// - vpcID string
// - ruleName string
// - cidrsToAllow []string
// - protocolsAndPorts types.ProtocolsAndPorts
func (_e *CloudProvider_Expecter) AddInboundAllowRuleForLoadBalancerByDNS(ctx interface{}, account interface{}, region interface{}, loadBalancerDNS interface{}, vpcID interface{}, ruleName interface{}, cidrsToAllow interface{}, protocolsAndPorts interface{}) *CloudProvider_AddInboundAllowRuleForLoadBalancerByDNS_Call {
return &CloudProvider_AddInboundAllowRuleForLoadBalancerByDNS_Call{Call: _e.mock.On("AddInboundAllowRuleForLoadBalancerByDNS", ctx, account, region, loadBalancerDNS, vpcID, ruleName, cidrsToAllow, protocolsAndPorts)}
}
func (_c *CloudProvider_AddInboundAllowRuleForLoadBalancerByDNS_Call) Run(run func(ctx context.Context, account string, region string, loadBalancerDNS string, vpcID string, ruleName string, cidrsToAllow []string, protocolsAndPorts types.ProtocolsAndPorts)) *CloudProvider_AddInboundAllowRuleForLoadBalancerByDNS_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(string), args[5].(string), args[6].([]string), args[7].(types.ProtocolsAndPorts))
})
return _c
}
func (_c *CloudProvider_AddInboundAllowRuleForLoadBalancerByDNS_Call) Return(loadBalancerId string, ruleId string, err error) *CloudProvider_AddInboundAllowRuleForLoadBalancerByDNS_Call {
_c.Call.Return(loadBalancerId, ruleId, err)
return _c
}
func (_c *CloudProvider_AddInboundAllowRuleForLoadBalancerByDNS_Call) RunAndReturn(run func(context.Context, string, string, string, string, string, []string, types.ProtocolsAndPorts) (string, string, error)) *CloudProvider_AddInboundAllowRuleForLoadBalancerByDNS_Call {
_c.Call.Return(run)
return _c
}
// AddInboundAllowRuleInVPC provides a mock function with given fields: ctx, account, region, destinationVpcID, cidrsToAllow, ruleName, tags
func (_m *CloudProvider) AddInboundAllowRuleInVPC(ctx context.Context, account string, region string, destinationVpcID string, cidrsToAllow []string, ruleName string, tags map[string]string) error {
ret := _m.Called(ctx, account, region, destinationVpcID, cidrsToAllow, ruleName, tags)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, string, string, []string, string, map[string]string) error); ok {
r0 = rf(ctx, account, region, destinationVpcID, cidrsToAllow, ruleName, tags)
} else {
r0 = ret.Error(0)
}
return r0
}
// CloudProvider_AddInboundAllowRuleInVPC_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddInboundAllowRuleInVPC'
type CloudProvider_AddInboundAllowRuleInVPC_Call struct {
*mock.Call
}
// AddInboundAllowRuleInVPC is a helper method to define mock.On call
// - ctx context.Context
// - account string
// - region string
// - destinationVpcID string
// - cidrsToAllow []string
// - ruleName string
// - tags map[string]string
func (_e *CloudProvider_Expecter) AddInboundAllowRuleInVPC(ctx interface{}, account interface{}, region interface{}, destinationVpcID interface{}, cidrsToAllow interface{}, ruleName interface{}, tags interface{}) *CloudProvider_AddInboundAllowRuleInVPC_Call {
return &CloudProvider_AddInboundAllowRuleInVPC_Call{Call: _e.mock.On("AddInboundAllowRuleInVPC", ctx, account, region, destinationVpcID, cidrsToAllow, ruleName, tags)}
}
func (_c *CloudProvider_AddInboundAllowRuleInVPC_Call) Run(run func(ctx context.Context, account string, region string, destinationVpcID string, cidrsToAllow []string, ruleName string, tags map[string]string)) *CloudProvider_AddInboundAllowRuleInVPC_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].([]string), args[5].(string), args[6].(map[string]string))
})
return _c
}
func (_c *CloudProvider_AddInboundAllowRuleInVPC_Call) Return(_a0 error) *CloudProvider_AddInboundAllowRuleInVPC_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *CloudProvider_AddInboundAllowRuleInVPC_Call) RunAndReturn(run func(context.Context, string, string, string, []string, string, map[string]string) error) *CloudProvider_AddInboundAllowRuleInVPC_Call {
_c.Call.Return(run)
return _c
}
// ConnectVPCs provides a mock function with given fields: ctx, input
func (_m *CloudProvider) ConnectVPCs(ctx context.Context, input types.VPCConnectionParams) (types.VPCConnectionOutput, error) {
ret := _m.Called(ctx, input)
var r0 types.VPCConnectionOutput
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, types.VPCConnectionParams) (types.VPCConnectionOutput, error)); ok {
return rf(ctx, input)
}
if rf, ok := ret.Get(0).(func(context.Context, types.VPCConnectionParams) types.VPCConnectionOutput); ok {
r0 = rf(ctx, input)
} else {
r0 = ret.Get(0).(types.VPCConnectionOutput)
}
if rf, ok := ret.Get(1).(func(context.Context, types.VPCConnectionParams) error); ok {
r1 = rf(ctx, input)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// CloudProvider_ConnectVPCs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ConnectVPCs'
type CloudProvider_ConnectVPCs_Call struct {
*mock.Call
}
// ConnectVPCs is a helper method to define mock.On call
// - ctx context.Context
// - input types.VPCConnectionParams
func (_e *CloudProvider_Expecter) ConnectVPCs(ctx interface{}, input interface{}) *CloudProvider_ConnectVPCs_Call {
return &CloudProvider_ConnectVPCs_Call{Call: _e.mock.On("ConnectVPCs", ctx, input)}
}
func (_c *CloudProvider_ConnectVPCs_Call) Run(run func(ctx context.Context, input types.VPCConnectionParams)) *CloudProvider_ConnectVPCs_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(types.VPCConnectionParams))
})
return _c
}
func (_c *CloudProvider_ConnectVPCs_Call) Return(_a0 types.VPCConnectionOutput, _a1 error) *CloudProvider_ConnectVPCs_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *CloudProvider_ConnectVPCs_Call) RunAndReturn(run func(context.Context, types.VPCConnectionParams) (types.VPCConnectionOutput, error)) *CloudProvider_ConnectVPCs_Call {
_c.Call.Return(run)
return _c
}
// DisconnectVPCs provides a mock function with given fields: ctx, input
func (_m *CloudProvider) DisconnectVPCs(ctx context.Context, input types.VPCDisconnectionParams) (types.VPCDisconnectionOutput, error) {
ret := _m.Called(ctx, input)
var r0 types.VPCDisconnectionOutput
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, types.VPCDisconnectionParams) (types.VPCDisconnectionOutput, error)); ok {
return rf(ctx, input)
}
if rf, ok := ret.Get(0).(func(context.Context, types.VPCDisconnectionParams) types.VPCDisconnectionOutput); ok {
r0 = rf(ctx, input)
} else {
r0 = ret.Get(0).(types.VPCDisconnectionOutput)
}
if rf, ok := ret.Get(1).(func(context.Context, types.VPCDisconnectionParams) error); ok {
r1 = rf(ctx, input)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// CloudProvider_DisconnectVPCs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DisconnectVPCs'
type CloudProvider_DisconnectVPCs_Call struct {
*mock.Call
}
// DisconnectVPCs is a helper method to define mock.On call
// - ctx context.Context
// - input types.VPCDisconnectionParams
func (_e *CloudProvider_Expecter) DisconnectVPCs(ctx interface{}, input interface{}) *CloudProvider_DisconnectVPCs_Call {
return &CloudProvider_DisconnectVPCs_Call{Call: _e.mock.On("DisconnectVPCs", ctx, input)}
}
func (_c *CloudProvider_DisconnectVPCs_Call) Run(run func(ctx context.Context, input types.VPCDisconnectionParams)) *CloudProvider_DisconnectVPCs_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(types.VPCDisconnectionParams))
})
return _c
}
func (_c *CloudProvider_DisconnectVPCs_Call) Return(_a0 types.VPCDisconnectionOutput, _a1 error) *CloudProvider_DisconnectVPCs_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *CloudProvider_DisconnectVPCs_Call) RunAndReturn(run func(context.Context, types.VPCDisconnectionParams) (types.VPCDisconnectionOutput, error)) *CloudProvider_DisconnectVPCs_Call {
_c.Call.Return(run)
return _c
}
// GetCIDRsForLabels provides a mock function with given fields: ctx, input
func (_m *CloudProvider) GetCIDRsForLabels(ctx context.Context, input *infrapb.GetCIDRsForLabelsRequest) ([]string, error) {
ret := _m.Called(ctx, input)
var r0 []string
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *infrapb.GetCIDRsForLabelsRequest) ([]string, error)); ok {
return rf(ctx, input)
}
if rf, ok := ret.Get(0).(func(context.Context, *infrapb.GetCIDRsForLabelsRequest) []string); ok {
r0 = rf(ctx, input)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]string)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *infrapb.GetCIDRsForLabelsRequest) error); ok {
r1 = rf(ctx, input)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// CloudProvider_GetCIDRsForLabels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCIDRsForLabels'
type CloudProvider_GetCIDRsForLabels_Call struct {
*mock.Call
}
// GetCIDRsForLabels is a helper method to define mock.On call
// - ctx context.Context
// - input *infrapb.GetCIDRsForLabelsRequest
func (_e *CloudProvider_Expecter) GetCIDRsForLabels(ctx interface{}, input interface{}) *CloudProvider_GetCIDRsForLabels_Call {
return &CloudProvider_GetCIDRsForLabels_Call{Call: _e.mock.On("GetCIDRsForLabels", ctx, input)}
}
func (_c *CloudProvider_GetCIDRsForLabels_Call) Run(run func(ctx context.Context, input *infrapb.GetCIDRsForLabelsRequest)) *CloudProvider_GetCIDRsForLabels_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*infrapb.GetCIDRsForLabelsRequest))
})
return _c
}
func (_c *CloudProvider_GetCIDRsForLabels_Call) Return(_a0 []string, _a1 error) *CloudProvider_GetCIDRsForLabels_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *CloudProvider_GetCIDRsForLabels_Call) RunAndReturn(run func(context.Context, *infrapb.GetCIDRsForLabelsRequest) ([]string, error)) *CloudProvider_GetCIDRsForLabels_Call {
_c.Call.Return(run)
return _c
}
// GetIPsForLabels provides a mock function with given fields: ctx, input
func (_m *CloudProvider) GetIPsForLabels(ctx context.Context, input *infrapb.GetIPsForLabelsRequest) ([]string, error) {
ret := _m.Called(ctx, input)
var r0 []string
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *infrapb.GetIPsForLabelsRequest) ([]string, error)); ok {
return rf(ctx, input)
}
if rf, ok := ret.Get(0).(func(context.Context, *infrapb.GetIPsForLabelsRequest) []string); ok {
r0 = rf(ctx, input)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]string)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *infrapb.GetIPsForLabelsRequest) error); ok {
r1 = rf(ctx, input)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// CloudProvider_GetIPsForLabels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetIPsForLabels'
type CloudProvider_GetIPsForLabels_Call struct {
*mock.Call
}
// GetIPsForLabels is a helper method to define mock.On call
// - ctx context.Context
// - input *infrapb.GetIPsForLabelsRequest
func (_e *CloudProvider_Expecter) GetIPsForLabels(ctx interface{}, input interface{}) *CloudProvider_GetIPsForLabels_Call {
return &CloudProvider_GetIPsForLabels_Call{Call: _e.mock.On("GetIPsForLabels", ctx, input)}
}
func (_c *CloudProvider_GetIPsForLabels_Call) Run(run func(ctx context.Context, input *infrapb.GetIPsForLabelsRequest)) *CloudProvider_GetIPsForLabels_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*infrapb.GetIPsForLabelsRequest))
})
return _c
}
func (_c *CloudProvider_GetIPsForLabels_Call) Return(_a0 []string, _a1 error) *CloudProvider_GetIPsForLabels_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *CloudProvider_GetIPsForLabels_Call) RunAndReturn(run func(context.Context, *infrapb.GetIPsForLabelsRequest) ([]string, error)) *CloudProvider_GetIPsForLabels_Call {
_c.Call.Return(run)
return _c
}
// GetInstancesForLabels provides a mock function with given fields: ctx, input
func (_m *CloudProvider) GetInstancesForLabels(ctx context.Context, input *infrapb.GetInstancesForLabelsRequest) ([]types.Instance, error) {
ret := _m.Called(ctx, input)
var r0 []types.Instance
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *infrapb.GetInstancesForLabelsRequest) ([]types.Instance, error)); ok {
return rf(ctx, input)
}
if rf, ok := ret.Get(0).(func(context.Context, *infrapb.GetInstancesForLabelsRequest) []types.Instance); ok {
r0 = rf(ctx, input)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]types.Instance)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *infrapb.GetInstancesForLabelsRequest) error); ok {
r1 = rf(ctx, input)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// CloudProvider_GetInstancesForLabels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetInstancesForLabels'
type CloudProvider_GetInstancesForLabels_Call struct {
*mock.Call
}
// GetInstancesForLabels is a helper method to define mock.On call
// - ctx context.Context
// - input *infrapb.GetInstancesForLabelsRequest
func (_e *CloudProvider_Expecter) GetInstancesForLabels(ctx interface{}, input interface{}) *CloudProvider_GetInstancesForLabels_Call {
return &CloudProvider_GetInstancesForLabels_Call{Call: _e.mock.On("GetInstancesForLabels", ctx, input)}
}
func (_c *CloudProvider_GetInstancesForLabels_Call) Run(run func(ctx context.Context, input *infrapb.GetInstancesForLabelsRequest)) *CloudProvider_GetInstancesForLabels_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*infrapb.GetInstancesForLabelsRequest))
})
return _c
}
func (_c *CloudProvider_GetInstancesForLabels_Call) Return(_a0 []types.Instance, _a1 error) *CloudProvider_GetInstancesForLabels_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *CloudProvider_GetInstancesForLabels_Call) RunAndReturn(run func(context.Context, *infrapb.GetInstancesForLabelsRequest) ([]types.Instance, error)) *CloudProvider_GetInstancesForLabels_Call {
_c.Call.Return(run)
return _c
}
// GetName provides a mock function with given fields:
func (_m *CloudProvider) GetName() string {
ret := _m.Called()
var r0 string
if rf, ok := ret.Get(0).(func() string); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(string)
}
return r0
}
// CloudProvider_GetName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetName'
type CloudProvider_GetName_Call struct {
*mock.Call
}
// GetName is a helper method to define mock.On call
func (_e *CloudProvider_Expecter) GetName() *CloudProvider_GetName_Call {
return &CloudProvider_GetName_Call{Call: _e.mock.On("GetName")}
}
func (_c *CloudProvider_GetName_Call) Run(run func()) *CloudProvider_GetName_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *CloudProvider_GetName_Call) Return(_a0 string) *CloudProvider_GetName_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *CloudProvider_GetName_Call) RunAndReturn(run func() string) *CloudProvider_GetName_Call {
_c.Call.Return(run)
return _c
}
// GetSubnet provides a mock function with given fields: ctx, input
func (_m *CloudProvider) GetSubnet(ctx context.Context, input *infrapb.GetSubnetRequest) (types.Subnet, error) {
ret := _m.Called(ctx, input)
var r0 types.Subnet
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *infrapb.GetSubnetRequest) (types.Subnet, error)); ok {
return rf(ctx, input)
}
if rf, ok := ret.Get(0).(func(context.Context, *infrapb.GetSubnetRequest) types.Subnet); ok {
r0 = rf(ctx, input)
} else {
r0 = ret.Get(0).(types.Subnet)
}
if rf, ok := ret.Get(1).(func(context.Context, *infrapb.GetSubnetRequest) error); ok {
r1 = rf(ctx, input)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// CloudProvider_GetSubnet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSubnet'
type CloudProvider_GetSubnet_Call struct {
*mock.Call
}
// GetSubnet is a helper method to define mock.On call
// - ctx context.Context
// - input *infrapb.GetSubnetRequest
func (_e *CloudProvider_Expecter) GetSubnet(ctx interface{}, input interface{}) *CloudProvider_GetSubnet_Call {
return &CloudProvider_GetSubnet_Call{Call: _e.mock.On("GetSubnet", ctx, input)}
}
func (_c *CloudProvider_GetSubnet_Call) Run(run func(ctx context.Context, input *infrapb.GetSubnetRequest)) *CloudProvider_GetSubnet_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*infrapb.GetSubnetRequest))
})
return _c
}
func (_c *CloudProvider_GetSubnet_Call) Return(_a0 types.Subnet, _a1 error) *CloudProvider_GetSubnet_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *CloudProvider_GetSubnet_Call) RunAndReturn(run func(context.Context, *infrapb.GetSubnetRequest) (types.Subnet, error)) *CloudProvider_GetSubnet_Call {
_c.Call.Return(run)
return _c
}
// GetSyncTime provides a mock function with given fields: id
func (_m *CloudProvider) GetSyncTime(id string) (types.SyncTime, error) {
ret := _m.Called(id)
var r0 types.SyncTime
var r1 error
if rf, ok := ret.Get(0).(func(string) (types.SyncTime, error)); ok {
return rf(id)
}
if rf, ok := ret.Get(0).(func(string) types.SyncTime); ok {
r0 = rf(id)
} else {
r0 = ret.Get(0).(types.SyncTime)
}
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(id)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// CloudProvider_GetSyncTime_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSyncTime'
type CloudProvider_GetSyncTime_Call struct {
*mock.Call
}
// GetSyncTime is a helper method to define mock.On call
// - id string
func (_e *CloudProvider_Expecter) GetSyncTime(id interface{}) *CloudProvider_GetSyncTime_Call {
return &CloudProvider_GetSyncTime_Call{Call: _e.mock.On("GetSyncTime", id)}
}
func (_c *CloudProvider_GetSyncTime_Call) Run(run func(id string)) *CloudProvider_GetSyncTime_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string))
})
return _c
}
func (_c *CloudProvider_GetSyncTime_Call) Return(_a0 types.SyncTime, _a1 error) *CloudProvider_GetSyncTime_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *CloudProvider_GetSyncTime_Call) RunAndReturn(run func(string) (types.SyncTime, error)) *CloudProvider_GetSyncTime_Call {
_c.Call.Return(run)
return _c
}
// GetVPCIDForCIDR provides a mock function with given fields: ctx, input
func (_m *CloudProvider) GetVPCIDForCIDR(ctx context.Context, input *infrapb.GetVPCIDForCIDRRequest) (string, error) {
ret := _m.Called(ctx, input)
var r0 string
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *infrapb.GetVPCIDForCIDRRequest) (string, error)); ok {
return rf(ctx, input)
}
if rf, ok := ret.Get(0).(func(context.Context, *infrapb.GetVPCIDForCIDRRequest) string); ok {
r0 = rf(ctx, input)
} else {
r0 = ret.Get(0).(string)
}
if rf, ok := ret.Get(1).(func(context.Context, *infrapb.GetVPCIDForCIDRRequest) error); ok {
r1 = rf(ctx, input)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// CloudProvider_GetVPCIDForCIDR_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetVPCIDForCIDR'
type CloudProvider_GetVPCIDForCIDR_Call struct {
*mock.Call
}
// GetVPCIDForCIDR is a helper method to define mock.On call
// - ctx context.Context
// - input *infrapb.GetVPCIDForCIDRRequest
func (_e *CloudProvider_Expecter) GetVPCIDForCIDR(ctx interface{}, input interface{}) *CloudProvider_GetVPCIDForCIDR_Call {
return &CloudProvider_GetVPCIDForCIDR_Call{Call: _e.mock.On("GetVPCIDForCIDR", ctx, input)}
}
func (_c *CloudProvider_GetVPCIDForCIDR_Call) Run(run func(ctx context.Context, input *infrapb.GetVPCIDForCIDRRequest)) *CloudProvider_GetVPCIDForCIDR_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*infrapb.GetVPCIDForCIDRRequest))
})
return _c
}
func (_c *CloudProvider_GetVPCIDForCIDR_Call) Return(_a0 string, _a1 error) *CloudProvider_GetVPCIDForCIDR_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *CloudProvider_GetVPCIDForCIDR_Call) RunAndReturn(run func(context.Context, *infrapb.GetVPCIDForCIDRRequest) (string, error)) *CloudProvider_GetVPCIDForCIDR_Call {
_c.Call.Return(run)
return _c
}
// GetVPCIDWithTag provides a mock function with given fields: ctx, input
func (_m *CloudProvider) GetVPCIDWithTag(ctx context.Context, input *infrapb.GetVPCIDWithTagRequest) (string, error) {
ret := _m.Called(ctx, input)
var r0 string
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *infrapb.GetVPCIDWithTagRequest) (string, error)); ok {
return rf(ctx, input)
}
if rf, ok := ret.Get(0).(func(context.Context, *infrapb.GetVPCIDWithTagRequest) string); ok {
r0 = rf(ctx, input)
} else {
r0 = ret.Get(0).(string)
}
if rf, ok := ret.Get(1).(func(context.Context, *infrapb.GetVPCIDWithTagRequest) error); ok {
r1 = rf(ctx, input)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// CloudProvider_GetVPCIDWithTag_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetVPCIDWithTag'
type CloudProvider_GetVPCIDWithTag_Call struct {
*mock.Call
}
// GetVPCIDWithTag is a helper method to define mock.On call
// - ctx context.Context
// - input *infrapb.GetVPCIDWithTagRequest
func (_e *CloudProvider_Expecter) GetVPCIDWithTag(ctx interface{}, input interface{}) *CloudProvider_GetVPCIDWithTag_Call {
return &CloudProvider_GetVPCIDWithTag_Call{Call: _e.mock.On("GetVPCIDWithTag", ctx, input)}
}
func (_c *CloudProvider_GetVPCIDWithTag_Call) Run(run func(ctx context.Context, input *infrapb.GetVPCIDWithTagRequest)) *CloudProvider_GetVPCIDWithTag_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*infrapb.GetVPCIDWithTagRequest))
})
return _c
}
func (_c *CloudProvider_GetVPCIDWithTag_Call) Return(_a0 string, _a1 error) *CloudProvider_GetVPCIDWithTag_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *CloudProvider_GetVPCIDWithTag_Call) RunAndReturn(run func(context.Context, *infrapb.GetVPCIDWithTagRequest) (string, error)) *CloudProvider_GetVPCIDWithTag_Call {
_c.Call.Return(run)
return _c
}
// ListACLs provides a mock function with given fields: ctx, input
func (_m *CloudProvider) ListACLs(ctx context.Context, input *infrapb.ListACLsRequest) ([]types.ACL, error) {
ret := _m.Called(ctx, input)
var r0 []types.ACL
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *infrapb.ListACLsRequest) ([]types.ACL, error)); ok {
return rf(ctx, input)
}
if rf, ok := ret.Get(0).(func(context.Context, *infrapb.ListACLsRequest) []types.ACL); ok {
r0 = rf(ctx, input)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]types.ACL)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *infrapb.ListACLsRequest) error); ok {
r1 = rf(ctx, input)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// CloudProvider_ListACLs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListACLs'
type CloudProvider_ListACLs_Call struct {
*mock.Call
}
// ListACLs is a helper method to define mock.On call
// - ctx context.Context
// - input *infrapb.ListACLsRequest
func (_e *CloudProvider_Expecter) ListACLs(ctx interface{}, input interface{}) *CloudProvider_ListACLs_Call {
return &CloudProvider_ListACLs_Call{Call: _e.mock.On("ListACLs", ctx, input)}
}
func (_c *CloudProvider_ListACLs_Call) Run(run func(ctx context.Context, input *infrapb.ListACLsRequest)) *CloudProvider_ListACLs_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*infrapb.ListACLsRequest))
})
return _c
}
func (_c *CloudProvider_ListACLs_Call) Return(_a0 []types.ACL, _a1 error) *CloudProvider_ListACLs_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *CloudProvider_ListACLs_Call) RunAndReturn(run func(context.Context, *infrapb.ListACLsRequest) ([]types.ACL, error)) *CloudProvider_ListACLs_Call {
_c.Call.Return(run)
return _c
}
// ListAccounts provides a mock function with given fields:
func (_m *CloudProvider) ListAccounts() []types.Account {
ret := _m.Called()
var r0 []types.Account
if rf, ok := ret.Get(0).(func() []types.Account); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]types.Account)
}
}
return r0
}
// CloudProvider_ListAccounts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAccounts'
type CloudProvider_ListAccounts_Call struct {
*mock.Call
}
// ListAccounts is a helper method to define mock.On call
func (_e *CloudProvider_Expecter) ListAccounts() *CloudProvider_ListAccounts_Call {
return &CloudProvider_ListAccounts_Call{Call: _e.mock.On("ListAccounts")}
}
func (_c *CloudProvider_ListAccounts_Call) Run(run func()) *CloudProvider_ListAccounts_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *CloudProvider_ListAccounts_Call) Return(_a0 []types.Account) *CloudProvider_ListAccounts_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *CloudProvider_ListAccounts_Call) RunAndReturn(run func() []types.Account) *CloudProvider_ListAccounts_Call {
_c.Call.Return(run)
return _c
}
// ListClusters provides a mock function with given fields: ctx, input
func (_m *CloudProvider) ListClusters(ctx context.Context, input *infrapb.ListCloudClustersRequest) ([]types.Cluster, error) {
ret := _m.Called(ctx, input)
var r0 []types.Cluster
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *infrapb.ListCloudClustersRequest) ([]types.Cluster, error)); ok {
return rf(ctx, input)
}
if rf, ok := ret.Get(0).(func(context.Context, *infrapb.ListCloudClustersRequest) []types.Cluster); ok {
r0 = rf(ctx, input)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]types.Cluster)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *infrapb.ListCloudClustersRequest) error); ok {
r1 = rf(ctx, input)
} else {
r1 = ret.Error(1)
}