v3.4.1 de8f68e

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	mock "github.com/stretchr/testify/mock"
11)
12
13// 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.
14// The first argument is typically a *testing.T value.
15func NewMockConfigService(t interface {
16	mock.TestingT
17	Cleanup(func())
18}) *MockConfigService {
19	if helper, ok := t.(interface{ Helper() }); ok {
20		helper.Helper()
21	}
22
23	mock := &MockConfigService{}
24	mock.Mock.Test(t)
25
26	t.Cleanup(func() {
27		if helper, ok := t.(interface{ Helper() }); ok {
28			helper.Helper()
29		}
30		mock.AssertExpectations(t)
31	})
32
33	return mock
34}
35
36// MockConfigService is an autogenerated mock type for the ConfigService type
37type MockConfigService struct {
38	mock.Mock
39}
40
41type MockConfigService_Expecter struct {
42	mock *mock.Mock
43}
44
45func (_m *MockConfigService) EXPECT() *MockConfigService_Expecter {
46	return &MockConfigService_Expecter{mock: &_m.Mock}
47}
48
49// GetDataDir provides a mock function for the type MockConfigService
50func (_mock *MockConfigService) GetDataDir() string {
51	ret := _mock.Called()
52
53	if len(ret) == 0 {
54		panic("no return value specified for GetDataDir")
55	}
56
57	var r0 string
58	if returnFunc, ok := ret.Get(0).(func() string); ok {
59		r0 = returnFunc()
60	} else {
61		r0 = ret.Get(0).(string)
62	}
63	return r0
64}
65
66// MockConfigService_GetDataDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDataDir'
67type MockConfigService_GetDataDir_Call struct {
68	*mock.Call
69}
70
71// GetDataDir is a helper method to define mock.On call
72func (_e *MockConfigService_Expecter) GetDataDir() *MockConfigService_GetDataDir_Call {
73	return &MockConfigService_GetDataDir_Call{Call: _e.mock.On("GetDataDir")}
74}
75
76func (_c *MockConfigService_GetDataDir_Call) Run(run func()) *MockConfigService_GetDataDir_Call {
77	_c.Call.Run(func(args mock.Arguments) {
78		run()
79	})
80	return _c
81}
82
83func (_c *MockConfigService_GetDataDir_Call) Return(s string) *MockConfigService_GetDataDir_Call {
84	_c.Call.Return(s)
85	return _c
86}
87
88func (_c *MockConfigService_GetDataDir_Call) RunAndReturn(run func() string) *MockConfigService_GetDataDir_Call {
89	_c.Call.Return(run)
90	return _c
91}
92
93// GetExternalRoutes provides a mock function for the type MockConfigService
94func (_mock *MockConfigService) GetExternalRoutes() map[string]string {
95	ret := _mock.Called()
96
97	if len(ret) == 0 {
98		panic("no return value specified for GetExternalRoutes")
99	}
100
101	var r0 map[string]string
102	if returnFunc, ok := ret.Get(0).(func() map[string]string); ok {
103		r0 = returnFunc()
104	} else {
105		if ret.Get(0) != nil {
106			r0 = ret.Get(0).(map[string]string)
107		}
108	}
109	return r0
110}
111
112// MockConfigService_GetExternalRoutes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetExternalRoutes'
113type MockConfigService_GetExternalRoutes_Call struct {
114	*mock.Call
115}
116
117// GetExternalRoutes is a helper method to define mock.On call
118func (_e *MockConfigService_Expecter) GetExternalRoutes() *MockConfigService_GetExternalRoutes_Call {
119	return &MockConfigService_GetExternalRoutes_Call{Call: _e.mock.On("GetExternalRoutes")}
120}
121
122func (_c *MockConfigService_GetExternalRoutes_Call) Run(run func()) *MockConfigService_GetExternalRoutes_Call {
123	_c.Call.Run(func(args mock.Arguments) {
124		run()
125	})
126	return _c
127}
128
129func (_c *MockConfigService_GetExternalRoutes_Call) Return(stringToString map[string]string) *MockConfigService_GetExternalRoutes_Call {
130	_c.Call.Return(stringToString)
131	return _c
132}
133
134func (_c *MockConfigService_GetExternalRoutes_Call) RunAndReturn(run func() map[string]string) *MockConfigService_GetExternalRoutes_Call {
135	_c.Call.Return(run)
136	return _c
137}
138
139// GetNetworkPrefix provides a mock function for the type MockConfigService
140func (_mock *MockConfigService) GetNetworkPrefix() string {
141	ret := _mock.Called()
142
143	if len(ret) == 0 {
144		panic("no return value specified for GetNetworkPrefix")
145	}
146
147	var r0 string
148	if returnFunc, ok := ret.Get(0).(func() string); ok {
149		r0 = returnFunc()
150	} else {
151		r0 = ret.Get(0).(string)
152	}
153	return r0
154}
155
156// MockConfigService_GetNetworkPrefix_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNetworkPrefix'
157type MockConfigService_GetNetworkPrefix_Call struct {
158	*mock.Call
159}
160
161// GetNetworkPrefix is a helper method to define mock.On call
162func (_e *MockConfigService_Expecter) GetNetworkPrefix() *MockConfigService_GetNetworkPrefix_Call {
163	return &MockConfigService_GetNetworkPrefix_Call{Call: _e.mock.On("GetNetworkPrefix")}
164}
165
166func (_c *MockConfigService_GetNetworkPrefix_Call) Run(run func()) *MockConfigService_GetNetworkPrefix_Call {
167	_c.Call.Run(func(args mock.Arguments) {
168		run()
169	})
170	return _c
171}
172
173func (_c *MockConfigService_GetNetworkPrefix_Call) Return(s string) *MockConfigService_GetNetworkPrefix_Call {
174	_c.Call.Return(s)
175	return _c
176}
177
178func (_c *MockConfigService_GetNetworkPrefix_Call) RunAndReturn(run func() string) *MockConfigService_GetNetworkPrefix_Call {
179	_c.Call.Return(run)
180	return _c
181}
182
183// GetRegistryDomain provides a mock function for the type MockConfigService
184func (_mock *MockConfigService) GetRegistryDomain() string {
185	ret := _mock.Called()
186
187	if len(ret) == 0 {
188		panic("no return value specified for GetRegistryDomain")
189	}
190
191	var r0 string
192	if returnFunc, ok := ret.Get(0).(func() string); ok {
193		r0 = returnFunc()
194	} else {
195		r0 = ret.Get(0).(string)
196	}
197	return r0
198}
199
200// MockConfigService_GetRegistryDomain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRegistryDomain'
201type MockConfigService_GetRegistryDomain_Call struct {
202	*mock.Call
203}
204
205// GetRegistryDomain is a helper method to define mock.On call
206func (_e *MockConfigService_Expecter) GetRegistryDomain() *MockConfigService_GetRegistryDomain_Call {
207	return &MockConfigService_GetRegistryDomain_Call{Call: _e.mock.On("GetRegistryDomain")}
208}
209
210func (_c *MockConfigService_GetRegistryDomain_Call) Run(run func()) *MockConfigService_GetRegistryDomain_Call {
211	_c.Call.Run(func(args mock.Arguments) {
212		run()
213	})
214	return _c
215}
216
217func (_c *MockConfigService_GetRegistryDomain_Call) Return(s string) *MockConfigService_GetRegistryDomain_Call {
218	_c.Call.Return(s)
219	return _c
220}
221
222func (_c *MockConfigService_GetRegistryDomain_Call) RunAndReturn(run func() string) *MockConfigService_GetRegistryDomain_Call {
223	_c.Call.Return(run)
224	return _c
225}
226
227// GetRegistryPort provides a mock function for the type MockConfigService
228func (_mock *MockConfigService) GetRegistryPort() int {
229	ret := _mock.Called()
230
231	if len(ret) == 0 {
232		panic("no return value specified for GetRegistryPort")
233	}
234
235	var r0 int
236	if returnFunc, ok := ret.Get(0).(func() int); ok {
237		r0 = returnFunc()
238	} else {
239		r0 = ret.Get(0).(int)
240	}
241	return r0
242}
243
244// MockConfigService_GetRegistryPort_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRegistryPort'
245type MockConfigService_GetRegistryPort_Call struct {
246	*mock.Call
247}
248
249// GetRegistryPort is a helper method to define mock.On call
250func (_e *MockConfigService_Expecter) GetRegistryPort() *MockConfigService_GetRegistryPort_Call {
251	return &MockConfigService_GetRegistryPort_Call{Call: _e.mock.On("GetRegistryPort")}
252}
253
254func (_c *MockConfigService_GetRegistryPort_Call) Run(run func()) *MockConfigService_GetRegistryPort_Call {
255	_c.Call.Run(func(args mock.Arguments) {
256		run()
257	})
258	return _c
259}
260
261func (_c *MockConfigService_GetRegistryPort_Call) Return(n int) *MockConfigService_GetRegistryPort_Call {
262	_c.Call.Return(n)
263	return _c
264}
265
266func (_c *MockConfigService_GetRegistryPort_Call) RunAndReturn(run func() int) *MockConfigService_GetRegistryPort_Call {
267	_c.Call.Return(run)
268	return _c
269}
270
271// GetServerPort provides a mock function for the type MockConfigService
272func (_mock *MockConfigService) GetServerPort() int {
273	ret := _mock.Called()
274
275	if len(ret) == 0 {
276		panic("no return value specified for GetServerPort")
277	}
278
279	var r0 int
280	if returnFunc, ok := ret.Get(0).(func() int); ok {
281		r0 = returnFunc()
282	} else {
283		r0 = ret.Get(0).(int)
284	}
285	return r0
286}
287
288// MockConfigService_GetServerPort_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetServerPort'
289type MockConfigService_GetServerPort_Call struct {
290	*mock.Call
291}
292
293// GetServerPort is a helper method to define mock.On call
294func (_e *MockConfigService_Expecter) GetServerPort() *MockConfigService_GetServerPort_Call {
295	return &MockConfigService_GetServerPort_Call{Call: _e.mock.On("GetServerPort")}
296}
297
298func (_c *MockConfigService_GetServerPort_Call) Run(run func()) *MockConfigService_GetServerPort_Call {
299	_c.Call.Run(func(args mock.Arguments) {
300		run()
301	})
302	return _c
303}
304
305func (_c *MockConfigService_GetServerPort_Call) Return(n int) *MockConfigService_GetServerPort_Call {
306	_c.Call.Return(n)
307	return _c
308}
309
310func (_c *MockConfigService_GetServerPort_Call) RunAndReturn(run func() int) *MockConfigService_GetServerPort_Call {
311	_c.Call.Return(run)
312	return _c
313}
314
315// IsNetworkIsolationEnabled provides a mock function for the type MockConfigService
316func (_mock *MockConfigService) IsNetworkIsolationEnabled() bool {
317	ret := _mock.Called()
318
319	if len(ret) == 0 {
320		panic("no return value specified for IsNetworkIsolationEnabled")
321	}
322
323	var r0 bool
324	if returnFunc, ok := ret.Get(0).(func() bool); ok {
325		r0 = returnFunc()
326	} else {
327		r0 = ret.Get(0).(bool)
328	}
329	return r0
330}
331
332// MockConfigService_IsNetworkIsolationEnabled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsNetworkIsolationEnabled'
333type MockConfigService_IsNetworkIsolationEnabled_Call struct {
334	*mock.Call
335}
336
337// IsNetworkIsolationEnabled is a helper method to define mock.On call
338func (_e *MockConfigService_Expecter) IsNetworkIsolationEnabled() *MockConfigService_IsNetworkIsolationEnabled_Call {
339	return &MockConfigService_IsNetworkIsolationEnabled_Call{Call: _e.mock.On("IsNetworkIsolationEnabled")}
340}
341
342func (_c *MockConfigService_IsNetworkIsolationEnabled_Call) Run(run func()) *MockConfigService_IsNetworkIsolationEnabled_Call {
343	_c.Call.Run(func(args mock.Arguments) {
344		run()
345	})
346	return _c
347}
348
349func (_c *MockConfigService_IsNetworkIsolationEnabled_Call) Return(b bool) *MockConfigService_IsNetworkIsolationEnabled_Call {
350	_c.Call.Return(b)
351	return _c
352}
353
354func (_c *MockConfigService_IsNetworkIsolationEnabled_Call) RunAndReturn(run func() bool) *MockConfigService_IsNetworkIsolationEnabled_Call {
355	_c.Call.Return(run)
356	return _c
357}
358
359// Load provides a mock function for the type MockConfigService
360func (_mock *MockConfigService) Load(ctx context.Context) error {
361	ret := _mock.Called(ctx)
362
363	if len(ret) == 0 {
364		panic("no return value specified for Load")
365	}
366
367	var r0 error
368	if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
369		r0 = returnFunc(ctx)
370	} else {
371		r0 = ret.Error(0)
372	}
373	return r0
374}
375
376// MockConfigService_Load_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Load'
377type MockConfigService_Load_Call struct {
378	*mock.Call
379}
380
381// Load is a helper method to define mock.On call
382//   - ctx context.Context
383func (_e *MockConfigService_Expecter) Load(ctx any) *MockConfigService_Load_Call {
384	return &MockConfigService_Load_Call{Call: _e.mock.On("Load", ctx)}
385}
386
387func (_c *MockConfigService_Load_Call) Run(run func(ctx context.Context)) *MockConfigService_Load_Call {
388	_c.Call.Run(func(args mock.Arguments) {
389		var arg0 context.Context
390		if args[0] != nil {
391			arg0 = args[0].(context.Context)
392		}
393		run(
394			arg0,
395		)
396	})
397	return _c
398}
399
400func (_c *MockConfigService_Load_Call) Return(err error) *MockConfigService_Load_Call {
401	_c.Call.Return(err)
402	return _c
403}
404
405func (_c *MockConfigService_Load_Call) RunAndReturn(run func(ctx context.Context) error) *MockConfigService_Load_Call {
406	_c.Call.Return(run)
407	return _c
408}
409
410// Reload provides a mock function for the type MockConfigService
411func (_mock *MockConfigService) Reload(ctx context.Context) error {
412	ret := _mock.Called(ctx)
413
414	if len(ret) == 0 {
415		panic("no return value specified for Reload")
416	}
417
418	var r0 error
419	if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
420		r0 = returnFunc(ctx)
421	} else {
422		r0 = ret.Error(0)
423	}
424	return r0
425}
426
427// MockConfigService_Reload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Reload'
428type MockConfigService_Reload_Call struct {
429	*mock.Call
430}
431
432// Reload is a helper method to define mock.On call
433//   - ctx context.Context
434func (_e *MockConfigService_Expecter) Reload(ctx any) *MockConfigService_Reload_Call {
435	return &MockConfigService_Reload_Call{Call: _e.mock.On("Reload", ctx)}
436}
437
438func (_c *MockConfigService_Reload_Call) Run(run func(ctx context.Context)) *MockConfigService_Reload_Call {
439	_c.Call.Run(func(args mock.Arguments) {
440		var arg0 context.Context
441		if args[0] != nil {
442			arg0 = args[0].(context.Context)
443		}
444		run(
445			arg0,
446		)
447	})
448	return _c
449}
450
451func (_c *MockConfigService_Reload_Call) Return(err error) *MockConfigService_Reload_Call {
452	_c.Call.Return(err)
453	return _c
454}
455
456func (_c *MockConfigService_Reload_Call) RunAndReturn(run func(ctx context.Context) error) *MockConfigService_Reload_Call {
457	_c.Call.Return(run)
458	return _c
459}
460
461// Watch provides a mock function for the type MockConfigService
462func (_mock *MockConfigService) Watch(ctx context.Context, onChange func()) error {
463	ret := _mock.Called(ctx, onChange)
464
465	if len(ret) == 0 {
466		panic("no return value specified for Watch")
467	}
468
469	var r0 error
470	if returnFunc, ok := ret.Get(0).(func(context.Context, func()) error); ok {
471		r0 = returnFunc(ctx, onChange)
472	} else {
473		r0 = ret.Error(0)
474	}
475	return r0
476}
477
478// MockConfigService_Watch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Watch'
479type MockConfigService_Watch_Call struct {
480	*mock.Call
481}
482
483// Watch is a helper method to define mock.On call
484//   - ctx context.Context
485//   - onChange func()
486func (_e *MockConfigService_Expecter) Watch(ctx any, onChange any) *MockConfigService_Watch_Call {
487	return &MockConfigService_Watch_Call{Call: _e.mock.On("Watch", ctx, onChange)}
488}
489
490func (_c *MockConfigService_Watch_Call) Run(run func(ctx context.Context, onChange func())) *MockConfigService_Watch_Call {
491	_c.Call.Run(func(args mock.Arguments) {
492		var arg0 context.Context
493		if args[0] != nil {
494			arg0 = args[0].(context.Context)
495		}
496		var arg1 func()
497		if args[1] != nil {
498			arg1 = args[1].(func())
499		}
500		run(
501			arg0,
502			arg1,
503		)
504	})
505	return _c
506}
507
508func (_c *MockConfigService_Watch_Call) Return(err error) *MockConfigService_Watch_Call {
509	_c.Call.Return(err)
510	return _c
511}
512
513func (_c *MockConfigService_Watch_Call) RunAndReturn(run func(ctx context.Context, onChange func()) error) *MockConfigService_Watch_Call {
514	_c.Call.Return(run)
515	return _c
516}

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