-
Notifications
You must be signed in to change notification settings - Fork 8
/
reconcilers.go
382 lines (323 loc) · 15.1 KB
/
reconcilers.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
// Code generated by MockGen. DO NOT EDIT.
// Source: ./reconcilers.go
// Package mock_controller is a generated GoMock package.
package mock_controller
import (
context "context"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
v1 "github.com/solo-io/skv2/codegen/test/api/things.test.io/v1"
controller "github.com/solo-io/skv2/codegen/test/api/things.test.io/v1/controller"
reconcile "github.com/solo-io/skv2/pkg/reconcile"
predicate "sigs.k8s.io/controller-runtime/pkg/predicate"
)
// MockPaintReconciler is a mock of PaintReconciler interface
type MockPaintReconciler struct {
ctrl *gomock.Controller
recorder *MockPaintReconcilerMockRecorder
}
// MockPaintReconcilerMockRecorder is the mock recorder for MockPaintReconciler
type MockPaintReconcilerMockRecorder struct {
mock *MockPaintReconciler
}
// NewMockPaintReconciler creates a new mock instance
func NewMockPaintReconciler(ctrl *gomock.Controller) *MockPaintReconciler {
mock := &MockPaintReconciler{ctrl: ctrl}
mock.recorder = &MockPaintReconcilerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockPaintReconciler) EXPECT() *MockPaintReconcilerMockRecorder {
return m.recorder
}
// ReconcilePaint mocks base method
func (m *MockPaintReconciler) ReconcilePaint(obj *v1.Paint) (reconcile.Result, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ReconcilePaint", obj)
ret0, _ := ret[0].(reconcile.Result)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ReconcilePaint indicates an expected call of ReconcilePaint
func (mr *MockPaintReconcilerMockRecorder) ReconcilePaint(obj interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReconcilePaint", reflect.TypeOf((*MockPaintReconciler)(nil).ReconcilePaint), obj)
}
// MockPaintDeletionReconciler is a mock of PaintDeletionReconciler interface
type MockPaintDeletionReconciler struct {
ctrl *gomock.Controller
recorder *MockPaintDeletionReconcilerMockRecorder
}
// MockPaintDeletionReconcilerMockRecorder is the mock recorder for MockPaintDeletionReconciler
type MockPaintDeletionReconcilerMockRecorder struct {
mock *MockPaintDeletionReconciler
}
// NewMockPaintDeletionReconciler creates a new mock instance
func NewMockPaintDeletionReconciler(ctrl *gomock.Controller) *MockPaintDeletionReconciler {
mock := &MockPaintDeletionReconciler{ctrl: ctrl}
mock.recorder = &MockPaintDeletionReconcilerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockPaintDeletionReconciler) EXPECT() *MockPaintDeletionReconcilerMockRecorder {
return m.recorder
}
// ReconcilePaintDeletion mocks base method
func (m *MockPaintDeletionReconciler) ReconcilePaintDeletion(req reconcile.Request) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ReconcilePaintDeletion", req)
ret0, _ := ret[0].(error)
return ret0
}
// ReconcilePaintDeletion indicates an expected call of ReconcilePaintDeletion
func (mr *MockPaintDeletionReconcilerMockRecorder) ReconcilePaintDeletion(req interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReconcilePaintDeletion", reflect.TypeOf((*MockPaintDeletionReconciler)(nil).ReconcilePaintDeletion), req)
}
// MockPaintFinalizer is a mock of PaintFinalizer interface
type MockPaintFinalizer struct {
ctrl *gomock.Controller
recorder *MockPaintFinalizerMockRecorder
}
// MockPaintFinalizerMockRecorder is the mock recorder for MockPaintFinalizer
type MockPaintFinalizerMockRecorder struct {
mock *MockPaintFinalizer
}
// NewMockPaintFinalizer creates a new mock instance
func NewMockPaintFinalizer(ctrl *gomock.Controller) *MockPaintFinalizer {
mock := &MockPaintFinalizer{ctrl: ctrl}
mock.recorder = &MockPaintFinalizerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockPaintFinalizer) EXPECT() *MockPaintFinalizerMockRecorder {
return m.recorder
}
// ReconcilePaint mocks base method
func (m *MockPaintFinalizer) ReconcilePaint(obj *v1.Paint) (reconcile.Result, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ReconcilePaint", obj)
ret0, _ := ret[0].(reconcile.Result)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ReconcilePaint indicates an expected call of ReconcilePaint
func (mr *MockPaintFinalizerMockRecorder) ReconcilePaint(obj interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReconcilePaint", reflect.TypeOf((*MockPaintFinalizer)(nil).ReconcilePaint), obj)
}
// PaintFinalizerName mocks base method
func (m *MockPaintFinalizer) PaintFinalizerName() string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PaintFinalizerName")
ret0, _ := ret[0].(string)
return ret0
}
// PaintFinalizerName indicates an expected call of PaintFinalizerName
func (mr *MockPaintFinalizerMockRecorder) PaintFinalizerName() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PaintFinalizerName", reflect.TypeOf((*MockPaintFinalizer)(nil).PaintFinalizerName))
}
// FinalizePaint mocks base method
func (m *MockPaintFinalizer) FinalizePaint(obj *v1.Paint) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "FinalizePaint", obj)
ret0, _ := ret[0].(error)
return ret0
}
// FinalizePaint indicates an expected call of FinalizePaint
func (mr *MockPaintFinalizerMockRecorder) FinalizePaint(obj interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FinalizePaint", reflect.TypeOf((*MockPaintFinalizer)(nil).FinalizePaint), obj)
}
// MockPaintReconcileLoop is a mock of PaintReconcileLoop interface
type MockPaintReconcileLoop struct {
ctrl *gomock.Controller
recorder *MockPaintReconcileLoopMockRecorder
}
// MockPaintReconcileLoopMockRecorder is the mock recorder for MockPaintReconcileLoop
type MockPaintReconcileLoopMockRecorder struct {
mock *MockPaintReconcileLoop
}
// NewMockPaintReconcileLoop creates a new mock instance
func NewMockPaintReconcileLoop(ctrl *gomock.Controller) *MockPaintReconcileLoop {
mock := &MockPaintReconcileLoop{ctrl: ctrl}
mock.recorder = &MockPaintReconcileLoopMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockPaintReconcileLoop) EXPECT() *MockPaintReconcileLoopMockRecorder {
return m.recorder
}
// RunPaintReconciler mocks base method
func (m *MockPaintReconcileLoop) RunPaintReconciler(ctx context.Context, rec controller.PaintReconciler, predicates ...predicate.Predicate) error {
m.ctrl.T.Helper()
varargs := []interface{}{ctx, rec}
for _, a := range predicates {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "RunPaintReconciler", varargs...)
ret0, _ := ret[0].(error)
return ret0
}
// RunPaintReconciler indicates an expected call of RunPaintReconciler
func (mr *MockPaintReconcileLoopMockRecorder) RunPaintReconciler(ctx, rec interface{}, predicates ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{ctx, rec}, predicates...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunPaintReconciler", reflect.TypeOf((*MockPaintReconcileLoop)(nil).RunPaintReconciler), varargs...)
}
// MockClusterResourceReconciler is a mock of ClusterResourceReconciler interface
type MockClusterResourceReconciler struct {
ctrl *gomock.Controller
recorder *MockClusterResourceReconcilerMockRecorder
}
// MockClusterResourceReconcilerMockRecorder is the mock recorder for MockClusterResourceReconciler
type MockClusterResourceReconcilerMockRecorder struct {
mock *MockClusterResourceReconciler
}
// NewMockClusterResourceReconciler creates a new mock instance
func NewMockClusterResourceReconciler(ctrl *gomock.Controller) *MockClusterResourceReconciler {
mock := &MockClusterResourceReconciler{ctrl: ctrl}
mock.recorder = &MockClusterResourceReconcilerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockClusterResourceReconciler) EXPECT() *MockClusterResourceReconcilerMockRecorder {
return m.recorder
}
// ReconcileClusterResource mocks base method
func (m *MockClusterResourceReconciler) ReconcileClusterResource(obj *v1.ClusterResource) (reconcile.Result, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ReconcileClusterResource", obj)
ret0, _ := ret[0].(reconcile.Result)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ReconcileClusterResource indicates an expected call of ReconcileClusterResource
func (mr *MockClusterResourceReconcilerMockRecorder) ReconcileClusterResource(obj interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReconcileClusterResource", reflect.TypeOf((*MockClusterResourceReconciler)(nil).ReconcileClusterResource), obj)
}
// MockClusterResourceDeletionReconciler is a mock of ClusterResourceDeletionReconciler interface
type MockClusterResourceDeletionReconciler struct {
ctrl *gomock.Controller
recorder *MockClusterResourceDeletionReconcilerMockRecorder
}
// MockClusterResourceDeletionReconcilerMockRecorder is the mock recorder for MockClusterResourceDeletionReconciler
type MockClusterResourceDeletionReconcilerMockRecorder struct {
mock *MockClusterResourceDeletionReconciler
}
// NewMockClusterResourceDeletionReconciler creates a new mock instance
func NewMockClusterResourceDeletionReconciler(ctrl *gomock.Controller) *MockClusterResourceDeletionReconciler {
mock := &MockClusterResourceDeletionReconciler{ctrl: ctrl}
mock.recorder = &MockClusterResourceDeletionReconcilerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockClusterResourceDeletionReconciler) EXPECT() *MockClusterResourceDeletionReconcilerMockRecorder {
return m.recorder
}
// ReconcileClusterResourceDeletion mocks base method
func (m *MockClusterResourceDeletionReconciler) ReconcileClusterResourceDeletion(req reconcile.Request) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ReconcileClusterResourceDeletion", req)
ret0, _ := ret[0].(error)
return ret0
}
// ReconcileClusterResourceDeletion indicates an expected call of ReconcileClusterResourceDeletion
func (mr *MockClusterResourceDeletionReconcilerMockRecorder) ReconcileClusterResourceDeletion(req interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReconcileClusterResourceDeletion", reflect.TypeOf((*MockClusterResourceDeletionReconciler)(nil).ReconcileClusterResourceDeletion), req)
}
// MockClusterResourceFinalizer is a mock of ClusterResourceFinalizer interface
type MockClusterResourceFinalizer struct {
ctrl *gomock.Controller
recorder *MockClusterResourceFinalizerMockRecorder
}
// MockClusterResourceFinalizerMockRecorder is the mock recorder for MockClusterResourceFinalizer
type MockClusterResourceFinalizerMockRecorder struct {
mock *MockClusterResourceFinalizer
}
// NewMockClusterResourceFinalizer creates a new mock instance
func NewMockClusterResourceFinalizer(ctrl *gomock.Controller) *MockClusterResourceFinalizer {
mock := &MockClusterResourceFinalizer{ctrl: ctrl}
mock.recorder = &MockClusterResourceFinalizerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockClusterResourceFinalizer) EXPECT() *MockClusterResourceFinalizerMockRecorder {
return m.recorder
}
// ReconcileClusterResource mocks base method
func (m *MockClusterResourceFinalizer) ReconcileClusterResource(obj *v1.ClusterResource) (reconcile.Result, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ReconcileClusterResource", obj)
ret0, _ := ret[0].(reconcile.Result)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ReconcileClusterResource indicates an expected call of ReconcileClusterResource
func (mr *MockClusterResourceFinalizerMockRecorder) ReconcileClusterResource(obj interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReconcileClusterResource", reflect.TypeOf((*MockClusterResourceFinalizer)(nil).ReconcileClusterResource), obj)
}
// ClusterResourceFinalizerName mocks base method
func (m *MockClusterResourceFinalizer) ClusterResourceFinalizerName() string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ClusterResourceFinalizerName")
ret0, _ := ret[0].(string)
return ret0
}
// ClusterResourceFinalizerName indicates an expected call of ClusterResourceFinalizerName
func (mr *MockClusterResourceFinalizerMockRecorder) ClusterResourceFinalizerName() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClusterResourceFinalizerName", reflect.TypeOf((*MockClusterResourceFinalizer)(nil).ClusterResourceFinalizerName))
}
// FinalizeClusterResource mocks base method
func (m *MockClusterResourceFinalizer) FinalizeClusterResource(obj *v1.ClusterResource) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "FinalizeClusterResource", obj)
ret0, _ := ret[0].(error)
return ret0
}
// FinalizeClusterResource indicates an expected call of FinalizeClusterResource
func (mr *MockClusterResourceFinalizerMockRecorder) FinalizeClusterResource(obj interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FinalizeClusterResource", reflect.TypeOf((*MockClusterResourceFinalizer)(nil).FinalizeClusterResource), obj)
}
// MockClusterResourceReconcileLoop is a mock of ClusterResourceReconcileLoop interface
type MockClusterResourceReconcileLoop struct {
ctrl *gomock.Controller
recorder *MockClusterResourceReconcileLoopMockRecorder
}
// MockClusterResourceReconcileLoopMockRecorder is the mock recorder for MockClusterResourceReconcileLoop
type MockClusterResourceReconcileLoopMockRecorder struct {
mock *MockClusterResourceReconcileLoop
}
// NewMockClusterResourceReconcileLoop creates a new mock instance
func NewMockClusterResourceReconcileLoop(ctrl *gomock.Controller) *MockClusterResourceReconcileLoop {
mock := &MockClusterResourceReconcileLoop{ctrl: ctrl}
mock.recorder = &MockClusterResourceReconcileLoopMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockClusterResourceReconcileLoop) EXPECT() *MockClusterResourceReconcileLoopMockRecorder {
return m.recorder
}
// RunClusterResourceReconciler mocks base method
func (m *MockClusterResourceReconcileLoop) RunClusterResourceReconciler(ctx context.Context, rec controller.ClusterResourceReconciler, predicates ...predicate.Predicate) error {
m.ctrl.T.Helper()
varargs := []interface{}{ctx, rec}
for _, a := range predicates {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "RunClusterResourceReconciler", varargs...)
ret0, _ := ret[0].(error)
return ret0
}
// RunClusterResourceReconciler indicates an expected call of RunClusterResourceReconciler
func (mr *MockClusterResourceReconcileLoopMockRecorder) RunClusterResourceReconciler(ctx, rec interface{}, predicates ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{ctx, rec}, predicates...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunClusterResourceReconciler", reflect.TypeOf((*MockClusterResourceReconcileLoop)(nil).RunClusterResourceReconciler), varargs...)
}