v0.30.0 c899179

MirrorService.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	"bnema.dev/ermite/internal/domain"
11	"bnema.dev/ermite/internal/ports"
12	mock "github.com/stretchr/testify/mock"
13)
14
15// NewMirrorService creates a new instance of MirrorService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
16// The first argument is typically a *testing.T value.
17func NewMirrorService(t interface {
18	mock.TestingT
19	Cleanup(func())
20}) *MirrorService {
21	if helper, ok := t.(interface{ Helper() }); ok {
22		helper.Helper()
23	}
24
25	mock := &MirrorService{}
26	mock.Mock.Test(t)
27
28	t.Cleanup(func() {
29		if helper, ok := t.(interface{ Helper() }); ok {
30			helper.Helper()
31		}
32		mock.AssertExpectations(t)
33	})
34
35	return mock
36}
37
38// MirrorService is an autogenerated mock type for the MirrorService type
39type MirrorService struct {
40	mock.Mock
41}
42
43type MirrorService_Expecter struct {
44	mock *mock.Mock
45}
46
47func (_m *MirrorService) EXPECT() *MirrorService_Expecter {
48	return &MirrorService_Expecter{mock: &_m.Mock}
49}
50
51// GetGlobalConfig provides a mock function for the type MirrorService
52func (_mock *MirrorService) GetGlobalConfig(ctx context.Context, p domain.Principal) (domain.MirrorGlobalConfig, error) {
53	ret := _mock.Called(ctx, p)
54
55	if len(ret) == 0 {
56		panic("no return value specified for GetGlobalConfig")
57	}
58
59	var r0 domain.MirrorGlobalConfig
60	var r1 error
61	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal) (domain.MirrorGlobalConfig, error)); ok {
62		return returnFunc(ctx, p)
63	}
64	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal) domain.MirrorGlobalConfig); ok {
65		r0 = returnFunc(ctx, p)
66	} else {
67		r0 = ret.Get(0).(domain.MirrorGlobalConfig)
68	}
69	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal) error); ok {
70		r1 = returnFunc(ctx, p)
71	} else {
72		r1 = ret.Error(1)
73	}
74	return r0, r1
75}
76
77// MirrorService_GetGlobalConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGlobalConfig'
78type MirrorService_GetGlobalConfig_Call struct {
79	*mock.Call
80}
81
82// GetGlobalConfig is a helper method to define mock.On call
83//   - ctx context.Context
84//   - p domain.Principal
85func (_e *MirrorService_Expecter) GetGlobalConfig(ctx any, p any) *MirrorService_GetGlobalConfig_Call {
86	return &MirrorService_GetGlobalConfig_Call{Call: _e.mock.On("GetGlobalConfig", ctx, p)}
87}
88
89func (_c *MirrorService_GetGlobalConfig_Call) Run(run func(ctx context.Context, p domain.Principal)) *MirrorService_GetGlobalConfig_Call {
90	_c.Call.Run(func(args mock.Arguments) {
91		var arg0 context.Context
92		if args[0] != nil {
93			arg0 = args[0].(context.Context)
94		}
95		var arg1 domain.Principal
96		if args[1] != nil {
97			arg1 = args[1].(domain.Principal)
98		}
99		run(
100			arg0,
101			arg1,
102		)
103	})
104	return _c
105}
106
107func (_c *MirrorService_GetGlobalConfig_Call) Return(mirrorGlobalConfig domain.MirrorGlobalConfig, err error) *MirrorService_GetGlobalConfig_Call {
108	_c.Call.Return(mirrorGlobalConfig, err)
109	return _c
110}
111
112func (_c *MirrorService_GetGlobalConfig_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal) (domain.MirrorGlobalConfig, error)) *MirrorService_GetGlobalConfig_Call {
113	_c.Call.Return(run)
114	return _c
115}
116
117// GetStatus provides a mock function for the type MirrorService
118func (_mock *MirrorService) GetStatus(ctx context.Context, p domain.Principal, repo domain.RepoName) (ports.MirrorStatusView, error) {
119	ret := _mock.Called(ctx, p, repo)
120
121	if len(ret) == 0 {
122		panic("no return value specified for GetStatus")
123	}
124
125	var r0 ports.MirrorStatusView
126	var r1 error
127	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName) (ports.MirrorStatusView, error)); ok {
128		return returnFunc(ctx, p, repo)
129	}
130	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName) ports.MirrorStatusView); ok {
131		r0 = returnFunc(ctx, p, repo)
132	} else {
133		r0 = ret.Get(0).(ports.MirrorStatusView)
134	}
135	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName) error); ok {
136		r1 = returnFunc(ctx, p, repo)
137	} else {
138		r1 = ret.Error(1)
139	}
140	return r0, r1
141}
142
143// MirrorService_GetStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStatus'
144type MirrorService_GetStatus_Call struct {
145	*mock.Call
146}
147
148// GetStatus is a helper method to define mock.On call
149//   - ctx context.Context
150//   - p domain.Principal
151//   - repo domain.RepoName
152func (_e *MirrorService_Expecter) GetStatus(ctx any, p any, repo any) *MirrorService_GetStatus_Call {
153	return &MirrorService_GetStatus_Call{Call: _e.mock.On("GetStatus", ctx, p, repo)}
154}
155
156func (_c *MirrorService_GetStatus_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName)) *MirrorService_GetStatus_Call {
157	_c.Call.Run(func(args mock.Arguments) {
158		var arg0 context.Context
159		if args[0] != nil {
160			arg0 = args[0].(context.Context)
161		}
162		var arg1 domain.Principal
163		if args[1] != nil {
164			arg1 = args[1].(domain.Principal)
165		}
166		var arg2 domain.RepoName
167		if args[2] != nil {
168			arg2 = args[2].(domain.RepoName)
169		}
170		run(
171			arg0,
172			arg1,
173			arg2,
174		)
175	})
176	return _c
177}
178
179func (_c *MirrorService_GetStatus_Call) Return(mirrorStatusView ports.MirrorStatusView, err error) *MirrorService_GetStatus_Call {
180	_c.Call.Return(mirrorStatusView, err)
181	return _c
182}
183
184func (_c *MirrorService_GetStatus_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName) (ports.MirrorStatusView, error)) *MirrorService_GetStatus_Call {
185	_c.Call.Return(run)
186	return _c
187}
188
189// ListStatus provides a mock function for the type MirrorService
190func (_mock *MirrorService) ListStatus(ctx context.Context, p domain.Principal) ([]ports.MirrorStatusView, error) {
191	ret := _mock.Called(ctx, p)
192
193	if len(ret) == 0 {
194		panic("no return value specified for ListStatus")
195	}
196
197	var r0 []ports.MirrorStatusView
198	var r1 error
199	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal) ([]ports.MirrorStatusView, error)); ok {
200		return returnFunc(ctx, p)
201	}
202	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal) []ports.MirrorStatusView); ok {
203		r0 = returnFunc(ctx, p)
204	} else {
205		if ret.Get(0) != nil {
206			r0 = ret.Get(0).([]ports.MirrorStatusView)
207		}
208	}
209	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal) error); ok {
210		r1 = returnFunc(ctx, p)
211	} else {
212		r1 = ret.Error(1)
213	}
214	return r0, r1
215}
216
217// MirrorService_ListStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListStatus'
218type MirrorService_ListStatus_Call struct {
219	*mock.Call
220}
221
222// ListStatus is a helper method to define mock.On call
223//   - ctx context.Context
224//   - p domain.Principal
225func (_e *MirrorService_Expecter) ListStatus(ctx any, p any) *MirrorService_ListStatus_Call {
226	return &MirrorService_ListStatus_Call{Call: _e.mock.On("ListStatus", ctx, p)}
227}
228
229func (_c *MirrorService_ListStatus_Call) Run(run func(ctx context.Context, p domain.Principal)) *MirrorService_ListStatus_Call {
230	_c.Call.Run(func(args mock.Arguments) {
231		var arg0 context.Context
232		if args[0] != nil {
233			arg0 = args[0].(context.Context)
234		}
235		var arg1 domain.Principal
236		if args[1] != nil {
237			arg1 = args[1].(domain.Principal)
238		}
239		run(
240			arg0,
241			arg1,
242		)
243	})
244	return _c
245}
246
247func (_c *MirrorService_ListStatus_Call) Return(mirrorStatusViews []ports.MirrorStatusView, err error) *MirrorService_ListStatus_Call {
248	_c.Call.Return(mirrorStatusViews, err)
249	return _c
250}
251
252func (_c *MirrorService_ListStatus_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal) ([]ports.MirrorStatusView, error)) *MirrorService_ListStatus_Call {
253	_c.Call.Return(run)
254	return _c
255}
256
257// RemoveRepoMirror provides a mock function for the type MirrorService
258func (_mock *MirrorService) RemoveRepoMirror(ctx context.Context, p domain.Principal, repo domain.RepoName) error {
259	ret := _mock.Called(ctx, p, repo)
260
261	if len(ret) == 0 {
262		panic("no return value specified for RemoveRepoMirror")
263	}
264
265	var r0 error
266	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName) error); ok {
267		r0 = returnFunc(ctx, p, repo)
268	} else {
269		r0 = ret.Error(0)
270	}
271	return r0
272}
273
274// MirrorService_RemoveRepoMirror_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveRepoMirror'
275type MirrorService_RemoveRepoMirror_Call struct {
276	*mock.Call
277}
278
279// RemoveRepoMirror is a helper method to define mock.On call
280//   - ctx context.Context
281//   - p domain.Principal
282//   - repo domain.RepoName
283func (_e *MirrorService_Expecter) RemoveRepoMirror(ctx any, p any, repo any) *MirrorService_RemoveRepoMirror_Call {
284	return &MirrorService_RemoveRepoMirror_Call{Call: _e.mock.On("RemoveRepoMirror", ctx, p, repo)}
285}
286
287func (_c *MirrorService_RemoveRepoMirror_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName)) *MirrorService_RemoveRepoMirror_Call {
288	_c.Call.Run(func(args mock.Arguments) {
289		var arg0 context.Context
290		if args[0] != nil {
291			arg0 = args[0].(context.Context)
292		}
293		var arg1 domain.Principal
294		if args[1] != nil {
295			arg1 = args[1].(domain.Principal)
296		}
297		var arg2 domain.RepoName
298		if args[2] != nil {
299			arg2 = args[2].(domain.RepoName)
300		}
301		run(
302			arg0,
303			arg1,
304			arg2,
305		)
306	})
307	return _c
308}
309
310func (_c *MirrorService_RemoveRepoMirror_Call) Return(err error) *MirrorService_RemoveRepoMirror_Call {
311	_c.Call.Return(err)
312	return _c
313}
314
315func (_c *MirrorService_RemoveRepoMirror_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName) error) *MirrorService_RemoveRepoMirror_Call {
316	_c.Call.Return(run)
317	return _c
318}
319
320// RotateKey provides a mock function for the type MirrorService
321func (_mock *MirrorService) RotateKey(ctx context.Context, p domain.Principal) (ports.MirrorKeyRotation, error) {
322	ret := _mock.Called(ctx, p)
323
324	if len(ret) == 0 {
325		panic("no return value specified for RotateKey")
326	}
327
328	var r0 ports.MirrorKeyRotation
329	var r1 error
330	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal) (ports.MirrorKeyRotation, error)); ok {
331		return returnFunc(ctx, p)
332	}
333	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal) ports.MirrorKeyRotation); ok {
334		r0 = returnFunc(ctx, p)
335	} else {
336		r0 = ret.Get(0).(ports.MirrorKeyRotation)
337	}
338	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal) error); ok {
339		r1 = returnFunc(ctx, p)
340	} else {
341		r1 = ret.Error(1)
342	}
343	return r0, r1
344}
345
346// MirrorService_RotateKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RotateKey'
347type MirrorService_RotateKey_Call struct {
348	*mock.Call
349}
350
351// RotateKey is a helper method to define mock.On call
352//   - ctx context.Context
353//   - p domain.Principal
354func (_e *MirrorService_Expecter) RotateKey(ctx any, p any) *MirrorService_RotateKey_Call {
355	return &MirrorService_RotateKey_Call{Call: _e.mock.On("RotateKey", ctx, p)}
356}
357
358func (_c *MirrorService_RotateKey_Call) Run(run func(ctx context.Context, p domain.Principal)) *MirrorService_RotateKey_Call {
359	_c.Call.Run(func(args mock.Arguments) {
360		var arg0 context.Context
361		if args[0] != nil {
362			arg0 = args[0].(context.Context)
363		}
364		var arg1 domain.Principal
365		if args[1] != nil {
366			arg1 = args[1].(domain.Principal)
367		}
368		run(
369			arg0,
370			arg1,
371		)
372	})
373	return _c
374}
375
376func (_c *MirrorService_RotateKey_Call) Return(mirrorKeyRotation ports.MirrorKeyRotation, err error) *MirrorService_RotateKey_Call {
377	_c.Call.Return(mirrorKeyRotation, err)
378	return _c
379}
380
381func (_c *MirrorService_RotateKey_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal) (ports.MirrorKeyRotation, error)) *MirrorService_RotateKey_Call {
382	_c.Call.Return(run)
383	return _c
384}
385
386// SetGlobalConfig provides a mock function for the type MirrorService
387func (_mock *MirrorService) SetGlobalConfig(ctx context.Context, p domain.Principal, patch ports.MirrorGlobalPatch) (domain.MirrorGlobalConfig, error) {
388	ret := _mock.Called(ctx, p, patch)
389
390	if len(ret) == 0 {
391		panic("no return value specified for SetGlobalConfig")
392	}
393
394	var r0 domain.MirrorGlobalConfig
395	var r1 error
396	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, ports.MirrorGlobalPatch) (domain.MirrorGlobalConfig, error)); ok {
397		return returnFunc(ctx, p, patch)
398	}
399	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, ports.MirrorGlobalPatch) domain.MirrorGlobalConfig); ok {
400		r0 = returnFunc(ctx, p, patch)
401	} else {
402		r0 = ret.Get(0).(domain.MirrorGlobalConfig)
403	}
404	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, ports.MirrorGlobalPatch) error); ok {
405		r1 = returnFunc(ctx, p, patch)
406	} else {
407		r1 = ret.Error(1)
408	}
409	return r0, r1
410}
411
412// MirrorService_SetGlobalConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetGlobalConfig'
413type MirrorService_SetGlobalConfig_Call struct {
414	*mock.Call
415}
416
417// SetGlobalConfig is a helper method to define mock.On call
418//   - ctx context.Context
419//   - p domain.Principal
420//   - patch ports.MirrorGlobalPatch
421func (_e *MirrorService_Expecter) SetGlobalConfig(ctx any, p any, patch any) *MirrorService_SetGlobalConfig_Call {
422	return &MirrorService_SetGlobalConfig_Call{Call: _e.mock.On("SetGlobalConfig", ctx, p, patch)}
423}
424
425func (_c *MirrorService_SetGlobalConfig_Call) Run(run func(ctx context.Context, p domain.Principal, patch ports.MirrorGlobalPatch)) *MirrorService_SetGlobalConfig_Call {
426	_c.Call.Run(func(args mock.Arguments) {
427		var arg0 context.Context
428		if args[0] != nil {
429			arg0 = args[0].(context.Context)
430		}
431		var arg1 domain.Principal
432		if args[1] != nil {
433			arg1 = args[1].(domain.Principal)
434		}
435		var arg2 ports.MirrorGlobalPatch
436		if args[2] != nil {
437			arg2 = args[2].(ports.MirrorGlobalPatch)
438		}
439		run(
440			arg0,
441			arg1,
442			arg2,
443		)
444	})
445	return _c
446}
447
448func (_c *MirrorService_SetGlobalConfig_Call) Return(mirrorGlobalConfig domain.MirrorGlobalConfig, err error) *MirrorService_SetGlobalConfig_Call {
449	_c.Call.Return(mirrorGlobalConfig, err)
450	return _c
451}
452
453func (_c *MirrorService_SetGlobalConfig_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, patch ports.MirrorGlobalPatch) (domain.MirrorGlobalConfig, error)) *MirrorService_SetGlobalConfig_Call {
454	_c.Call.Return(run)
455	return _c
456}
457
458// SetRepoExcluded provides a mock function for the type MirrorService
459func (_mock *MirrorService) SetRepoExcluded(ctx context.Context, p domain.Principal, repo domain.RepoName, excluded bool) (domain.MirrorTarget, error) {
460	ret := _mock.Called(ctx, p, repo, excluded)
461
462	if len(ret) == 0 {
463		panic("no return value specified for SetRepoExcluded")
464	}
465
466	var r0 domain.MirrorTarget
467	var r1 error
468	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, bool) (domain.MirrorTarget, error)); ok {
469		return returnFunc(ctx, p, repo, excluded)
470	}
471	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, bool) domain.MirrorTarget); ok {
472		r0 = returnFunc(ctx, p, repo, excluded)
473	} else {
474		r0 = ret.Get(0).(domain.MirrorTarget)
475	}
476	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, bool) error); ok {
477		r1 = returnFunc(ctx, p, repo, excluded)
478	} else {
479		r1 = ret.Error(1)
480	}
481	return r0, r1
482}
483
484// MirrorService_SetRepoExcluded_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetRepoExcluded'
485type MirrorService_SetRepoExcluded_Call struct {
486	*mock.Call
487}
488
489// SetRepoExcluded is a helper method to define mock.On call
490//   - ctx context.Context
491//   - p domain.Principal
492//   - repo domain.RepoName
493//   - excluded bool
494func (_e *MirrorService_Expecter) SetRepoExcluded(ctx any, p any, repo any, excluded any) *MirrorService_SetRepoExcluded_Call {
495	return &MirrorService_SetRepoExcluded_Call{Call: _e.mock.On("SetRepoExcluded", ctx, p, repo, excluded)}
496}
497
498func (_c *MirrorService_SetRepoExcluded_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, excluded bool)) *MirrorService_SetRepoExcluded_Call {
499	_c.Call.Run(func(args mock.Arguments) {
500		var arg0 context.Context
501		if args[0] != nil {
502			arg0 = args[0].(context.Context)
503		}
504		var arg1 domain.Principal
505		if args[1] != nil {
506			arg1 = args[1].(domain.Principal)
507		}
508		var arg2 domain.RepoName
509		if args[2] != nil {
510			arg2 = args[2].(domain.RepoName)
511		}
512		var arg3 bool
513		if args[3] != nil {
514			arg3 = args[3].(bool)
515		}
516		run(
517			arg0,
518			arg1,
519			arg2,
520			arg3,
521		)
522	})
523	return _c
524}
525
526func (_c *MirrorService_SetRepoExcluded_Call) Return(mirrorTarget domain.MirrorTarget, err error) *MirrorService_SetRepoExcluded_Call {
527	_c.Call.Return(mirrorTarget, err)
528	return _c
529}
530
531func (_c *MirrorService_SetRepoExcluded_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, excluded bool) (domain.MirrorTarget, error)) *MirrorService_SetRepoExcluded_Call {
532	_c.Call.Return(run)
533	return _c
534}
535
536// SetRepoMirror provides a mock function for the type MirrorService
537func (_mock *MirrorService) SetRepoMirror(ctx context.Context, p domain.Principal, c domain.MirrorRepoConfig) (domain.MirrorTarget, error) {
538	ret := _mock.Called(ctx, p, c)
539
540	if len(ret) == 0 {
541		panic("no return value specified for SetRepoMirror")
542	}
543
544	var r0 domain.MirrorTarget
545	var r1 error
546	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.MirrorRepoConfig) (domain.MirrorTarget, error)); ok {
547		return returnFunc(ctx, p, c)
548	}
549	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.MirrorRepoConfig) domain.MirrorTarget); ok {
550		r0 = returnFunc(ctx, p, c)
551	} else {
552		r0 = ret.Get(0).(domain.MirrorTarget)
553	}
554	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.MirrorRepoConfig) error); ok {
555		r1 = returnFunc(ctx, p, c)
556	} else {
557		r1 = ret.Error(1)
558	}
559	return r0, r1
560}
561
562// MirrorService_SetRepoMirror_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetRepoMirror'
563type MirrorService_SetRepoMirror_Call struct {
564	*mock.Call
565}
566
567// SetRepoMirror is a helper method to define mock.On call
568//   - ctx context.Context
569//   - p domain.Principal
570//   - c domain.MirrorRepoConfig
571func (_e *MirrorService_Expecter) SetRepoMirror(ctx any, p any, c any) *MirrorService_SetRepoMirror_Call {
572	return &MirrorService_SetRepoMirror_Call{Call: _e.mock.On("SetRepoMirror", ctx, p, c)}
573}
574
575func (_c *MirrorService_SetRepoMirror_Call) Run(run func(ctx context.Context, p domain.Principal, c domain.MirrorRepoConfig)) *MirrorService_SetRepoMirror_Call {
576	_c.Call.Run(func(args mock.Arguments) {
577		var arg0 context.Context
578		if args[0] != nil {
579			arg0 = args[0].(context.Context)
580		}
581		var arg1 domain.Principal
582		if args[1] != nil {
583			arg1 = args[1].(domain.Principal)
584		}
585		var arg2 domain.MirrorRepoConfig
586		if args[2] != nil {
587			arg2 = args[2].(domain.MirrorRepoConfig)
588		}
589		run(
590			arg0,
591			arg1,
592			arg2,
593		)
594	})
595	return _c
596}
597
598func (_c *MirrorService_SetRepoMirror_Call) Return(mirrorTarget domain.MirrorTarget, err error) *MirrorService_SetRepoMirror_Call {
599	_c.Call.Return(mirrorTarget, err)
600	return _c
601}
602
603func (_c *MirrorService_SetRepoMirror_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, c domain.MirrorRepoConfig) (domain.MirrorTarget, error)) *MirrorService_SetRepoMirror_Call {
604	_c.Call.Return(run)
605	return _c
606}
607
608// ShowKey provides a mock function for the type MirrorService
609func (_mock *MirrorService) ShowKey(ctx context.Context, p domain.Principal) (domain.MirrorPublicKey, error) {
610	ret := _mock.Called(ctx, p)
611
612	if len(ret) == 0 {
613		panic("no return value specified for ShowKey")
614	}
615
616	var r0 domain.MirrorPublicKey
617	var r1 error
618	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal) (domain.MirrorPublicKey, error)); ok {
619		return returnFunc(ctx, p)
620	}
621	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal) domain.MirrorPublicKey); ok {
622		r0 = returnFunc(ctx, p)
623	} else {
624		r0 = ret.Get(0).(domain.MirrorPublicKey)
625	}
626	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal) error); ok {
627		r1 = returnFunc(ctx, p)
628	} else {
629		r1 = ret.Error(1)
630	}
631	return r0, r1
632}
633
634// MirrorService_ShowKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShowKey'
635type MirrorService_ShowKey_Call struct {
636	*mock.Call
637}
638
639// ShowKey is a helper method to define mock.On call
640//   - ctx context.Context
641//   - p domain.Principal
642func (_e *MirrorService_Expecter) ShowKey(ctx any, p any) *MirrorService_ShowKey_Call {
643	return &MirrorService_ShowKey_Call{Call: _e.mock.On("ShowKey", ctx, p)}
644}
645
646func (_c *MirrorService_ShowKey_Call) Run(run func(ctx context.Context, p domain.Principal)) *MirrorService_ShowKey_Call {
647	_c.Call.Run(func(args mock.Arguments) {
648		var arg0 context.Context
649		if args[0] != nil {
650			arg0 = args[0].(context.Context)
651		}
652		var arg1 domain.Principal
653		if args[1] != nil {
654			arg1 = args[1].(domain.Principal)
655		}
656		run(
657			arg0,
658			arg1,
659		)
660	})
661	return _c
662}
663
664func (_c *MirrorService_ShowKey_Call) Return(mirrorPublicKey domain.MirrorPublicKey, err error) *MirrorService_ShowKey_Call {
665	_c.Call.Return(mirrorPublicKey, err)
666	return _c
667}
668
669func (_c *MirrorService_ShowKey_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal) (domain.MirrorPublicKey, error)) *MirrorService_ShowKey_Call {
670	_c.Call.Return(run)
671	return _c
672}
673
674// Sync provides a mock function for the type MirrorService
675func (_mock *MirrorService) Sync(ctx context.Context, p domain.Principal, repo domain.RepoName, force bool) (ports.MirrorSyncResult, error) {
676	ret := _mock.Called(ctx, p, repo, force)
677
678	if len(ret) == 0 {
679		panic("no return value specified for Sync")
680	}
681
682	var r0 ports.MirrorSyncResult
683	var r1 error
684	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, bool) (ports.MirrorSyncResult, error)); ok {
685		return returnFunc(ctx, p, repo, force)
686	}
687	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, bool) ports.MirrorSyncResult); ok {
688		r0 = returnFunc(ctx, p, repo, force)
689	} else {
690		r0 = ret.Get(0).(ports.MirrorSyncResult)
691	}
692	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, bool) error); ok {
693		r1 = returnFunc(ctx, p, repo, force)
694	} else {
695		r1 = ret.Error(1)
696	}
697	return r0, r1
698}
699
700// MirrorService_Sync_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Sync'
701type MirrorService_Sync_Call struct {
702	*mock.Call
703}
704
705// Sync is a helper method to define mock.On call
706//   - ctx context.Context
707//   - p domain.Principal
708//   - repo domain.RepoName
709//   - force bool
710func (_e *MirrorService_Expecter) Sync(ctx any, p any, repo any, force any) *MirrorService_Sync_Call {
711	return &MirrorService_Sync_Call{Call: _e.mock.On("Sync", ctx, p, repo, force)}
712}
713
714func (_c *MirrorService_Sync_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, force bool)) *MirrorService_Sync_Call {
715	_c.Call.Run(func(args mock.Arguments) {
716		var arg0 context.Context
717		if args[0] != nil {
718			arg0 = args[0].(context.Context)
719		}
720		var arg1 domain.Principal
721		if args[1] != nil {
722			arg1 = args[1].(domain.Principal)
723		}
724		var arg2 domain.RepoName
725		if args[2] != nil {
726			arg2 = args[2].(domain.RepoName)
727		}
728		var arg3 bool
729		if args[3] != nil {
730			arg3 = args[3].(bool)
731		}
732		run(
733			arg0,
734			arg1,
735			arg2,
736			arg3,
737		)
738	})
739	return _c
740}
741
742func (_c *MirrorService_Sync_Call) Return(mirrorSyncResult ports.MirrorSyncResult, err error) *MirrorService_Sync_Call {
743	_c.Call.Return(mirrorSyncResult, err)
744	return _c
745}
746
747func (_c *MirrorService_Sync_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, force bool) (ports.MirrorSyncResult, error)) *MirrorService_Sync_Call {
748	_c.Call.Return(run)
749	return _c
750}
751
752// SyncAll provides a mock function for the type MirrorService
753func (_mock *MirrorService) SyncAll(ctx context.Context, p domain.Principal, force bool) ([]ports.MirrorSyncResult, error) {
754	ret := _mock.Called(ctx, p, force)
755
756	if len(ret) == 0 {
757		panic("no return value specified for SyncAll")
758	}
759
760	var r0 []ports.MirrorSyncResult
761	var r1 error
762	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, bool) ([]ports.MirrorSyncResult, error)); ok {
763		return returnFunc(ctx, p, force)
764	}
765	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, bool) []ports.MirrorSyncResult); ok {
766		r0 = returnFunc(ctx, p, force)
767	} else {
768		if ret.Get(0) != nil {
769			r0 = ret.Get(0).([]ports.MirrorSyncResult)
770		}
771	}
772	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, bool) error); ok {
773		r1 = returnFunc(ctx, p, force)
774	} else {
775		r1 = ret.Error(1)
776	}
777	return r0, r1
778}
779
780// MirrorService_SyncAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SyncAll'
781type MirrorService_SyncAll_Call struct {
782	*mock.Call
783}
784
785// SyncAll is a helper method to define mock.On call
786//   - ctx context.Context
787//   - p domain.Principal
788//   - force bool
789func (_e *MirrorService_Expecter) SyncAll(ctx any, p any, force any) *MirrorService_SyncAll_Call {
790	return &MirrorService_SyncAll_Call{Call: _e.mock.On("SyncAll", ctx, p, force)}
791}
792
793func (_c *MirrorService_SyncAll_Call) Run(run func(ctx context.Context, p domain.Principal, force bool)) *MirrorService_SyncAll_Call {
794	_c.Call.Run(func(args mock.Arguments) {
795		var arg0 context.Context
796		if args[0] != nil {
797			arg0 = args[0].(context.Context)
798		}
799		var arg1 domain.Principal
800		if args[1] != nil {
801			arg1 = args[1].(domain.Principal)
802		}
803		var arg2 bool
804		if args[2] != nil {
805			arg2 = args[2].(bool)
806		}
807		run(
808			arg0,
809			arg1,
810			arg2,
811		)
812	})
813	return _c
814}
815
816func (_c *MirrorService_SyncAll_Call) Return(mirrorSyncResults []ports.MirrorSyncResult, err error) *MirrorService_SyncAll_Call {
817	_c.Call.Return(mirrorSyncResults, err)
818	return _c
819}
820
821func (_c *MirrorService_SyncAll_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, force bool) ([]ports.MirrorSyncResult, error)) *MirrorService_SyncAll_Call {
822	_c.Call.Return(run)
823	return _c
824}

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 3

Tags 44

↑↓ moveenter openesc close