This repository has been archived by the owner on Mar 25, 2024. It is now read-only.
/
zz_generated_user_attribute_mock.go
1845 lines (1728 loc) · 65.7 KB
/
zz_generated_user_attribute_mock.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 moq; DO NOT EDIT.
// github.com/matryer/moq
package fakes
import (
context "context"
sync "sync"
time "time"
controller "github.com/rancher/norman/controller"
objectclient "github.com/rancher/norman/objectclient"
v3 "github.com/rancher/types/apis/management.cattle.io/v3"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
watch "k8s.io/apimachinery/pkg/watch"
cache "k8s.io/client-go/tools/cache"
)
var (
lockUserAttributeListerMockGet sync.RWMutex
lockUserAttributeListerMockList sync.RWMutex
)
// Ensure, that UserAttributeListerMock does implement UserAttributeLister.
// If this is not the case, regenerate this file with moq.
var _ v3.UserAttributeLister = &UserAttributeListerMock{}
// UserAttributeListerMock is a mock implementation of UserAttributeLister.
//
// func TestSomethingThatUsesUserAttributeLister(t *testing.T) {
//
// // make and configure a mocked UserAttributeLister
// mockedUserAttributeLister := &UserAttributeListerMock{
// GetFunc: func(namespace string, name string) (*v3.UserAttribute, error) {
// panic("mock out the Get method")
// },
// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.UserAttribute, error) {
// panic("mock out the List method")
// },
// }
//
// // use mockedUserAttributeLister in code that requires UserAttributeLister
// // and then make assertions.
//
// }
type UserAttributeListerMock struct {
// GetFunc mocks the Get method.
GetFunc func(namespace string, name string) (*v3.UserAttribute, error)
// ListFunc mocks the List method.
ListFunc func(namespace string, selector labels.Selector) ([]*v3.UserAttribute, error)
// calls tracks calls to the methods.
calls struct {
// Get holds details about calls to the Get method.
Get []struct {
// Namespace is the namespace argument value.
Namespace string
// Name is the name argument value.
Name string
}
// List holds details about calls to the List method.
List []struct {
// Namespace is the namespace argument value.
Namespace string
// Selector is the selector argument value.
Selector labels.Selector
}
}
}
// Get calls GetFunc.
func (mock *UserAttributeListerMock) Get(namespace string, name string) (*v3.UserAttribute, error) {
if mock.GetFunc == nil {
panic("UserAttributeListerMock.GetFunc: method is nil but UserAttributeLister.Get was just called")
}
callInfo := struct {
Namespace string
Name string
}{
Namespace: namespace,
Name: name,
}
lockUserAttributeListerMockGet.Lock()
mock.calls.Get = append(mock.calls.Get, callInfo)
lockUserAttributeListerMockGet.Unlock()
return mock.GetFunc(namespace, name)
}
// GetCalls gets all the calls that were made to Get.
// Check the length with:
// len(mockedUserAttributeLister.GetCalls())
func (mock *UserAttributeListerMock) GetCalls() []struct {
Namespace string
Name string
} {
var calls []struct {
Namespace string
Name string
}
lockUserAttributeListerMockGet.RLock()
calls = mock.calls.Get
lockUserAttributeListerMockGet.RUnlock()
return calls
}
// List calls ListFunc.
func (mock *UserAttributeListerMock) List(namespace string, selector labels.Selector) ([]*v3.UserAttribute, error) {
if mock.ListFunc == nil {
panic("UserAttributeListerMock.ListFunc: method is nil but UserAttributeLister.List was just called")
}
callInfo := struct {
Namespace string
Selector labels.Selector
}{
Namespace: namespace,
Selector: selector,
}
lockUserAttributeListerMockList.Lock()
mock.calls.List = append(mock.calls.List, callInfo)
lockUserAttributeListerMockList.Unlock()
return mock.ListFunc(namespace, selector)
}
// ListCalls gets all the calls that were made to List.
// Check the length with:
// len(mockedUserAttributeLister.ListCalls())
func (mock *UserAttributeListerMock) ListCalls() []struct {
Namespace string
Selector labels.Selector
} {
var calls []struct {
Namespace string
Selector labels.Selector
}
lockUserAttributeListerMockList.RLock()
calls = mock.calls.List
lockUserAttributeListerMockList.RUnlock()
return calls
}
var (
lockUserAttributeControllerMockAddClusterScopedFeatureHandler sync.RWMutex
lockUserAttributeControllerMockAddClusterScopedHandler sync.RWMutex
lockUserAttributeControllerMockAddFeatureHandler sync.RWMutex
lockUserAttributeControllerMockAddHandler sync.RWMutex
lockUserAttributeControllerMockEnqueue sync.RWMutex
lockUserAttributeControllerMockEnqueueAfter sync.RWMutex
lockUserAttributeControllerMockGeneric sync.RWMutex
lockUserAttributeControllerMockInformer sync.RWMutex
lockUserAttributeControllerMockLister sync.RWMutex
lockUserAttributeControllerMockStart sync.RWMutex
lockUserAttributeControllerMockSync sync.RWMutex
)
// Ensure, that UserAttributeControllerMock does implement UserAttributeController.
// If this is not the case, regenerate this file with moq.
var _ v3.UserAttributeController = &UserAttributeControllerMock{}
// UserAttributeControllerMock is a mock implementation of UserAttributeController.
//
// func TestSomethingThatUsesUserAttributeController(t *testing.T) {
//
// // make and configure a mocked UserAttributeController
// mockedUserAttributeController := &UserAttributeControllerMock{
// AddClusterScopedFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.UserAttributeHandlerFunc) {
// panic("mock out the AddClusterScopedFeatureHandler method")
// },
// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.UserAttributeHandlerFunc) {
// panic("mock out the AddClusterScopedHandler method")
// },
// AddFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, sync v3.UserAttributeHandlerFunc) {
// panic("mock out the AddFeatureHandler method")
// },
// AddHandlerFunc: func(ctx context.Context, name string, handler v3.UserAttributeHandlerFunc) {
// panic("mock out the AddHandler method")
// },
// EnqueueFunc: func(namespace string, name string) {
// panic("mock out the Enqueue method")
// },
// EnqueueAfterFunc: func(namespace string, name string, after time.Duration) {
// panic("mock out the EnqueueAfter method")
// },
// GenericFunc: func() controller.GenericController {
// panic("mock out the Generic method")
// },
// InformerFunc: func() cache.SharedIndexInformer {
// panic("mock out the Informer method")
// },
// ListerFunc: func() v3.UserAttributeLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedUserAttributeController in code that requires UserAttributeController
// // and then make assertions.
//
// }
type UserAttributeControllerMock struct {
// AddClusterScopedFeatureHandlerFunc mocks the AddClusterScopedFeatureHandler method.
AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.UserAttributeHandlerFunc)
// AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method.
AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.UserAttributeHandlerFunc)
// AddFeatureHandlerFunc mocks the AddFeatureHandler method.
AddFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, sync v3.UserAttributeHandlerFunc)
// AddHandlerFunc mocks the AddHandler method.
AddHandlerFunc func(ctx context.Context, name string, handler v3.UserAttributeHandlerFunc)
// EnqueueFunc mocks the Enqueue method.
EnqueueFunc func(namespace string, name string)
// EnqueueAfterFunc mocks the EnqueueAfter method.
EnqueueAfterFunc func(namespace string, name string, after time.Duration)
// GenericFunc mocks the Generic method.
GenericFunc func() controller.GenericController
// InformerFunc mocks the Informer method.
InformerFunc func() cache.SharedIndexInformer
// ListerFunc mocks the Lister method.
ListerFunc func() v3.UserAttributeLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
AddClusterScopedFeatureHandler []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Enabled is the enabled argument value.
Enabled func() bool
// Name is the name argument value.
Name string
// ClusterName is the clusterName argument value.
ClusterName string
// Handler is the handler argument value.
Handler v3.UserAttributeHandlerFunc
}
// AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method.
AddClusterScopedHandler []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Name is the name argument value.
Name string
// ClusterName is the clusterName argument value.
ClusterName string
// Handler is the handler argument value.
Handler v3.UserAttributeHandlerFunc
}
// AddFeatureHandler holds details about calls to the AddFeatureHandler method.
AddFeatureHandler []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Enabled is the enabled argument value.
Enabled func() bool
// Name is the name argument value.
Name string
// Sync is the sync argument value.
Sync v3.UserAttributeHandlerFunc
}
// AddHandler holds details about calls to the AddHandler method.
AddHandler []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Name is the name argument value.
Name string
// Handler is the handler argument value.
Handler v3.UserAttributeHandlerFunc
}
// Enqueue holds details about calls to the Enqueue method.
Enqueue []struct {
// Namespace is the namespace argument value.
Namespace string
// Name is the name argument value.
Name string
}
// EnqueueAfter holds details about calls to the EnqueueAfter method.
EnqueueAfter []struct {
// Namespace is the namespace argument value.
Namespace string
// Name is the name argument value.
Name string
// After is the after argument value.
After time.Duration
}
// Generic holds details about calls to the Generic method.
Generic []struct {
}
// Informer holds details about calls to the Informer method.
Informer []struct {
}
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
// AddClusterScopedFeatureHandler calls AddClusterScopedFeatureHandlerFunc.
func (mock *UserAttributeControllerMock) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.UserAttributeHandlerFunc) {
if mock.AddClusterScopedFeatureHandlerFunc == nil {
panic("UserAttributeControllerMock.AddClusterScopedFeatureHandlerFunc: method is nil but UserAttributeController.AddClusterScopedFeatureHandler was just called")
}
callInfo := struct {
Ctx context.Context
Enabled func() bool
Name string
ClusterName string
Handler v3.UserAttributeHandlerFunc
}{
Ctx: ctx,
Enabled: enabled,
Name: name,
ClusterName: clusterName,
Handler: handler,
}
lockUserAttributeControllerMockAddClusterScopedFeatureHandler.Lock()
mock.calls.AddClusterScopedFeatureHandler = append(mock.calls.AddClusterScopedFeatureHandler, callInfo)
lockUserAttributeControllerMockAddClusterScopedFeatureHandler.Unlock()
mock.AddClusterScopedFeatureHandlerFunc(ctx, enabled, name, clusterName, handler)
}
// AddClusterScopedFeatureHandlerCalls gets all the calls that were made to AddClusterScopedFeatureHandler.
// Check the length with:
// len(mockedUserAttributeController.AddClusterScopedFeatureHandlerCalls())
func (mock *UserAttributeControllerMock) AddClusterScopedFeatureHandlerCalls() []struct {
Ctx context.Context
Enabled func() bool
Name string
ClusterName string
Handler v3.UserAttributeHandlerFunc
} {
var calls []struct {
Ctx context.Context
Enabled func() bool
Name string
ClusterName string
Handler v3.UserAttributeHandlerFunc
}
lockUserAttributeControllerMockAddClusterScopedFeatureHandler.RLock()
calls = mock.calls.AddClusterScopedFeatureHandler
lockUserAttributeControllerMockAddClusterScopedFeatureHandler.RUnlock()
return calls
}
// AddClusterScopedHandler calls AddClusterScopedHandlerFunc.
func (mock *UserAttributeControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.UserAttributeHandlerFunc) {
if mock.AddClusterScopedHandlerFunc == nil {
panic("UserAttributeControllerMock.AddClusterScopedHandlerFunc: method is nil but UserAttributeController.AddClusterScopedHandler was just called")
}
callInfo := struct {
Ctx context.Context
Name string
ClusterName string
Handler v3.UserAttributeHandlerFunc
}{
Ctx: ctx,
Name: name,
ClusterName: clusterName,
Handler: handler,
}
lockUserAttributeControllerMockAddClusterScopedHandler.Lock()
mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo)
lockUserAttributeControllerMockAddClusterScopedHandler.Unlock()
mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler)
}
// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler.
// Check the length with:
// len(mockedUserAttributeController.AddClusterScopedHandlerCalls())
func (mock *UserAttributeControllerMock) AddClusterScopedHandlerCalls() []struct {
Ctx context.Context
Name string
ClusterName string
Handler v3.UserAttributeHandlerFunc
} {
var calls []struct {
Ctx context.Context
Name string
ClusterName string
Handler v3.UserAttributeHandlerFunc
}
lockUserAttributeControllerMockAddClusterScopedHandler.RLock()
calls = mock.calls.AddClusterScopedHandler
lockUserAttributeControllerMockAddClusterScopedHandler.RUnlock()
return calls
}
// AddFeatureHandler calls AddFeatureHandlerFunc.
func (mock *UserAttributeControllerMock) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync v3.UserAttributeHandlerFunc) {
if mock.AddFeatureHandlerFunc == nil {
panic("UserAttributeControllerMock.AddFeatureHandlerFunc: method is nil but UserAttributeController.AddFeatureHandler was just called")
}
callInfo := struct {
Ctx context.Context
Enabled func() bool
Name string
Sync v3.UserAttributeHandlerFunc
}{
Ctx: ctx,
Enabled: enabled,
Name: name,
Sync: sync,
}
lockUserAttributeControllerMockAddFeatureHandler.Lock()
mock.calls.AddFeatureHandler = append(mock.calls.AddFeatureHandler, callInfo)
lockUserAttributeControllerMockAddFeatureHandler.Unlock()
mock.AddFeatureHandlerFunc(ctx, enabled, name, sync)
}
// AddFeatureHandlerCalls gets all the calls that were made to AddFeatureHandler.
// Check the length with:
// len(mockedUserAttributeController.AddFeatureHandlerCalls())
func (mock *UserAttributeControllerMock) AddFeatureHandlerCalls() []struct {
Ctx context.Context
Enabled func() bool
Name string
Sync v3.UserAttributeHandlerFunc
} {
var calls []struct {
Ctx context.Context
Enabled func() bool
Name string
Sync v3.UserAttributeHandlerFunc
}
lockUserAttributeControllerMockAddFeatureHandler.RLock()
calls = mock.calls.AddFeatureHandler
lockUserAttributeControllerMockAddFeatureHandler.RUnlock()
return calls
}
// AddHandler calls AddHandlerFunc.
func (mock *UserAttributeControllerMock) AddHandler(ctx context.Context, name string, handler v3.UserAttributeHandlerFunc) {
if mock.AddHandlerFunc == nil {
panic("UserAttributeControllerMock.AddHandlerFunc: method is nil but UserAttributeController.AddHandler was just called")
}
callInfo := struct {
Ctx context.Context
Name string
Handler v3.UserAttributeHandlerFunc
}{
Ctx: ctx,
Name: name,
Handler: handler,
}
lockUserAttributeControllerMockAddHandler.Lock()
mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo)
lockUserAttributeControllerMockAddHandler.Unlock()
mock.AddHandlerFunc(ctx, name, handler)
}
// AddHandlerCalls gets all the calls that were made to AddHandler.
// Check the length with:
// len(mockedUserAttributeController.AddHandlerCalls())
func (mock *UserAttributeControllerMock) AddHandlerCalls() []struct {
Ctx context.Context
Name string
Handler v3.UserAttributeHandlerFunc
} {
var calls []struct {
Ctx context.Context
Name string
Handler v3.UserAttributeHandlerFunc
}
lockUserAttributeControllerMockAddHandler.RLock()
calls = mock.calls.AddHandler
lockUserAttributeControllerMockAddHandler.RUnlock()
return calls
}
// Enqueue calls EnqueueFunc.
func (mock *UserAttributeControllerMock) Enqueue(namespace string, name string) {
if mock.EnqueueFunc == nil {
panic("UserAttributeControllerMock.EnqueueFunc: method is nil but UserAttributeController.Enqueue was just called")
}
callInfo := struct {
Namespace string
Name string
}{
Namespace: namespace,
Name: name,
}
lockUserAttributeControllerMockEnqueue.Lock()
mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo)
lockUserAttributeControllerMockEnqueue.Unlock()
mock.EnqueueFunc(namespace, name)
}
// EnqueueCalls gets all the calls that were made to Enqueue.
// Check the length with:
// len(mockedUserAttributeController.EnqueueCalls())
func (mock *UserAttributeControllerMock) EnqueueCalls() []struct {
Namespace string
Name string
} {
var calls []struct {
Namespace string
Name string
}
lockUserAttributeControllerMockEnqueue.RLock()
calls = mock.calls.Enqueue
lockUserAttributeControllerMockEnqueue.RUnlock()
return calls
}
// EnqueueAfter calls EnqueueAfterFunc.
func (mock *UserAttributeControllerMock) EnqueueAfter(namespace string, name string, after time.Duration) {
if mock.EnqueueAfterFunc == nil {
panic("UserAttributeControllerMock.EnqueueAfterFunc: method is nil but UserAttributeController.EnqueueAfter was just called")
}
callInfo := struct {
Namespace string
Name string
After time.Duration
}{
Namespace: namespace,
Name: name,
After: after,
}
lockUserAttributeControllerMockEnqueueAfter.Lock()
mock.calls.EnqueueAfter = append(mock.calls.EnqueueAfter, callInfo)
lockUserAttributeControllerMockEnqueueAfter.Unlock()
mock.EnqueueAfterFunc(namespace, name, after)
}
// EnqueueAfterCalls gets all the calls that were made to EnqueueAfter.
// Check the length with:
// len(mockedUserAttributeController.EnqueueAfterCalls())
func (mock *UserAttributeControllerMock) EnqueueAfterCalls() []struct {
Namespace string
Name string
After time.Duration
} {
var calls []struct {
Namespace string
Name string
After time.Duration
}
lockUserAttributeControllerMockEnqueueAfter.RLock()
calls = mock.calls.EnqueueAfter
lockUserAttributeControllerMockEnqueueAfter.RUnlock()
return calls
}
// Generic calls GenericFunc.
func (mock *UserAttributeControllerMock) Generic() controller.GenericController {
if mock.GenericFunc == nil {
panic("UserAttributeControllerMock.GenericFunc: method is nil but UserAttributeController.Generic was just called")
}
callInfo := struct {
}{}
lockUserAttributeControllerMockGeneric.Lock()
mock.calls.Generic = append(mock.calls.Generic, callInfo)
lockUserAttributeControllerMockGeneric.Unlock()
return mock.GenericFunc()
}
// GenericCalls gets all the calls that were made to Generic.
// Check the length with:
// len(mockedUserAttributeController.GenericCalls())
func (mock *UserAttributeControllerMock) GenericCalls() []struct {
} {
var calls []struct {
}
lockUserAttributeControllerMockGeneric.RLock()
calls = mock.calls.Generic
lockUserAttributeControllerMockGeneric.RUnlock()
return calls
}
// Informer calls InformerFunc.
func (mock *UserAttributeControllerMock) Informer() cache.SharedIndexInformer {
if mock.InformerFunc == nil {
panic("UserAttributeControllerMock.InformerFunc: method is nil but UserAttributeController.Informer was just called")
}
callInfo := struct {
}{}
lockUserAttributeControllerMockInformer.Lock()
mock.calls.Informer = append(mock.calls.Informer, callInfo)
lockUserAttributeControllerMockInformer.Unlock()
return mock.InformerFunc()
}
// InformerCalls gets all the calls that were made to Informer.
// Check the length with:
// len(mockedUserAttributeController.InformerCalls())
func (mock *UserAttributeControllerMock) InformerCalls() []struct {
} {
var calls []struct {
}
lockUserAttributeControllerMockInformer.RLock()
calls = mock.calls.Informer
lockUserAttributeControllerMockInformer.RUnlock()
return calls
}
// Lister calls ListerFunc.
func (mock *UserAttributeControllerMock) Lister() v3.UserAttributeLister {
if mock.ListerFunc == nil {
panic("UserAttributeControllerMock.ListerFunc: method is nil but UserAttributeController.Lister was just called")
}
callInfo := struct {
}{}
lockUserAttributeControllerMockLister.Lock()
mock.calls.Lister = append(mock.calls.Lister, callInfo)
lockUserAttributeControllerMockLister.Unlock()
return mock.ListerFunc()
}
// ListerCalls gets all the calls that were made to Lister.
// Check the length with:
// len(mockedUserAttributeController.ListerCalls())
func (mock *UserAttributeControllerMock) ListerCalls() []struct {
} {
var calls []struct {
}
lockUserAttributeControllerMockLister.RLock()
calls = mock.calls.Lister
lockUserAttributeControllerMockLister.RUnlock()
return calls
}
// Start calls StartFunc.
func (mock *UserAttributeControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("UserAttributeControllerMock.StartFunc: method is nil but UserAttributeController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockUserAttributeControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockUserAttributeControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedUserAttributeController.StartCalls())
func (mock *UserAttributeControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockUserAttributeControllerMockStart.RLock()
calls = mock.calls.Start
lockUserAttributeControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *UserAttributeControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("UserAttributeControllerMock.SyncFunc: method is nil but UserAttributeController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockUserAttributeControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockUserAttributeControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedUserAttributeController.SyncCalls())
func (mock *UserAttributeControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockUserAttributeControllerMockSync.RLock()
calls = mock.calls.Sync
lockUserAttributeControllerMockSync.RUnlock()
return calls
}
var (
lockUserAttributeInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockUserAttributeInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex
lockUserAttributeInterfaceMockAddClusterScopedHandler sync.RWMutex
lockUserAttributeInterfaceMockAddClusterScopedLifecycle sync.RWMutex
lockUserAttributeInterfaceMockAddFeatureHandler sync.RWMutex
lockUserAttributeInterfaceMockAddFeatureLifecycle sync.RWMutex
lockUserAttributeInterfaceMockAddHandler sync.RWMutex
lockUserAttributeInterfaceMockAddLifecycle sync.RWMutex
lockUserAttributeInterfaceMockController sync.RWMutex
lockUserAttributeInterfaceMockCreate sync.RWMutex
lockUserAttributeInterfaceMockDelete sync.RWMutex
lockUserAttributeInterfaceMockDeleteCollection sync.RWMutex
lockUserAttributeInterfaceMockDeleteNamespaced sync.RWMutex
lockUserAttributeInterfaceMockGet sync.RWMutex
lockUserAttributeInterfaceMockGetNamespaced sync.RWMutex
lockUserAttributeInterfaceMockList sync.RWMutex
lockUserAttributeInterfaceMockListNamespaced sync.RWMutex
lockUserAttributeInterfaceMockObjectClient sync.RWMutex
lockUserAttributeInterfaceMockUpdate sync.RWMutex
lockUserAttributeInterfaceMockWatch sync.RWMutex
)
// Ensure, that UserAttributeInterfaceMock does implement UserAttributeInterface.
// If this is not the case, regenerate this file with moq.
var _ v3.UserAttributeInterface = &UserAttributeInterfaceMock{}
// UserAttributeInterfaceMock is a mock implementation of UserAttributeInterface.
//
// func TestSomethingThatUsesUserAttributeInterface(t *testing.T) {
//
// // make and configure a mocked UserAttributeInterface
// mockedUserAttributeInterface := &UserAttributeInterfaceMock{
// AddClusterScopedFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.UserAttributeHandlerFunc) {
// panic("mock out the AddClusterScopedFeatureHandler method")
// },
// AddClusterScopedFeatureLifecycleFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.UserAttributeLifecycle) {
// panic("mock out the AddClusterScopedFeatureLifecycle method")
// },
// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.UserAttributeHandlerFunc) {
// panic("mock out the AddClusterScopedHandler method")
// },
// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.UserAttributeLifecycle) {
// panic("mock out the AddClusterScopedLifecycle method")
// },
// AddFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, sync v3.UserAttributeHandlerFunc) {
// panic("mock out the AddFeatureHandler method")
// },
// AddFeatureLifecycleFunc: func(ctx context.Context, enabled func() bool, name string, lifecycle v3.UserAttributeLifecycle) {
// panic("mock out the AddFeatureLifecycle method")
// },
// AddHandlerFunc: func(ctx context.Context, name string, sync v3.UserAttributeHandlerFunc) {
// panic("mock out the AddHandler method")
// },
// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.UserAttributeLifecycle) {
// panic("mock out the AddLifecycle method")
// },
// ControllerFunc: func() v3.UserAttributeController {
// panic("mock out the Controller method")
// },
// CreateFunc: func(in1 *v3.UserAttribute) (*v3.UserAttribute, error) {
// panic("mock out the Create method")
// },
// DeleteFunc: func(name string, options *v1.DeleteOptions) error {
// panic("mock out the Delete method")
// },
// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error {
// panic("mock out the DeleteCollection method")
// },
// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error {
// panic("mock out the DeleteNamespaced method")
// },
// GetFunc: func(name string, opts v1.GetOptions) (*v3.UserAttribute, error) {
// panic("mock out the Get method")
// },
// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.UserAttribute, error) {
// panic("mock out the GetNamespaced method")
// },
// ListFunc: func(opts v1.ListOptions) (*v3.UserAttributeList, error) {
// panic("mock out the List method")
// },
// ListNamespacedFunc: func(namespace string, opts v1.ListOptions) (*v3.UserAttributeList, error) {
// panic("mock out the ListNamespaced method")
// },
// ObjectClientFunc: func() *objectclient.ObjectClient {
// panic("mock out the ObjectClient method")
// },
// UpdateFunc: func(in1 *v3.UserAttribute) (*v3.UserAttribute, error) {
// panic("mock out the Update method")
// },
// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) {
// panic("mock out the Watch method")
// },
// }
//
// // use mockedUserAttributeInterface in code that requires UserAttributeInterface
// // and then make assertions.
//
// }
type UserAttributeInterfaceMock struct {
// AddClusterScopedFeatureHandlerFunc mocks the AddClusterScopedFeatureHandler method.
AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.UserAttributeHandlerFunc)
// AddClusterScopedFeatureLifecycleFunc mocks the AddClusterScopedFeatureLifecycle method.
AddClusterScopedFeatureLifecycleFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.UserAttributeLifecycle)
// AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method.
AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.UserAttributeHandlerFunc)
// AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method.
AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.UserAttributeLifecycle)
// AddFeatureHandlerFunc mocks the AddFeatureHandler method.
AddFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, sync v3.UserAttributeHandlerFunc)
// AddFeatureLifecycleFunc mocks the AddFeatureLifecycle method.
AddFeatureLifecycleFunc func(ctx context.Context, enabled func() bool, name string, lifecycle v3.UserAttributeLifecycle)
// AddHandlerFunc mocks the AddHandler method.
AddHandlerFunc func(ctx context.Context, name string, sync v3.UserAttributeHandlerFunc)
// AddLifecycleFunc mocks the AddLifecycle method.
AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.UserAttributeLifecycle)
// ControllerFunc mocks the Controller method.
ControllerFunc func() v3.UserAttributeController
// CreateFunc mocks the Create method.
CreateFunc func(in1 *v3.UserAttribute) (*v3.UserAttribute, error)
// DeleteFunc mocks the Delete method.
DeleteFunc func(name string, options *v1.DeleteOptions) error
// DeleteCollectionFunc mocks the DeleteCollection method.
DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error
// DeleteNamespacedFunc mocks the DeleteNamespaced method.
DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error
// GetFunc mocks the Get method.
GetFunc func(name string, opts v1.GetOptions) (*v3.UserAttribute, error)
// GetNamespacedFunc mocks the GetNamespaced method.
GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.UserAttribute, error)
// ListFunc mocks the List method.
ListFunc func(opts v1.ListOptions) (*v3.UserAttributeList, error)
// ListNamespacedFunc mocks the ListNamespaced method.
ListNamespacedFunc func(namespace string, opts v1.ListOptions) (*v3.UserAttributeList, error)
// ObjectClientFunc mocks the ObjectClient method.
ObjectClientFunc func() *objectclient.ObjectClient
// UpdateFunc mocks the Update method.
UpdateFunc func(in1 *v3.UserAttribute) (*v3.UserAttribute, error)
// WatchFunc mocks the Watch method.
WatchFunc func(opts v1.ListOptions) (watch.Interface, error)
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
AddClusterScopedFeatureHandler []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Enabled is the enabled argument value.
Enabled func() bool
// Name is the name argument value.
Name string
// ClusterName is the clusterName argument value.
ClusterName string
// Sync is the sync argument value.
Sync v3.UserAttributeHandlerFunc
}
// AddClusterScopedFeatureLifecycle holds details about calls to the AddClusterScopedFeatureLifecycle method.
AddClusterScopedFeatureLifecycle []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Enabled is the enabled argument value.
Enabled func() bool
// Name is the name argument value.
Name string
// ClusterName is the clusterName argument value.
ClusterName string
// Lifecycle is the lifecycle argument value.
Lifecycle v3.UserAttributeLifecycle
}
// AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method.
AddClusterScopedHandler []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Name is the name argument value.
Name string
// ClusterName is the clusterName argument value.
ClusterName string
// Sync is the sync argument value.
Sync v3.UserAttributeHandlerFunc
}
// AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method.
AddClusterScopedLifecycle []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Name is the name argument value.
Name string
// ClusterName is the clusterName argument value.
ClusterName string
// Lifecycle is the lifecycle argument value.
Lifecycle v3.UserAttributeLifecycle
}
// AddFeatureHandler holds details about calls to the AddFeatureHandler method.
AddFeatureHandler []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Enabled is the enabled argument value.
Enabled func() bool
// Name is the name argument value.
Name string
// Sync is the sync argument value.
Sync v3.UserAttributeHandlerFunc
}
// AddFeatureLifecycle holds details about calls to the AddFeatureLifecycle method.
AddFeatureLifecycle []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Enabled is the enabled argument value.
Enabled func() bool
// Name is the name argument value.
Name string
// Lifecycle is the lifecycle argument value.
Lifecycle v3.UserAttributeLifecycle
}
// AddHandler holds details about calls to the AddHandler method.
AddHandler []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Name is the name argument value.
Name string
// Sync is the sync argument value.
Sync v3.UserAttributeHandlerFunc
}
// AddLifecycle holds details about calls to the AddLifecycle method.
AddLifecycle []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Name is the name argument value.
Name string
// Lifecycle is the lifecycle argument value.
Lifecycle v3.UserAttributeLifecycle
}
// Controller holds details about calls to the Controller method.
Controller []struct {
}
// Create holds details about calls to the Create method.
Create []struct {
// In1 is the in1 argument value.
In1 *v3.UserAttribute
}
// Delete holds details about calls to the Delete method.
Delete []struct {
// Name is the name argument value.
Name string
// Options is the options argument value.
Options *v1.DeleteOptions
}
// DeleteCollection holds details about calls to the DeleteCollection method.
DeleteCollection []struct {
// DeleteOpts is the deleteOpts argument value.
DeleteOpts *v1.DeleteOptions
// ListOpts is the listOpts argument value.
ListOpts v1.ListOptions
}
// DeleteNamespaced holds details about calls to the DeleteNamespaced method.
DeleteNamespaced []struct {
// Namespace is the namespace argument value.
Namespace string
// Name is the name argument value.
Name string
// Options is the options argument value.
Options *v1.DeleteOptions
}
// Get holds details about calls to the Get method.
Get []struct {
// Name is the name argument value.
Name string