v2.16.0 ebd2ab3

mock_config_service.go RawHistoryFolder

1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package mocks
6
7import (
8	"context"
9
10	"github.com/bnema/gordon/internal/domain"
11	mock "github.com/stretchr/testify/mock"
12)
13
14// NewMockConfigService creates a new instance of MockConfigService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15// The first argument is typically a *testing.T value.
16func NewMockConfigService(t interface {
17	mock.TestingT
18	Cleanup(func())
19}) *MockConfigService {
20	mock := &MockConfigService{}
21	mock.Mock.Test(t)
22
23	t.Cleanup(func() { mock.AssertExpectations(t) })
24
25	return mock
26}
27
28// MockConfigService is an autogenerated mock type for the ConfigService type
29type MockConfigService struct {
30	mock.Mock
31}
32
33type MockConfigService_Expecter struct {
34	mock *mock.Mock
35}
36
37func (_m *MockConfigService) EXPECT() *MockConfigService_Expecter {
38	return &MockConfigService_Expecter{mock: &_m.Mock}
39}
40
41// AddAttachment provides a mock function for the type MockConfigService
42func (_mock *MockConfigService) AddAttachment(ctx context.Context, domainOrGroup string, image string) error {
43	ret := _mock.Called(ctx, domainOrGroup, image)
44
45	if len(ret) == 0 {
46		panic("no return value specified for AddAttachment")
47	}
48
49	var r0 error
50	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
51		r0 = returnFunc(ctx, domainOrGroup, image)
52	} else {
53		r0 = ret.Error(0)
54	}
55	return r0
56}
57
58// MockConfigService_AddAttachment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddAttachment'
59type MockConfigService_AddAttachment_Call struct {
60	*mock.Call
61}
62
63// AddAttachment is a helper method to define mock.On call
64//   - ctx context.Context
65//   - domainOrGroup string
66//   - image string
67func (_e *MockConfigService_Expecter) AddAttachment(ctx interface{}, domainOrGroup interface{}, image interface{}) *MockConfigService_AddAttachment_Call {
68	return &MockConfigService_AddAttachment_Call{Call: _e.mock.On("AddAttachment", ctx, domainOrGroup, image)}
69}
70
71func (_c *MockConfigService_AddAttachment_Call) Run(run func(ctx context.Context, domainOrGroup string, image string)) *MockConfigService_AddAttachment_Call {
72	_c.Call.Run(func(args mock.Arguments) {
73		var arg0 context.Context
74		if args[0] != nil {
75			arg0 = args[0].(context.Context)
76		}
77		var arg1 string
78		if args[1] != nil {
79			arg1 = args[1].(string)
80		}
81		var arg2 string
82		if args[2] != nil {
83			arg2 = args[2].(string)
84		}
85		run(
86			arg0,
87			arg1,
88			arg2,
89		)
90	})
91	return _c
92}
93
94func (_c *MockConfigService_AddAttachment_Call) Return(err error) *MockConfigService_AddAttachment_Call {
95	_c.Call.Return(err)
96	return _c
97}
98
99func (_c *MockConfigService_AddAttachment_Call) RunAndReturn(run func(ctx context.Context, domainOrGroup string, image string) error) *MockConfigService_AddAttachment_Call {
100	_c.Call.Return(run)
101	return _c
102}
103
104// AddRoute provides a mock function for the type MockConfigService
105func (_mock *MockConfigService) AddRoute(ctx context.Context, route domain.Route) error {
106	ret := _mock.Called(ctx, route)
107
108	if len(ret) == 0 {
109		panic("no return value specified for AddRoute")
110	}
111
112	var r0 error
113	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Route) error); ok {
114		r0 = returnFunc(ctx, route)
115	} else {
116		r0 = ret.Error(0)
117	}
118	return r0
119}
120
121// MockConfigService_AddRoute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddRoute'
122type MockConfigService_AddRoute_Call struct {
123	*mock.Call
124}
125
126// AddRoute is a helper method to define mock.On call
127//   - ctx context.Context
128//   - route domain.Route
129func (_e *MockConfigService_Expecter) AddRoute(ctx interface{}, route interface{}) *MockConfigService_AddRoute_Call {
130	return &MockConfigService_AddRoute_Call{Call: _e.mock.On("AddRoute", ctx, route)}
131}
132
133func (_c *MockConfigService_AddRoute_Call) Run(run func(ctx context.Context, route domain.Route)) *MockConfigService_AddRoute_Call {
134	_c.Call.Run(func(args mock.Arguments) {
135		var arg0 context.Context
136		if args[0] != nil {
137			arg0 = args[0].(context.Context)
138		}
139		var arg1 domain.Route
140		if args[1] != nil {
141			arg1 = args[1].(domain.Route)
142		}
143		run(
144			arg0,
145			arg1,
146		)
147	})
148	return _c
149}
150
151func (_c *MockConfigService_AddRoute_Call) Return(err error) *MockConfigService_AddRoute_Call {
152	_c.Call.Return(err)
153	return _c
154}
155
156func (_c *MockConfigService_AddRoute_Call) RunAndReturn(run func(ctx context.Context, route domain.Route) error) *MockConfigService_AddRoute_Call {
157	_c.Call.Return(run)
158	return _c
159}
160
161// FindRoutesByImage provides a mock function for the type MockConfigService
162func (_mock *MockConfigService) FindRoutesByImage(ctx context.Context, imageName string) []domain.Route {
163	ret := _mock.Called(ctx, imageName)
164
165	if len(ret) == 0 {
166		panic("no return value specified for FindRoutesByImage")
167	}
168
169	var r0 []domain.Route
170	if returnFunc, ok := ret.Get(0).(func(context.Context, string) []domain.Route); ok {
171		r0 = returnFunc(ctx, imageName)
172	} else {
173		if ret.Get(0) != nil {
174			r0 = ret.Get(0).([]domain.Route)
175		}
176	}
177	return r0
178}
179
180// MockConfigService_FindRoutesByImage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindRoutesByImage'
181type MockConfigService_FindRoutesByImage_Call struct {
182	*mock.Call
183}
184
185// FindRoutesByImage is a helper method to define mock.On call
186//   - ctx context.Context
187//   - imageName string
188func (_e *MockConfigService_Expecter) FindRoutesByImage(ctx interface{}, imageName interface{}) *MockConfigService_FindRoutesByImage_Call {
189	return &MockConfigService_FindRoutesByImage_Call{Call: _e.mock.On("FindRoutesByImage", ctx, imageName)}
190}
191
192func (_c *MockConfigService_FindRoutesByImage_Call) Run(run func(ctx context.Context, imageName string)) *MockConfigService_FindRoutesByImage_Call {
193	_c.Call.Run(func(args mock.Arguments) {
194		var arg0 context.Context
195		if args[0] != nil {
196			arg0 = args[0].(context.Context)
197		}
198		var arg1 string
199		if args[1] != nil {
200			arg1 = args[1].(string)
201		}
202		run(
203			arg0,
204			arg1,
205		)
206	})
207	return _c
208}
209
210func (_c *MockConfigService_FindRoutesByImage_Call) Return(routes []domain.Route) *MockConfigService_FindRoutesByImage_Call {
211	_c.Call.Return(routes)
212	return _c
213}
214
215func (_c *MockConfigService_FindRoutesByImage_Call) RunAndReturn(run func(ctx context.Context, imageName string) []domain.Route) *MockConfigService_FindRoutesByImage_Call {
216	_c.Call.Return(run)
217	return _c
218}
219
220// GetAllAttachments provides a mock function for the type MockConfigService
221func (_mock *MockConfigService) GetAllAttachments(ctx context.Context) map[string][]string {
222	ret := _mock.Called(ctx)
223
224	if len(ret) == 0 {
225		panic("no return value specified for GetAllAttachments")
226	}
227
228	var r0 map[string][]string
229	if returnFunc, ok := ret.Get(0).(func(context.Context) map[string][]string); ok {
230		r0 = returnFunc(ctx)
231	} else {
232		if ret.Get(0) != nil {
233			r0 = ret.Get(0).(map[string][]string)
234		}
235	}
236	return r0
237}
238
239// MockConfigService_GetAllAttachments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllAttachments'
240type MockConfigService_GetAllAttachments_Call struct {
241	*mock.Call
242}
243
244// GetAllAttachments is a helper method to define mock.On call
245//   - ctx context.Context
246func (_e *MockConfigService_Expecter) GetAllAttachments(ctx interface{}) *MockConfigService_GetAllAttachments_Call {
247	return &MockConfigService_GetAllAttachments_Call{Call: _e.mock.On("GetAllAttachments", ctx)}
248}
249
250func (_c *MockConfigService_GetAllAttachments_Call) Run(run func(ctx context.Context)) *MockConfigService_GetAllAttachments_Call {
251	_c.Call.Run(func(args mock.Arguments) {
252		var arg0 context.Context
253		if args[0] != nil {
254			arg0 = args[0].(context.Context)
255		}
256		run(
257			arg0,
258		)
259	})
260	return _c
261}
262
263func (_c *MockConfigService_GetAllAttachments_Call) Return(stringToStrings map[string][]string) *MockConfigService_GetAllAttachments_Call {
264	_c.Call.Return(stringToStrings)
265	return _c
266}
267
268func (_c *MockConfigService_GetAllAttachments_Call) RunAndReturn(run func(ctx context.Context) map[string][]string) *MockConfigService_GetAllAttachments_Call {
269	_c.Call.Return(run)
270	return _c
271}
272
273// GetAttachmentsFor provides a mock function for the type MockConfigService
274func (_mock *MockConfigService) GetAttachmentsFor(ctx context.Context, domainOrGroup string) ([]string, error) {
275	ret := _mock.Called(ctx, domainOrGroup)
276
277	if len(ret) == 0 {
278		panic("no return value specified for GetAttachmentsFor")
279	}
280
281	var r0 []string
282	var r1 error
283	if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]string, error)); ok {
284		return returnFunc(ctx, domainOrGroup)
285	}
286	if returnFunc, ok := ret.Get(0).(func(context.Context, string) []string); ok {
287		r0 = returnFunc(ctx, domainOrGroup)
288	} else {
289		if ret.Get(0) != nil {
290			r0 = ret.Get(0).([]string)
291		}
292	}
293	if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
294		r1 = returnFunc(ctx, domainOrGroup)
295	} else {
296		r1 = ret.Error(1)
297	}
298	return r0, r1
299}
300
301// MockConfigService_GetAttachmentsFor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAttachmentsFor'
302type MockConfigService_GetAttachmentsFor_Call struct {
303	*mock.Call
304}
305
306// GetAttachmentsFor is a helper method to define mock.On call
307//   - ctx context.Context
308//   - domainOrGroup string
309func (_e *MockConfigService_Expecter) GetAttachmentsFor(ctx interface{}, domainOrGroup interface{}) *MockConfigService_GetAttachmentsFor_Call {
310	return &MockConfigService_GetAttachmentsFor_Call{Call: _e.mock.On("GetAttachmentsFor", ctx, domainOrGroup)}
311}
312
313func (_c *MockConfigService_GetAttachmentsFor_Call) Run(run func(ctx context.Context, domainOrGroup string)) *MockConfigService_GetAttachmentsFor_Call {
314	_c.Call.Run(func(args mock.Arguments) {
315		var arg0 context.Context
316		if args[0] != nil {
317			arg0 = args[0].(context.Context)
318		}
319		var arg1 string
320		if args[1] != nil {
321			arg1 = args[1].(string)
322		}
323		run(
324			arg0,
325			arg1,
326		)
327	})
328	return _c
329}
330
331func (_c *MockConfigService_GetAttachmentsFor_Call) Return(strings []string, err error) *MockConfigService_GetAttachmentsFor_Call {
332	_c.Call.Return(strings, err)
333	return _c
334}
335
336func (_c *MockConfigService_GetAttachmentsFor_Call) RunAndReturn(run func(ctx context.Context, domainOrGroup string) ([]string, error)) *MockConfigService_GetAttachmentsFor_Call {
337	_c.Call.Return(run)
338	return _c
339}
340
341// GetDataDir provides a mock function for the type MockConfigService
342func (_mock *MockConfigService) GetDataDir() string {
343	ret := _mock.Called()
344
345	if len(ret) == 0 {
346		panic("no return value specified for GetDataDir")
347	}
348
349	var r0 string
350	if returnFunc, ok := ret.Get(0).(func() string); ok {
351		r0 = returnFunc()
352	} else {
353		r0 = ret.Get(0).(string)
354	}
355	return r0
356}
357
358// MockConfigService_GetDataDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDataDir'
359type MockConfigService_GetDataDir_Call struct {
360	*mock.Call
361}
362
363// GetDataDir is a helper method to define mock.On call
364func (_e *MockConfigService_Expecter) GetDataDir() *MockConfigService_GetDataDir_Call {
365	return &MockConfigService_GetDataDir_Call{Call: _e.mock.On("GetDataDir")}
366}
367
368func (_c *MockConfigService_GetDataDir_Call) Run(run func()) *MockConfigService_GetDataDir_Call {
369	_c.Call.Run(func(args mock.Arguments) {
370		run()
371	})
372	return _c
373}
374
375func (_c *MockConfigService_GetDataDir_Call) Return(s string) *MockConfigService_GetDataDir_Call {
376	_c.Call.Return(s)
377	return _c
378}
379
380func (_c *MockConfigService_GetDataDir_Call) RunAndReturn(run func() string) *MockConfigService_GetDataDir_Call {
381	_c.Call.Return(run)
382	return _c
383}
384
385// GetExternalRoutes provides a mock function for the type MockConfigService
386func (_mock *MockConfigService) GetExternalRoutes() map[string]string {
387	ret := _mock.Called()
388
389	if len(ret) == 0 {
390		panic("no return value specified for GetExternalRoutes")
391	}
392
393	var r0 map[string]string
394	if returnFunc, ok := ret.Get(0).(func() map[string]string); ok {
395		r0 = returnFunc()
396	} else {
397		if ret.Get(0) != nil {
398			r0 = ret.Get(0).(map[string]string)
399		}
400	}
401	return r0
402}
403
404// MockConfigService_GetExternalRoutes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetExternalRoutes'
405type MockConfigService_GetExternalRoutes_Call struct {
406	*mock.Call
407}
408
409// GetExternalRoutes is a helper method to define mock.On call
410func (_e *MockConfigService_Expecter) GetExternalRoutes() *MockConfigService_GetExternalRoutes_Call {
411	return &MockConfigService_GetExternalRoutes_Call{Call: _e.mock.On("GetExternalRoutes")}
412}
413
414func (_c *MockConfigService_GetExternalRoutes_Call) Run(run func()) *MockConfigService_GetExternalRoutes_Call {
415	_c.Call.Run(func(args mock.Arguments) {
416		run()
417	})
418	return _c
419}
420
421func (_c *MockConfigService_GetExternalRoutes_Call) Return(stringToString map[string]string) *MockConfigService_GetExternalRoutes_Call {
422	_c.Call.Return(stringToString)
423	return _c
424}
425
426func (_c *MockConfigService_GetExternalRoutes_Call) RunAndReturn(run func() map[string]string) *MockConfigService_GetExternalRoutes_Call {
427	_c.Call.Return(run)
428	return _c
429}
430
431// GetNetworkPrefix provides a mock function for the type MockConfigService
432func (_mock *MockConfigService) GetNetworkPrefix() string {
433	ret := _mock.Called()
434
435	if len(ret) == 0 {
436		panic("no return value specified for GetNetworkPrefix")
437	}
438
439	var r0 string
440	if returnFunc, ok := ret.Get(0).(func() string); ok {
441		r0 = returnFunc()
442	} else {
443		r0 = ret.Get(0).(string)
444	}
445	return r0
446}
447
448// MockConfigService_GetNetworkPrefix_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNetworkPrefix'
449type MockConfigService_GetNetworkPrefix_Call struct {
450	*mock.Call
451}
452
453// GetNetworkPrefix is a helper method to define mock.On call
454func (_e *MockConfigService_Expecter) GetNetworkPrefix() *MockConfigService_GetNetworkPrefix_Call {
455	return &MockConfigService_GetNetworkPrefix_Call{Call: _e.mock.On("GetNetworkPrefix")}
456}
457
458func (_c *MockConfigService_GetNetworkPrefix_Call) Run(run func()) *MockConfigService_GetNetworkPrefix_Call {
459	_c.Call.Run(func(args mock.Arguments) {
460		run()
461	})
462	return _c
463}
464
465func (_c *MockConfigService_GetNetworkPrefix_Call) Return(s string) *MockConfigService_GetNetworkPrefix_Call {
466	_c.Call.Return(s)
467	return _c
468}
469
470func (_c *MockConfigService_GetNetworkPrefix_Call) RunAndReturn(run func() string) *MockConfigService_GetNetworkPrefix_Call {
471	_c.Call.Return(run)
472	return _c
473}
474
475// GetRegistryDomain provides a mock function for the type MockConfigService
476func (_mock *MockConfigService) GetRegistryDomain() string {
477	ret := _mock.Called()
478
479	if len(ret) == 0 {
480		panic("no return value specified for GetRegistryDomain")
481	}
482
483	var r0 string
484	if returnFunc, ok := ret.Get(0).(func() string); ok {
485		r0 = returnFunc()
486	} else {
487		r0 = ret.Get(0).(string)
488	}
489	return r0
490}
491
492// MockConfigService_GetRegistryDomain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRegistryDomain'
493type MockConfigService_GetRegistryDomain_Call struct {
494	*mock.Call
495}
496
497// GetRegistryDomain is a helper method to define mock.On call
498func (_e *MockConfigService_Expecter) GetRegistryDomain() *MockConfigService_GetRegistryDomain_Call {
499	return &MockConfigService_GetRegistryDomain_Call{Call: _e.mock.On("GetRegistryDomain")}
500}
501
502func (_c *MockConfigService_GetRegistryDomain_Call) Run(run func()) *MockConfigService_GetRegistryDomain_Call {
503	_c.Call.Run(func(args mock.Arguments) {
504		run()
505	})
506	return _c
507}
508
509func (_c *MockConfigService_GetRegistryDomain_Call) Return(s string) *MockConfigService_GetRegistryDomain_Call {
510	_c.Call.Return(s)
511	return _c
512}
513
514func (_c *MockConfigService_GetRegistryDomain_Call) RunAndReturn(run func() string) *MockConfigService_GetRegistryDomain_Call {
515	_c.Call.Return(run)
516	return _c
517}
518
519// GetRegistryPort provides a mock function for the type MockConfigService
520func (_mock *MockConfigService) GetRegistryPort() int {
521	ret := _mock.Called()
522
523	if len(ret) == 0 {
524		panic("no return value specified for GetRegistryPort")
525	}
526
527	var r0 int
528	if returnFunc, ok := ret.Get(0).(func() int); ok {
529		r0 = returnFunc()
530	} else {
531		r0 = ret.Get(0).(int)
532	}
533	return r0
534}
535
536// MockConfigService_GetRegistryPort_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRegistryPort'
537type MockConfigService_GetRegistryPort_Call struct {
538	*mock.Call
539}
540
541// GetRegistryPort is a helper method to define mock.On call
542func (_e *MockConfigService_Expecter) GetRegistryPort() *MockConfigService_GetRegistryPort_Call {
543	return &MockConfigService_GetRegistryPort_Call{Call: _e.mock.On("GetRegistryPort")}
544}
545
546func (_c *MockConfigService_GetRegistryPort_Call) Run(run func()) *MockConfigService_GetRegistryPort_Call {
547	_c.Call.Run(func(args mock.Arguments) {
548		run()
549	})
550	return _c
551}
552
553func (_c *MockConfigService_GetRegistryPort_Call) Return(n int) *MockConfigService_GetRegistryPort_Call {
554	_c.Call.Return(n)
555	return _c
556}
557
558func (_c *MockConfigService_GetRegistryPort_Call) RunAndReturn(run func() int) *MockConfigService_GetRegistryPort_Call {
559	_c.Call.Return(run)
560	return _c
561}
562
563// GetRoute provides a mock function for the type MockConfigService
564func (_mock *MockConfigService) GetRoute(ctx context.Context, domain1 string) (*domain.Route, error) {
565	ret := _mock.Called(ctx, domain1)
566
567	if len(ret) == 0 {
568		panic("no return value specified for GetRoute")
569	}
570
571	var r0 *domain.Route
572	var r1 error
573	if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*domain.Route, error)); ok {
574		return returnFunc(ctx, domain1)
575	}
576	if returnFunc, ok := ret.Get(0).(func(context.Context, string) *domain.Route); ok {
577		r0 = returnFunc(ctx, domain1)
578	} else {
579		if ret.Get(0) != nil {
580			r0 = ret.Get(0).(*domain.Route)
581		}
582	}
583	if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
584		r1 = returnFunc(ctx, domain1)
585	} else {
586		r1 = ret.Error(1)
587	}
588	return r0, r1
589}
590
591// MockConfigService_GetRoute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRoute'
592type MockConfigService_GetRoute_Call struct {
593	*mock.Call
594}
595
596// GetRoute is a helper method to define mock.On call
597//   - ctx context.Context
598//   - domain1 string
599func (_e *MockConfigService_Expecter) GetRoute(ctx interface{}, domain1 interface{}) *MockConfigService_GetRoute_Call {
600	return &MockConfigService_GetRoute_Call{Call: _e.mock.On("GetRoute", ctx, domain1)}
601}
602
603func (_c *MockConfigService_GetRoute_Call) Run(run func(ctx context.Context, domain1 string)) *MockConfigService_GetRoute_Call {
604	_c.Call.Run(func(args mock.Arguments) {
605		var arg0 context.Context
606		if args[0] != nil {
607			arg0 = args[0].(context.Context)
608		}
609		var arg1 string
610		if args[1] != nil {
611			arg1 = args[1].(string)
612		}
613		run(
614			arg0,
615			arg1,
616		)
617	})
618	return _c
619}
620
621func (_c *MockConfigService_GetRoute_Call) Return(route *domain.Route, err error) *MockConfigService_GetRoute_Call {
622	_c.Call.Return(route, err)
623	return _c
624}
625
626func (_c *MockConfigService_GetRoute_Call) RunAndReturn(run func(ctx context.Context, domain1 string) (*domain.Route, error)) *MockConfigService_GetRoute_Call {
627	_c.Call.Return(run)
628	return _c
629}
630
631// GetRoutes provides a mock function for the type MockConfigService
632func (_mock *MockConfigService) GetRoutes(ctx context.Context) []domain.Route {
633	ret := _mock.Called(ctx)
634
635	if len(ret) == 0 {
636		panic("no return value specified for GetRoutes")
637	}
638
639	var r0 []domain.Route
640	if returnFunc, ok := ret.Get(0).(func(context.Context) []domain.Route); ok {
641		r0 = returnFunc(ctx)
642	} else {
643		if ret.Get(0) != nil {
644			r0 = ret.Get(0).([]domain.Route)
645		}
646	}
647	return r0
648}
649
650// MockConfigService_GetRoutes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRoutes'
651type MockConfigService_GetRoutes_Call struct {
652	*mock.Call
653}
654
655// GetRoutes is a helper method to define mock.On call
656//   - ctx context.Context
657func (_e *MockConfigService_Expecter) GetRoutes(ctx interface{}) *MockConfigService_GetRoutes_Call {
658	return &MockConfigService_GetRoutes_Call{Call: _e.mock.On("GetRoutes", ctx)}
659}
660
661func (_c *MockConfigService_GetRoutes_Call) Run(run func(ctx context.Context)) *MockConfigService_GetRoutes_Call {
662	_c.Call.Run(func(args mock.Arguments) {
663		var arg0 context.Context
664		if args[0] != nil {
665			arg0 = args[0].(context.Context)
666		}
667		run(
668			arg0,
669		)
670	})
671	return _c
672}
673
674func (_c *MockConfigService_GetRoutes_Call) Return(routes []domain.Route) *MockConfigService_GetRoutes_Call {
675	_c.Call.Return(routes)
676	return _c
677}
678
679func (_c *MockConfigService_GetRoutes_Call) RunAndReturn(run func(ctx context.Context) []domain.Route) *MockConfigService_GetRoutes_Call {
680	_c.Call.Return(run)
681	return _c
682}
683
684// GetServerPort provides a mock function for the type MockConfigService
685func (_mock *MockConfigService) GetServerPort() int {
686	ret := _mock.Called()
687
688	if len(ret) == 0 {
689		panic("no return value specified for GetServerPort")
690	}
691
692	var r0 int
693	if returnFunc, ok := ret.Get(0).(func() int); ok {
694		r0 = returnFunc()
695	} else {
696		r0 = ret.Get(0).(int)
697	}
698	return r0
699}
700
701// MockConfigService_GetServerPort_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetServerPort'
702type MockConfigService_GetServerPort_Call struct {
703	*mock.Call
704}
705
706// GetServerPort is a helper method to define mock.On call
707func (_e *MockConfigService_Expecter) GetServerPort() *MockConfigService_GetServerPort_Call {
708	return &MockConfigService_GetServerPort_Call{Call: _e.mock.On("GetServerPort")}
709}
710
711func (_c *MockConfigService_GetServerPort_Call) Run(run func()) *MockConfigService_GetServerPort_Call {
712	_c.Call.Run(func(args mock.Arguments) {
713		run()
714	})
715	return _c
716}
717
718func (_c *MockConfigService_GetServerPort_Call) Return(n int) *MockConfigService_GetServerPort_Call {
719	_c.Call.Return(n)
720	return _c
721}
722
723func (_c *MockConfigService_GetServerPort_Call) RunAndReturn(run func() int) *MockConfigService_GetServerPort_Call {
724	_c.Call.Return(run)
725	return _c
726}
727
728// IsAutoRouteEnabled provides a mock function for the type MockConfigService
729func (_mock *MockConfigService) IsAutoRouteEnabled() bool {
730	ret := _mock.Called()
731
732	if len(ret) == 0 {
733		panic("no return value specified for IsAutoRouteEnabled")
734	}
735
736	var r0 bool
737	if returnFunc, ok := ret.Get(0).(func() bool); ok {
738		r0 = returnFunc()
739	} else {
740		r0 = ret.Get(0).(bool)
741	}
742	return r0
743}
744
745// MockConfigService_IsAutoRouteEnabled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsAutoRouteEnabled'
746type MockConfigService_IsAutoRouteEnabled_Call struct {
747	*mock.Call
748}
749
750// IsAutoRouteEnabled is a helper method to define mock.On call
751func (_e *MockConfigService_Expecter) IsAutoRouteEnabled() *MockConfigService_IsAutoRouteEnabled_Call {
752	return &MockConfigService_IsAutoRouteEnabled_Call{Call: _e.mock.On("IsAutoRouteEnabled")}
753}
754
755func (_c *MockConfigService_IsAutoRouteEnabled_Call) Run(run func()) *MockConfigService_IsAutoRouteEnabled_Call {
756	_c.Call.Run(func(args mock.Arguments) {
757		run()
758	})
759	return _c
760}
761
762func (_c *MockConfigService_IsAutoRouteEnabled_Call) Return(b bool) *MockConfigService_IsAutoRouteEnabled_Call {
763	_c.Call.Return(b)
764	return _c
765}
766
767func (_c *MockConfigService_IsAutoRouteEnabled_Call) RunAndReturn(run func() bool) *MockConfigService_IsAutoRouteEnabled_Call {
768	_c.Call.Return(run)
769	return _c
770}
771
772// IsNetworkIsolationEnabled provides a mock function for the type MockConfigService
773func (_mock *MockConfigService) IsNetworkIsolationEnabled() bool {
774	ret := _mock.Called()
775
776	if len(ret) == 0 {
777		panic("no return value specified for IsNetworkIsolationEnabled")
778	}
779
780	var r0 bool
781	if returnFunc, ok := ret.Get(0).(func() bool); ok {
782		r0 = returnFunc()
783	} else {
784		r0 = ret.Get(0).(bool)
785	}
786	return r0
787}
788
789// MockConfigService_IsNetworkIsolationEnabled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsNetworkIsolationEnabled'
790type MockConfigService_IsNetworkIsolationEnabled_Call struct {
791	*mock.Call
792}
793
794// IsNetworkIsolationEnabled is a helper method to define mock.On call
795func (_e *MockConfigService_Expecter) IsNetworkIsolationEnabled() *MockConfigService_IsNetworkIsolationEnabled_Call {
796	return &MockConfigService_IsNetworkIsolationEnabled_Call{Call: _e.mock.On("IsNetworkIsolationEnabled")}
797}
798
799func (_c *MockConfigService_IsNetworkIsolationEnabled_Call) Run(run func()) *MockConfigService_IsNetworkIsolationEnabled_Call {
800	_c.Call.Run(func(args mock.Arguments) {
801		run()
802	})
803	return _c
804}
805
806func (_c *MockConfigService_IsNetworkIsolationEnabled_Call) Return(b bool) *MockConfigService_IsNetworkIsolationEnabled_Call {
807	_c.Call.Return(b)
808	return _c
809}
810
811func (_c *MockConfigService_IsNetworkIsolationEnabled_Call) RunAndReturn(run func() bool) *MockConfigService_IsNetworkIsolationEnabled_Call {
812	_c.Call.Return(run)
813	return _c
814}
815
816// Load provides a mock function for the type MockConfigService
817func (_mock *MockConfigService) Load(ctx context.Context) error {
818	ret := _mock.Called(ctx)
819
820	if len(ret) == 0 {
821		panic("no return value specified for Load")
822	}
823
824	var r0 error
825	if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
826		r0 = returnFunc(ctx)
827	} else {
828		r0 = ret.Error(0)
829	}
830	return r0
831}
832
833// MockConfigService_Load_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Load'
834type MockConfigService_Load_Call struct {
835	*mock.Call
836}
837
838// Load is a helper method to define mock.On call
839//   - ctx context.Context
840func (_e *MockConfigService_Expecter) Load(ctx interface{}) *MockConfigService_Load_Call {
841	return &MockConfigService_Load_Call{Call: _e.mock.On("Load", ctx)}
842}
843
844func (_c *MockConfigService_Load_Call) Run(run func(ctx context.Context)) *MockConfigService_Load_Call {
845	_c.Call.Run(func(args mock.Arguments) {
846		var arg0 context.Context
847		if args[0] != nil {
848			arg0 = args[0].(context.Context)
849		}
850		run(
851			arg0,
852		)
853	})
854	return _c
855}
856
857func (_c *MockConfigService_Load_Call) Return(err error) *MockConfigService_Load_Call {
858	_c.Call.Return(err)
859	return _c
860}
861
862func (_c *MockConfigService_Load_Call) RunAndReturn(run func(ctx context.Context) error) *MockConfigService_Load_Call {
863	_c.Call.Return(run)
864	return _c
865}
866
867// Reload provides a mock function for the type MockConfigService
868func (_mock *MockConfigService) Reload(ctx context.Context) error {
869	ret := _mock.Called(ctx)
870
871	if len(ret) == 0 {
872		panic("no return value specified for Reload")
873	}
874
875	var r0 error
876	if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
877		r0 = returnFunc(ctx)
878	} else {
879		r0 = ret.Error(0)
880	}
881	return r0
882}
883
884// MockConfigService_Reload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Reload'
885type MockConfigService_Reload_Call struct {
886	*mock.Call
887}
888
889// Reload is a helper method to define mock.On call
890//   - ctx context.Context
891func (_e *MockConfigService_Expecter) Reload(ctx interface{}) *MockConfigService_Reload_Call {
892	return &MockConfigService_Reload_Call{Call: _e.mock.On("Reload", ctx)}
893}
894
895func (_c *MockConfigService_Reload_Call) Run(run func(ctx context.Context)) *MockConfigService_Reload_Call {
896	_c.Call.Run(func(args mock.Arguments) {
897		var arg0 context.Context
898		if args[0] != nil {
899			arg0 = args[0].(context.Context)
900		}
901		run(
902			arg0,
903		)
904	})
905	return _c
906}
907
908func (_c *MockConfigService_Reload_Call) Return(err error) *MockConfigService_Reload_Call {
909	_c.Call.Return(err)
910	return _c
911}
912
913func (_c *MockConfigService_Reload_Call) RunAndReturn(run func(ctx context.Context) error) *MockConfigService_Reload_Call {
914	_c.Call.Return(run)
915	return _c
916}
917
918// RemoveAttachment provides a mock function for the type MockConfigService
919func (_mock *MockConfigService) RemoveAttachment(ctx context.Context, domainOrGroup string, image string) error {
920	ret := _mock.Called(ctx, domainOrGroup, image)
921
922	if len(ret) == 0 {
923		panic("no return value specified for RemoveAttachment")
924	}
925
926	var r0 error
927	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
928		r0 = returnFunc(ctx, domainOrGroup, image)
929	} else {
930		r0 = ret.Error(0)
931	}
932	return r0
933}
934
935// MockConfigService_RemoveAttachment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveAttachment'
936type MockConfigService_RemoveAttachment_Call struct {
937	*mock.Call
938}
939
940// RemoveAttachment is a helper method to define mock.On call
941//   - ctx context.Context
942//   - domainOrGroup string
943//   - image string
944func (_e *MockConfigService_Expecter) RemoveAttachment(ctx interface{}, domainOrGroup interface{}, image interface{}) *MockConfigService_RemoveAttachment_Call {
945	return &MockConfigService_RemoveAttachment_Call{Call: _e.mock.On("RemoveAttachment", ctx, domainOrGroup, image)}
946}
947
948func (_c *MockConfigService_RemoveAttachment_Call) Run(run func(ctx context.Context, domainOrGroup string, image string)) *MockConfigService_RemoveAttachment_Call {
949	_c.Call.Run(func(args mock.Arguments) {
950		var arg0 context.Context
951		if args[0] != nil {
952			arg0 = args[0].(context.Context)
953		}
954		var arg1 string
955		if args[1] != nil {
956			arg1 = args[1].(string)
957		}
958		var arg2 string
959		if args[2] != nil {
960			arg2 = args[2].(string)
961		}
962		run(
963			arg0,
964			arg1,
965			arg2,
966		)
967	})
968	return _c
969}
970
971func (_c *MockConfigService_RemoveAttachment_Call) Return(err error) *MockConfigService_RemoveAttachment_Call {
972	_c.Call.Return(err)
973	return _c
974}
975
976func (_c *MockConfigService_RemoveAttachment_Call) RunAndReturn(run func(ctx context.Context, domainOrGroup string, image string) error) *MockConfigService_RemoveAttachment_Call {
977	_c.Call.Return(run)
978	return _c
979}
980
981// RemoveRoute provides a mock function for the type MockConfigService
982func (_mock *MockConfigService) RemoveRoute(ctx context.Context, domain1 string) error {
983	ret := _mock.Called(ctx, domain1)
984
985	if len(ret) == 0 {
986		panic("no return value specified for RemoveRoute")
987	}
988
989	var r0 error
990	if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
991		r0 = returnFunc(ctx, domain1)
992	} else {
993		r0 = ret.Error(0)
994	}
995	return r0
996}
997
998// MockConfigService_RemoveRoute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveRoute'
999type MockConfigService_RemoveRoute_Call struct {
1000	*mock.Call
1001}
1002
1003// RemoveRoute is a helper method to define mock.On call
1004//   - ctx context.Context
1005//   - domain1 string
1006func (_e *MockConfigService_Expecter) RemoveRoute(ctx interface{}, domain1 interface{}) *MockConfigService_RemoveRoute_Call {
1007	return &MockConfigService_RemoveRoute_Call{Call: _e.mock.On("RemoveRoute", ctx, domain1)}
1008}
1009
1010func (_c *MockConfigService_RemoveRoute_Call) Run(run func(ctx context.Context, domain1 string)) *MockConfigService_RemoveRoute_Call {
1011	_c.Call.Run(func(args mock.Arguments) {
1012		var arg0 context.Context
1013		if args[0] != nil {
1014			arg0 = args[0].(context.Context)
1015		}
1016		var arg1 string
1017		if args[1] != nil {
1018			arg1 = args[1].(string)
1019		}
1020		run(
1021			arg0,
1022			arg1,
1023		)
1024	})
1025	return _c
1026}
1027
1028func (_c *MockConfigService_RemoveRoute_Call) Return(err error) *MockConfigService_RemoveRoute_Call {
1029	_c.Call.Return(err)
1030	return _c
1031}
1032
1033func (_c *MockConfigService_RemoveRoute_Call) RunAndReturn(run func(ctx context.Context, domain1 string) error) *MockConfigService_RemoveRoute_Call {
1034	_c.Call.Return(run)
1035	return _c
1036}
1037
1038// Save provides a mock function for the type MockConfigService
1039func (_mock *MockConfigService) Save(ctx context.Context) error {
1040	ret := _mock.Called(ctx)
1041
1042	if len(ret) == 0 {
1043		panic("no return value specified for Save")
1044	}
1045
1046	var r0 error
1047	if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
1048		r0 = returnFunc(ctx)
1049	} else {
1050		r0 = ret.Error(0)
1051	}
1052	return r0
1053}
1054
1055// MockConfigService_Save_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Save'
1056type MockConfigService_Save_Call struct {
1057	*mock.Call
1058}
1059
1060// Save is a helper method to define mock.On call
1061//   - ctx context.Context
1062func (_e *MockConfigService_Expecter) Save(ctx interface{}) *MockConfigService_Save_Call {
1063	return &MockConfigService_Save_Call{Call: _e.mock.On("Save", ctx)}
1064}
1065
1066func (_c *MockConfigService_Save_Call) Run(run func(ctx context.Context)) *MockConfigService_Save_Call {
1067	_c.Call.Run(func(args mock.Arguments) {
1068		var arg0 context.Context
1069		if args[0] != nil {
1070			arg0 = args[0].(context.Context)
1071		}
1072		run(
1073			arg0,
1074		)
1075	})
1076	return _c
1077}
1078
1079func (_c *MockConfigService_Save_Call) Return(err error) *MockConfigService_Save_Call {
1080	_c.Call.Return(err)
1081	return _c
1082}
1083
1084func (_c *MockConfigService_Save_Call) RunAndReturn(run func(ctx context.Context) error) *MockConfigService_Save_Call {
1085	_c.Call.Return(run)
1086	return _c
1087}
1088
1089// UpdateRoute provides a mock function for the type MockConfigService
1090func (_mock *MockConfigService) UpdateRoute(ctx context.Context, route domain.Route) error {
1091	ret := _mock.Called(ctx, route)
1092
1093	if len(ret) == 0 {
1094		panic("no return value specified for UpdateRoute")
1095	}
1096
1097	var r0 error
1098	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Route) error); ok {
1099		r0 = returnFunc(ctx, route)
1100	} else {
1101		r0 = ret.Error(0)
1102	}
1103	return r0
1104}
1105
1106// MockConfigService_UpdateRoute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateRoute'
1107type MockConfigService_UpdateRoute_Call struct {
1108	*mock.Call
1109}
1110
1111// UpdateRoute is a helper method to define mock.On call
1112//   - ctx context.Context
1113//   - route domain.Route
1114func (_e *MockConfigService_Expecter) UpdateRoute(ctx interface{}, route interface{}) *MockConfigService_UpdateRoute_Call {
1115	return &MockConfigService_UpdateRoute_Call{Call: _e.mock.On("UpdateRoute", ctx, route)}
1116}
1117
1118func (_c *MockConfigService_UpdateRoute_Call) Run(run func(ctx context.Context, route domain.Route)) *MockConfigService_UpdateRoute_Call {
1119	_c.Call.Run(func(args mock.Arguments) {
1120		var arg0 context.Context
1121		if args[0] != nil {
1122			arg0 = args[0].(context.Context)
1123		}
1124		var arg1 domain.Route
1125		if args[1] != nil {
1126			arg1 = args[1].(domain.Route)
1127		}
1128		run(
1129			arg0,
1130			arg1,
1131		)
1132	})
1133	return _c
1134}
1135
1136func (_c *MockConfigService_UpdateRoute_Call) Return(err error) *MockConfigService_UpdateRoute_Call {
1137	_c.Call.Return(err)
1138	return _c
1139}
1140
1141func (_c *MockConfigService_UpdateRoute_Call) RunAndReturn(run func(ctx context.Context, route domain.Route) error) *MockConfigService_UpdateRoute_Call {
1142	_c.Call.Return(run)
1143	return _c
1144}
1145
1146// Watch provides a mock function for the type MockConfigService
1147func (_mock *MockConfigService) Watch(ctx context.Context, onChange func()) error {
1148	ret := _mock.Called(ctx, onChange)
1149
1150	if len(ret) == 0 {
1151		panic("no return value specified for Watch")
1152	}
1153
1154	var r0 error
1155	if returnFunc, ok := ret.Get(0).(func(context.Context, func()) error); ok {
1156		r0 = returnFunc(ctx, onChange)
1157	} else {
1158		r0 = ret.Error(0)
1159	}
1160	return r0
1161}
1162
1163// MockConfigService_Watch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Watch'
1164type MockConfigService_Watch_Call struct {
1165	*mock.Call
1166}
1167
1168// Watch is a helper method to define mock.On call
1169//   - ctx context.Context
1170//   - onChange func()
1171func (_e *MockConfigService_Expecter) Watch(ctx interface{}, onChange interface{}) *MockConfigService_Watch_Call {
1172	return &MockConfigService_Watch_Call{Call: _e.mock.On("Watch", ctx, onChange)}
1173}
1174
1175func (_c *MockConfigService_Watch_Call) Run(run func(ctx context.Context, onChange func())) *MockConfigService_Watch_Call {
1176	_c.Call.Run(func(args mock.Arguments) {
1177		var arg0 context.Context
1178		if args[0] != nil {
1179			arg0 = args[0].(context.Context)
1180		}
1181		var arg1 func()
1182		if args[1] != nil {
1183			arg1 = args[1].(func())
1184		}
1185		run(
1186			arg0,
1187			arg1,
1188		)
1189	})
1190	return _c
1191}
1192
1193func (_c *MockConfigService_Watch_Call) Return(err error) *MockConfigService_Watch_Call {
1194	_c.Call.Return(err)
1195	return _c
1196}
1197
1198func (_c *MockConfigService_Watch_Call) RunAndReturn(run func(ctx context.Context, onChange func()) error) *MockConfigService_Watch_Call {
1199	_c.Call.Return(run)
1200	return _c
1201}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 7

Tags 106

↑↓ moveenter openesc close