This repository has been archived by the owner on Jan 19, 2023. It is now read-only.
/
fakes.go
505 lines (431 loc) · 17.5 KB
/
fakes.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
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/vmware-tanzu/octant/pkg/plugin (interfaces: Runners,ManagerStore,ClientFactory,ModuleService,Service,Broker)
// Package fake is a generated GoMock package.
package fake
import (
context "context"
gomock "github.com/golang/mock/gomock"
action "github.com/vmware-tanzu/octant/pkg/action"
navigation "github.com/vmware-tanzu/octant/pkg/navigation"
plugin "github.com/vmware-tanzu/octant/pkg/plugin"
component "github.com/vmware-tanzu/octant/pkg/view/component"
grpc "google.golang.org/grpc"
runtime "k8s.io/apimachinery/pkg/runtime"
reflect "reflect"
)
// MockRunners is a mock of Runners interface
type MockRunners struct {
ctrl *gomock.Controller
recorder *MockRunnersMockRecorder
}
// MockRunnersMockRecorder is the mock recorder for MockRunners
type MockRunnersMockRecorder struct {
mock *MockRunners
}
// NewMockRunners creates a new mock instance
func NewMockRunners(ctrl *gomock.Controller) *MockRunners {
mock := &MockRunners{ctrl: ctrl}
mock.recorder = &MockRunnersMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockRunners) EXPECT() *MockRunnersMockRecorder {
return m.recorder
}
// ObjectStatus mocks base method
func (m *MockRunners) ObjectStatus(arg0 plugin.ManagerStore) (plugin.DefaultRunner, chan plugin.ObjectStatusResponse) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ObjectStatus", arg0)
ret0, _ := ret[0].(plugin.DefaultRunner)
ret1, _ := ret[1].(chan plugin.ObjectStatusResponse)
return ret0, ret1
}
// ObjectStatus indicates an expected call of ObjectStatus
func (mr *MockRunnersMockRecorder) ObjectStatus(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStatus", reflect.TypeOf((*MockRunners)(nil).ObjectStatus), arg0)
}
// Print mocks base method
func (m *MockRunners) Print(arg0 plugin.ManagerStore) (plugin.DefaultRunner, chan plugin.PrintResponse) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Print", arg0)
ret0, _ := ret[0].(plugin.DefaultRunner)
ret1, _ := ret[1].(chan plugin.PrintResponse)
return ret0, ret1
}
// Print indicates an expected call of Print
func (mr *MockRunnersMockRecorder) Print(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Print", reflect.TypeOf((*MockRunners)(nil).Print), arg0)
}
// Tab mocks base method
func (m *MockRunners) Tab(arg0 plugin.ManagerStore) (plugin.DefaultRunner, chan component.Tab) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Tab", arg0)
ret0, _ := ret[0].(plugin.DefaultRunner)
ret1, _ := ret[1].(chan component.Tab)
return ret0, ret1
}
// Tab indicates an expected call of Tab
func (mr *MockRunnersMockRecorder) Tab(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tab", reflect.TypeOf((*MockRunners)(nil).Tab), arg0)
}
// MockManagerStore is a mock of ManagerStore interface
type MockManagerStore struct {
ctrl *gomock.Controller
recorder *MockManagerStoreMockRecorder
}
// MockManagerStoreMockRecorder is the mock recorder for MockManagerStore
type MockManagerStoreMockRecorder struct {
mock *MockManagerStore
}
// NewMockManagerStore creates a new mock instance
func NewMockManagerStore(ctrl *gomock.Controller) *MockManagerStore {
mock := &MockManagerStore{ctrl: ctrl}
mock.recorder = &MockManagerStoreMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockManagerStore) EXPECT() *MockManagerStoreMockRecorder {
return m.recorder
}
// ClientNames mocks base method
func (m *MockManagerStore) ClientNames() []string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ClientNames")
ret0, _ := ret[0].([]string)
return ret0
}
// ClientNames indicates an expected call of ClientNames
func (mr *MockManagerStoreMockRecorder) ClientNames() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClientNames", reflect.TypeOf((*MockManagerStore)(nil).ClientNames))
}
// Clients mocks base method
func (m *MockManagerStore) Clients() map[string]plugin.Client {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Clients")
ret0, _ := ret[0].(map[string]plugin.Client)
return ret0
}
// Clients indicates an expected call of Clients
func (mr *MockManagerStoreMockRecorder) Clients() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Clients", reflect.TypeOf((*MockManagerStore)(nil).Clients))
}
// GetCommand mocks base method
func (m *MockManagerStore) GetCommand(arg0 string) (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetCommand", arg0)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetCommand indicates an expected call of GetCommand
func (mr *MockManagerStoreMockRecorder) GetCommand(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCommand", reflect.TypeOf((*MockManagerStore)(nil).GetCommand), arg0)
}
// GetMetadata mocks base method
func (m *MockManagerStore) GetMetadata(arg0 string) (*plugin.Metadata, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetMetadata", arg0)
ret0, _ := ret[0].(*plugin.Metadata)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetMetadata indicates an expected call of GetMetadata
func (mr *MockManagerStoreMockRecorder) GetMetadata(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMetadata", reflect.TypeOf((*MockManagerStore)(nil).GetMetadata), arg0)
}
// GetService mocks base method
func (m *MockManagerStore) GetService(arg0 string) (plugin.Service, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetService", arg0)
ret0, _ := ret[0].(plugin.Service)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetService indicates an expected call of GetService
func (mr *MockManagerStoreMockRecorder) GetService(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetService", reflect.TypeOf((*MockManagerStore)(nil).GetService), arg0)
}
// Store mocks base method
func (m *MockManagerStore) Store(arg0 string, arg1 plugin.Client, arg2 *plugin.Metadata, arg3 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Store", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(error)
return ret0
}
// Store indicates an expected call of Store
func (mr *MockManagerStoreMockRecorder) Store(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Store", reflect.TypeOf((*MockManagerStore)(nil).Store), arg0, arg1, arg2, arg3)
}
// MockClientFactory is a mock of ClientFactory interface
type MockClientFactory struct {
ctrl *gomock.Controller
recorder *MockClientFactoryMockRecorder
}
// MockClientFactoryMockRecorder is the mock recorder for MockClientFactory
type MockClientFactoryMockRecorder struct {
mock *MockClientFactory
}
// NewMockClientFactory creates a new mock instance
func NewMockClientFactory(ctrl *gomock.Controller) *MockClientFactory {
mock := &MockClientFactory{ctrl: ctrl}
mock.recorder = &MockClientFactoryMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockClientFactory) EXPECT() *MockClientFactoryMockRecorder {
return m.recorder
}
// Init mocks base method
func (m *MockClientFactory) Init(arg0 context.Context, arg1 string) plugin.Client {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Init", arg0, arg1)
ret0, _ := ret[0].(plugin.Client)
return ret0
}
// Init indicates an expected call of Init
func (mr *MockClientFactoryMockRecorder) Init(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockClientFactory)(nil).Init), arg0, arg1)
}
// MockModuleService is a mock of ModuleService interface
type MockModuleService struct {
ctrl *gomock.Controller
recorder *MockModuleServiceMockRecorder
}
// MockModuleServiceMockRecorder is the mock recorder for MockModuleService
type MockModuleServiceMockRecorder struct {
mock *MockModuleService
}
// NewMockModuleService creates a new mock instance
func NewMockModuleService(ctrl *gomock.Controller) *MockModuleService {
mock := &MockModuleService{ctrl: ctrl}
mock.recorder = &MockModuleServiceMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockModuleService) EXPECT() *MockModuleServiceMockRecorder {
return m.recorder
}
// Content mocks base method
func (m *MockModuleService) Content(arg0 context.Context, arg1 string) (component.ContentResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Content", arg0, arg1)
ret0, _ := ret[0].(component.ContentResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Content indicates an expected call of Content
func (mr *MockModuleServiceMockRecorder) Content(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Content", reflect.TypeOf((*MockModuleService)(nil).Content), arg0, arg1)
}
// HandleAction mocks base method
func (m *MockModuleService) HandleAction(arg0 context.Context, arg1 string, arg2 action.Payload) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "HandleAction", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// HandleAction indicates an expected call of HandleAction
func (mr *MockModuleServiceMockRecorder) HandleAction(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleAction", reflect.TypeOf((*MockModuleService)(nil).HandleAction), arg0, arg1, arg2)
}
// Navigation mocks base method
func (m *MockModuleService) Navigation(arg0 context.Context) (navigation.Navigation, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Navigation", arg0)
ret0, _ := ret[0].(navigation.Navigation)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Navigation indicates an expected call of Navigation
func (mr *MockModuleServiceMockRecorder) Navigation(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Navigation", reflect.TypeOf((*MockModuleService)(nil).Navigation), arg0)
}
// ObjectStatus mocks base method
func (m *MockModuleService) ObjectStatus(arg0 context.Context, arg1 runtime.Object) (plugin.ObjectStatusResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ObjectStatus", arg0, arg1)
ret0, _ := ret[0].(plugin.ObjectStatusResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ObjectStatus indicates an expected call of ObjectStatus
func (mr *MockModuleServiceMockRecorder) ObjectStatus(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStatus", reflect.TypeOf((*MockModuleService)(nil).ObjectStatus), arg0, arg1)
}
// Print mocks base method
func (m *MockModuleService) Print(arg0 context.Context, arg1 runtime.Object) (plugin.PrintResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Print", arg0, arg1)
ret0, _ := ret[0].(plugin.PrintResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Print indicates an expected call of Print
func (mr *MockModuleServiceMockRecorder) Print(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Print", reflect.TypeOf((*MockModuleService)(nil).Print), arg0, arg1)
}
// PrintTab mocks base method
func (m *MockModuleService) PrintTab(arg0 context.Context, arg1 runtime.Object) (plugin.TabResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PrintTab", arg0, arg1)
ret0, _ := ret[0].(plugin.TabResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// PrintTab indicates an expected call of PrintTab
func (mr *MockModuleServiceMockRecorder) PrintTab(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrintTab", reflect.TypeOf((*MockModuleService)(nil).PrintTab), arg0, arg1)
}
// Register mocks base method
func (m *MockModuleService) Register(arg0 context.Context, arg1 string) (plugin.Metadata, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Register", arg0, arg1)
ret0, _ := ret[0].(plugin.Metadata)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Register indicates an expected call of Register
func (mr *MockModuleServiceMockRecorder) Register(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Register", reflect.TypeOf((*MockModuleService)(nil).Register), arg0, arg1)
}
// MockService is a mock of Service interface
type MockService struct {
ctrl *gomock.Controller
recorder *MockServiceMockRecorder
}
// MockServiceMockRecorder is the mock recorder for MockService
type MockServiceMockRecorder struct {
mock *MockService
}
// NewMockService creates a new mock instance
func NewMockService(ctrl *gomock.Controller) *MockService {
mock := &MockService{ctrl: ctrl}
mock.recorder = &MockServiceMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockService) EXPECT() *MockServiceMockRecorder {
return m.recorder
}
// HandleAction mocks base method
func (m *MockService) HandleAction(arg0 context.Context, arg1 string, arg2 action.Payload) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "HandleAction", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// HandleAction indicates an expected call of HandleAction
func (mr *MockServiceMockRecorder) HandleAction(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleAction", reflect.TypeOf((*MockService)(nil).HandleAction), arg0, arg1, arg2)
}
// ObjectStatus mocks base method
func (m *MockService) ObjectStatus(arg0 context.Context, arg1 runtime.Object) (plugin.ObjectStatusResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ObjectStatus", arg0, arg1)
ret0, _ := ret[0].(plugin.ObjectStatusResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ObjectStatus indicates an expected call of ObjectStatus
func (mr *MockServiceMockRecorder) ObjectStatus(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStatus", reflect.TypeOf((*MockService)(nil).ObjectStatus), arg0, arg1)
}
// Print mocks base method
func (m *MockService) Print(arg0 context.Context, arg1 runtime.Object) (plugin.PrintResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Print", arg0, arg1)
ret0, _ := ret[0].(plugin.PrintResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Print indicates an expected call of Print
func (mr *MockServiceMockRecorder) Print(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Print", reflect.TypeOf((*MockService)(nil).Print), arg0, arg1)
}
// PrintTab mocks base method
func (m *MockService) PrintTab(arg0 context.Context, arg1 runtime.Object) (plugin.TabResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PrintTab", arg0, arg1)
ret0, _ := ret[0].(plugin.TabResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// PrintTab indicates an expected call of PrintTab
func (mr *MockServiceMockRecorder) PrintTab(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrintTab", reflect.TypeOf((*MockService)(nil).PrintTab), arg0, arg1)
}
// Register mocks base method
func (m *MockService) Register(arg0 context.Context, arg1 string) (plugin.Metadata, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Register", arg0, arg1)
ret0, _ := ret[0].(plugin.Metadata)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Register indicates an expected call of Register
func (mr *MockServiceMockRecorder) Register(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Register", reflect.TypeOf((*MockService)(nil).Register), arg0, arg1)
}
// MockBroker is a mock of Broker interface
type MockBroker struct {
ctrl *gomock.Controller
recorder *MockBrokerMockRecorder
}
// MockBrokerMockRecorder is the mock recorder for MockBroker
type MockBrokerMockRecorder struct {
mock *MockBroker
}
// NewMockBroker creates a new mock instance
func NewMockBroker(ctrl *gomock.Controller) *MockBroker {
mock := &MockBroker{ctrl: ctrl}
mock.recorder = &MockBrokerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockBroker) EXPECT() *MockBrokerMockRecorder {
return m.recorder
}
// AcceptAndServe mocks base method
func (m *MockBroker) AcceptAndServe(arg0 uint32, arg1 func([]grpc.ServerOption) *grpc.Server) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "AcceptAndServe", arg0, arg1)
}
// AcceptAndServe indicates an expected call of AcceptAndServe
func (mr *MockBrokerMockRecorder) AcceptAndServe(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AcceptAndServe", reflect.TypeOf((*MockBroker)(nil).AcceptAndServe), arg0, arg1)
}
// NextId mocks base method
func (m *MockBroker) NextId() uint32 {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NextId")
ret0, _ := ret[0].(uint32)
return ret0
}
// NextId indicates an expected call of NextId
func (mr *MockBrokerMockRecorder) NextId() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NextId", reflect.TypeOf((*MockBroker)(nil).NextId))
}