v0.23.0 333c710

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

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 2

Tags 45

↑↓ moveenter openesc close