v0.36.0 1fb2421

GitHubReleaseAPI.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
11	"bnema.dev/ermite/internal/domain"
12	"bnema.dev/ermite/internal/ports"
13	mock "github.com/stretchr/testify/mock"
14)
15
16// NewGitHubReleaseAPI creates a new instance of GitHubReleaseAPI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
17// The first argument is typically a *testing.T value.
18func NewGitHubReleaseAPI(t interface {
19	mock.TestingT
20	Cleanup(func())
21}) *GitHubReleaseAPI {
22	if helper, ok := t.(interface{ Helper() }); ok {
23		helper.Helper()
24	}
25
26	mock := &GitHubReleaseAPI{}
27	mock.Mock.Test(t)
28
29	t.Cleanup(func() {
30		if helper, ok := t.(interface{ Helper() }); ok {
31			helper.Helper()
32		}
33		mock.AssertExpectations(t)
34	})
35
36	return mock
37}
38
39// GitHubReleaseAPI is an autogenerated mock type for the GitHubReleaseAPI type
40type GitHubReleaseAPI struct {
41	mock.Mock
42}
43
44type GitHubReleaseAPI_Expecter struct {
45	mock *mock.Mock
46}
47
48func (_m *GitHubReleaseAPI) EXPECT() *GitHubReleaseAPI_Expecter {
49	return &GitHubReleaseAPI_Expecter{mock: &_m.Mock}
50}
51
52// AssetByID provides a mock function for the type GitHubReleaseAPI
53func (_mock *GitHubReleaseAPI) AssetByID(ctx context.Context, p domain.Principal, owner string, repo string, assetID int64) (domain.ReleaseAsset, error) {
54	ret := _mock.Called(ctx, p, owner, repo, assetID)
55
56	if len(ret) == 0 {
57		panic("no return value specified for AssetByID")
58	}
59
60	var r0 domain.ReleaseAsset
61	var r1 error
62	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, int64) (domain.ReleaseAsset, error)); ok {
63		return returnFunc(ctx, p, owner, repo, assetID)
64	}
65	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, int64) domain.ReleaseAsset); ok {
66		r0 = returnFunc(ctx, p, owner, repo, assetID)
67	} else {
68		r0 = ret.Get(0).(domain.ReleaseAsset)
69	}
70	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, string, string, int64) error); ok {
71		r1 = returnFunc(ctx, p, owner, repo, assetID)
72	} else {
73		r1 = ret.Error(1)
74	}
75	return r0, r1
76}
77
78// GitHubReleaseAPI_AssetByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AssetByID'
79type GitHubReleaseAPI_AssetByID_Call struct {
80	*mock.Call
81}
82
83// AssetByID is a helper method to define mock.On call
84//   - ctx context.Context
85//   - p domain.Principal
86//   - owner string
87//   - repo string
88//   - assetID int64
89func (_e *GitHubReleaseAPI_Expecter) AssetByID(ctx any, p any, owner any, repo any, assetID any) *GitHubReleaseAPI_AssetByID_Call {
90	return &GitHubReleaseAPI_AssetByID_Call{Call: _e.mock.On("AssetByID", ctx, p, owner, repo, assetID)}
91}
92
93func (_c *GitHubReleaseAPI_AssetByID_Call) Run(run func(ctx context.Context, p domain.Principal, owner string, repo string, assetID int64)) *GitHubReleaseAPI_AssetByID_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.Principal
100		if args[1] != nil {
101			arg1 = args[1].(domain.Principal)
102		}
103		var arg2 string
104		if args[2] != nil {
105			arg2 = args[2].(string)
106		}
107		var arg3 string
108		if args[3] != nil {
109			arg3 = args[3].(string)
110		}
111		var arg4 int64
112		if args[4] != nil {
113			arg4 = args[4].(int64)
114		}
115		run(
116			arg0,
117			arg1,
118			arg2,
119			arg3,
120			arg4,
121		)
122	})
123	return _c
124}
125
126func (_c *GitHubReleaseAPI_AssetByID_Call) Return(releaseAsset domain.ReleaseAsset, err error) *GitHubReleaseAPI_AssetByID_Call {
127	_c.Call.Return(releaseAsset, err)
128	return _c
129}
130
131func (_c *GitHubReleaseAPI_AssetByID_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, owner string, repo string, assetID int64) (domain.ReleaseAsset, error)) *GitHubReleaseAPI_AssetByID_Call {
132	_c.Call.Return(run)
133	return _c
134}
135
136// CreateRelease provides a mock function for the type GitHubReleaseAPI
137func (_mock *GitHubReleaseAPI) CreateRelease(ctx context.Context, p domain.Principal, owner string, repo string, body []byte) ([]byte, error) {
138	ret := _mock.Called(ctx, p, owner, repo, body)
139
140	if len(ret) == 0 {
141		panic("no return value specified for CreateRelease")
142	}
143
144	var r0 []byte
145	var r1 error
146	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, []byte) ([]byte, error)); ok {
147		return returnFunc(ctx, p, owner, repo, body)
148	}
149	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, []byte) []byte); ok {
150		r0 = returnFunc(ctx, p, owner, repo, body)
151	} else {
152		if ret.Get(0) != nil {
153			r0 = ret.Get(0).([]byte)
154		}
155	}
156	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, string, string, []byte) error); ok {
157		r1 = returnFunc(ctx, p, owner, repo, body)
158	} else {
159		r1 = ret.Error(1)
160	}
161	return r0, r1
162}
163
164// GitHubReleaseAPI_CreateRelease_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateRelease'
165type GitHubReleaseAPI_CreateRelease_Call struct {
166	*mock.Call
167}
168
169// CreateRelease is a helper method to define mock.On call
170//   - ctx context.Context
171//   - p domain.Principal
172//   - owner string
173//   - repo string
174//   - body []byte
175func (_e *GitHubReleaseAPI_Expecter) CreateRelease(ctx any, p any, owner any, repo any, body any) *GitHubReleaseAPI_CreateRelease_Call {
176	return &GitHubReleaseAPI_CreateRelease_Call{Call: _e.mock.On("CreateRelease", ctx, p, owner, repo, body)}
177}
178
179func (_c *GitHubReleaseAPI_CreateRelease_Call) Run(run func(ctx context.Context, p domain.Principal, owner string, repo string, body []byte)) *GitHubReleaseAPI_CreateRelease_Call {
180	_c.Call.Run(func(args mock.Arguments) {
181		var arg0 context.Context
182		if args[0] != nil {
183			arg0 = args[0].(context.Context)
184		}
185		var arg1 domain.Principal
186		if args[1] != nil {
187			arg1 = args[1].(domain.Principal)
188		}
189		var arg2 string
190		if args[2] != nil {
191			arg2 = args[2].(string)
192		}
193		var arg3 string
194		if args[3] != nil {
195			arg3 = args[3].(string)
196		}
197		var arg4 []byte
198		if args[4] != nil {
199			arg4 = args[4].([]byte)
200		}
201		run(
202			arg0,
203			arg1,
204			arg2,
205			arg3,
206			arg4,
207		)
208	})
209	return _c
210}
211
212func (_c *GitHubReleaseAPI_CreateRelease_Call) Return(bytes []byte, err error) *GitHubReleaseAPI_CreateRelease_Call {
213	_c.Call.Return(bytes, err)
214	return _c
215}
216
217func (_c *GitHubReleaseAPI_CreateRelease_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, owner string, repo string, body []byte) ([]byte, error)) *GitHubReleaseAPI_CreateRelease_Call {
218	_c.Call.Return(run)
219	return _c
220}
221
222// DeleteAsset provides a mock function for the type GitHubReleaseAPI
223func (_mock *GitHubReleaseAPI) DeleteAsset(ctx context.Context, p domain.Principal, owner string, repo string, assetID int64) error {
224	ret := _mock.Called(ctx, p, owner, repo, assetID)
225
226	if len(ret) == 0 {
227		panic("no return value specified for DeleteAsset")
228	}
229
230	var r0 error
231	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, int64) error); ok {
232		r0 = returnFunc(ctx, p, owner, repo, assetID)
233	} else {
234		r0 = ret.Error(0)
235	}
236	return r0
237}
238
239// GitHubReleaseAPI_DeleteAsset_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteAsset'
240type GitHubReleaseAPI_DeleteAsset_Call struct {
241	*mock.Call
242}
243
244// DeleteAsset is a helper method to define mock.On call
245//   - ctx context.Context
246//   - p domain.Principal
247//   - owner string
248//   - repo string
249//   - assetID int64
250func (_e *GitHubReleaseAPI_Expecter) DeleteAsset(ctx any, p any, owner any, repo any, assetID any) *GitHubReleaseAPI_DeleteAsset_Call {
251	return &GitHubReleaseAPI_DeleteAsset_Call{Call: _e.mock.On("DeleteAsset", ctx, p, owner, repo, assetID)}
252}
253
254func (_c *GitHubReleaseAPI_DeleteAsset_Call) Run(run func(ctx context.Context, p domain.Principal, owner string, repo string, assetID int64)) *GitHubReleaseAPI_DeleteAsset_Call {
255	_c.Call.Run(func(args mock.Arguments) {
256		var arg0 context.Context
257		if args[0] != nil {
258			arg0 = args[0].(context.Context)
259		}
260		var arg1 domain.Principal
261		if args[1] != nil {
262			arg1 = args[1].(domain.Principal)
263		}
264		var arg2 string
265		if args[2] != nil {
266			arg2 = args[2].(string)
267		}
268		var arg3 string
269		if args[3] != nil {
270			arg3 = args[3].(string)
271		}
272		var arg4 int64
273		if args[4] != nil {
274			arg4 = args[4].(int64)
275		}
276		run(
277			arg0,
278			arg1,
279			arg2,
280			arg3,
281			arg4,
282		)
283	})
284	return _c
285}
286
287func (_c *GitHubReleaseAPI_DeleteAsset_Call) Return(err error) *GitHubReleaseAPI_DeleteAsset_Call {
288	_c.Call.Return(err)
289	return _c
290}
291
292func (_c *GitHubReleaseAPI_DeleteAsset_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, owner string, repo string, assetID int64) error) *GitHubReleaseAPI_DeleteAsset_Call {
293	_c.Call.Return(run)
294	return _c
295}
296
297// DeleteRelease provides a mock function for the type GitHubReleaseAPI
298func (_mock *GitHubReleaseAPI) DeleteRelease(ctx context.Context, p domain.Principal, owner string, repo string, id int64) error {
299	ret := _mock.Called(ctx, p, owner, repo, id)
300
301	if len(ret) == 0 {
302		panic("no return value specified for DeleteRelease")
303	}
304
305	var r0 error
306	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, int64) error); ok {
307		r0 = returnFunc(ctx, p, owner, repo, id)
308	} else {
309		r0 = ret.Error(0)
310	}
311	return r0
312}
313
314// GitHubReleaseAPI_DeleteRelease_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteRelease'
315type GitHubReleaseAPI_DeleteRelease_Call struct {
316	*mock.Call
317}
318
319// DeleteRelease is a helper method to define mock.On call
320//   - ctx context.Context
321//   - p domain.Principal
322//   - owner string
323//   - repo string
324//   - id int64
325func (_e *GitHubReleaseAPI_Expecter) DeleteRelease(ctx any, p any, owner any, repo any, id any) *GitHubReleaseAPI_DeleteRelease_Call {
326	return &GitHubReleaseAPI_DeleteRelease_Call{Call: _e.mock.On("DeleteRelease", ctx, p, owner, repo, id)}
327}
328
329func (_c *GitHubReleaseAPI_DeleteRelease_Call) Run(run func(ctx context.Context, p domain.Principal, owner string, repo string, id int64)) *GitHubReleaseAPI_DeleteRelease_Call {
330	_c.Call.Run(func(args mock.Arguments) {
331		var arg0 context.Context
332		if args[0] != nil {
333			arg0 = args[0].(context.Context)
334		}
335		var arg1 domain.Principal
336		if args[1] != nil {
337			arg1 = args[1].(domain.Principal)
338		}
339		var arg2 string
340		if args[2] != nil {
341			arg2 = args[2].(string)
342		}
343		var arg3 string
344		if args[3] != nil {
345			arg3 = args[3].(string)
346		}
347		var arg4 int64
348		if args[4] != nil {
349			arg4 = args[4].(int64)
350		}
351		run(
352			arg0,
353			arg1,
354			arg2,
355			arg3,
356			arg4,
357		)
358	})
359	return _c
360}
361
362func (_c *GitHubReleaseAPI_DeleteRelease_Call) Return(err error) *GitHubReleaseAPI_DeleteRelease_Call {
363	_c.Call.Return(err)
364	return _c
365}
366
367func (_c *GitHubReleaseAPI_DeleteRelease_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, owner string, repo string, id int64) error) *GitHubReleaseAPI_DeleteRelease_Call {
368	_c.Call.Return(run)
369	return _c
370}
371
372// GetAsset provides a mock function for the type GitHubReleaseAPI
373func (_mock *GitHubReleaseAPI) GetAsset(ctx context.Context, p domain.Principal, owner string, repo string, assetID int64) ([]byte, error) {
374	ret := _mock.Called(ctx, p, owner, repo, assetID)
375
376	if len(ret) == 0 {
377		panic("no return value specified for GetAsset")
378	}
379
380	var r0 []byte
381	var r1 error
382	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, int64) ([]byte, error)); ok {
383		return returnFunc(ctx, p, owner, repo, assetID)
384	}
385	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, int64) []byte); ok {
386		r0 = returnFunc(ctx, p, owner, repo, assetID)
387	} else {
388		if ret.Get(0) != nil {
389			r0 = ret.Get(0).([]byte)
390		}
391	}
392	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, string, string, int64) error); ok {
393		r1 = returnFunc(ctx, p, owner, repo, assetID)
394	} else {
395		r1 = ret.Error(1)
396	}
397	return r0, r1
398}
399
400// GitHubReleaseAPI_GetAsset_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAsset'
401type GitHubReleaseAPI_GetAsset_Call struct {
402	*mock.Call
403}
404
405// GetAsset is a helper method to define mock.On call
406//   - ctx context.Context
407//   - p domain.Principal
408//   - owner string
409//   - repo string
410//   - assetID int64
411func (_e *GitHubReleaseAPI_Expecter) GetAsset(ctx any, p any, owner any, repo any, assetID any) *GitHubReleaseAPI_GetAsset_Call {
412	return &GitHubReleaseAPI_GetAsset_Call{Call: _e.mock.On("GetAsset", ctx, p, owner, repo, assetID)}
413}
414
415func (_c *GitHubReleaseAPI_GetAsset_Call) Run(run func(ctx context.Context, p domain.Principal, owner string, repo string, assetID int64)) *GitHubReleaseAPI_GetAsset_Call {
416	_c.Call.Run(func(args mock.Arguments) {
417		var arg0 context.Context
418		if args[0] != nil {
419			arg0 = args[0].(context.Context)
420		}
421		var arg1 domain.Principal
422		if args[1] != nil {
423			arg1 = args[1].(domain.Principal)
424		}
425		var arg2 string
426		if args[2] != nil {
427			arg2 = args[2].(string)
428		}
429		var arg3 string
430		if args[3] != nil {
431			arg3 = args[3].(string)
432		}
433		var arg4 int64
434		if args[4] != nil {
435			arg4 = args[4].(int64)
436		}
437		run(
438			arg0,
439			arg1,
440			arg2,
441			arg3,
442			arg4,
443		)
444	})
445	return _c
446}
447
448func (_c *GitHubReleaseAPI_GetAsset_Call) Return(bytes []byte, err error) *GitHubReleaseAPI_GetAsset_Call {
449	_c.Call.Return(bytes, err)
450	return _c
451}
452
453func (_c *GitHubReleaseAPI_GetAsset_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, owner string, repo string, assetID int64) ([]byte, error)) *GitHubReleaseAPI_GetAsset_Call {
454	_c.Call.Return(run)
455	return _c
456}
457
458// GetRelease provides a mock function for the type GitHubReleaseAPI
459func (_mock *GitHubReleaseAPI) GetRelease(ctx context.Context, p domain.Principal, owner string, repo string, ref ports.ReleaseRef) ([]byte, error) {
460	ret := _mock.Called(ctx, p, owner, repo, ref)
461
462	if len(ret) == 0 {
463		panic("no return value specified for GetRelease")
464	}
465
466	var r0 []byte
467	var r1 error
468	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, ports.ReleaseRef) ([]byte, error)); ok {
469		return returnFunc(ctx, p, owner, repo, ref)
470	}
471	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, ports.ReleaseRef) []byte); ok {
472		r0 = returnFunc(ctx, p, owner, repo, ref)
473	} else {
474		if ret.Get(0) != nil {
475			r0 = ret.Get(0).([]byte)
476		}
477	}
478	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, string, string, ports.ReleaseRef) error); ok {
479		r1 = returnFunc(ctx, p, owner, repo, ref)
480	} else {
481		r1 = ret.Error(1)
482	}
483	return r0, r1
484}
485
486// GitHubReleaseAPI_GetRelease_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRelease'
487type GitHubReleaseAPI_GetRelease_Call struct {
488	*mock.Call
489}
490
491// GetRelease is a helper method to define mock.On call
492//   - ctx context.Context
493//   - p domain.Principal
494//   - owner string
495//   - repo string
496//   - ref ports.ReleaseRef
497func (_e *GitHubReleaseAPI_Expecter) GetRelease(ctx any, p any, owner any, repo any, ref any) *GitHubReleaseAPI_GetRelease_Call {
498	return &GitHubReleaseAPI_GetRelease_Call{Call: _e.mock.On("GetRelease", ctx, p, owner, repo, ref)}
499}
500
501func (_c *GitHubReleaseAPI_GetRelease_Call) Run(run func(ctx context.Context, p domain.Principal, owner string, repo string, ref ports.ReleaseRef)) *GitHubReleaseAPI_GetRelease_Call {
502	_c.Call.Run(func(args mock.Arguments) {
503		var arg0 context.Context
504		if args[0] != nil {
505			arg0 = args[0].(context.Context)
506		}
507		var arg1 domain.Principal
508		if args[1] != nil {
509			arg1 = args[1].(domain.Principal)
510		}
511		var arg2 string
512		if args[2] != nil {
513			arg2 = args[2].(string)
514		}
515		var arg3 string
516		if args[3] != nil {
517			arg3 = args[3].(string)
518		}
519		var arg4 ports.ReleaseRef
520		if args[4] != nil {
521			arg4 = args[4].(ports.ReleaseRef)
522		}
523		run(
524			arg0,
525			arg1,
526			arg2,
527			arg3,
528			arg4,
529		)
530	})
531	return _c
532}
533
534func (_c *GitHubReleaseAPI_GetRelease_Call) Return(bytes []byte, err error) *GitHubReleaseAPI_GetRelease_Call {
535	_c.Call.Return(bytes, err)
536	return _c
537}
538
539func (_c *GitHubReleaseAPI_GetRelease_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, owner string, repo string, ref ports.ReleaseRef) ([]byte, error)) *GitHubReleaseAPI_GetRelease_Call {
540	_c.Call.Return(run)
541	return _c
542}
543
544// ListAssets provides a mock function for the type GitHubReleaseAPI
545func (_mock *GitHubReleaseAPI) ListAssets(ctx context.Context, p domain.Principal, owner string, repo string, id int64, page int, perPage int) ([]byte, string, error) {
546	ret := _mock.Called(ctx, p, owner, repo, id, page, perPage)
547
548	if len(ret) == 0 {
549		panic("no return value specified for ListAssets")
550	}
551
552	var r0 []byte
553	var r1 string
554	var r2 error
555	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, int64, int, int) ([]byte, string, error)); ok {
556		return returnFunc(ctx, p, owner, repo, id, page, perPage)
557	}
558	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, int64, int, int) []byte); ok {
559		r0 = returnFunc(ctx, p, owner, repo, id, page, perPage)
560	} else {
561		if ret.Get(0) != nil {
562			r0 = ret.Get(0).([]byte)
563		}
564	}
565	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, string, string, int64, int, int) string); ok {
566		r1 = returnFunc(ctx, p, owner, repo, id, page, perPage)
567	} else {
568		r1 = ret.Get(1).(string)
569	}
570	if returnFunc, ok := ret.Get(2).(func(context.Context, domain.Principal, string, string, int64, int, int) error); ok {
571		r2 = returnFunc(ctx, p, owner, repo, id, page, perPage)
572	} else {
573		r2 = ret.Error(2)
574	}
575	return r0, r1, r2
576}
577
578// GitHubReleaseAPI_ListAssets_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAssets'
579type GitHubReleaseAPI_ListAssets_Call struct {
580	*mock.Call
581}
582
583// ListAssets is a helper method to define mock.On call
584//   - ctx context.Context
585//   - p domain.Principal
586//   - owner string
587//   - repo string
588//   - id int64
589//   - page int
590//   - perPage int
591func (_e *GitHubReleaseAPI_Expecter) ListAssets(ctx any, p any, owner any, repo any, id any, page any, perPage any) *GitHubReleaseAPI_ListAssets_Call {
592	return &GitHubReleaseAPI_ListAssets_Call{Call: _e.mock.On("ListAssets", ctx, p, owner, repo, id, page, perPage)}
593}
594
595func (_c *GitHubReleaseAPI_ListAssets_Call) Run(run func(ctx context.Context, p domain.Principal, owner string, repo string, id int64, page int, perPage int)) *GitHubReleaseAPI_ListAssets_Call {
596	_c.Call.Run(func(args mock.Arguments) {
597		var arg0 context.Context
598		if args[0] != nil {
599			arg0 = args[0].(context.Context)
600		}
601		var arg1 domain.Principal
602		if args[1] != nil {
603			arg1 = args[1].(domain.Principal)
604		}
605		var arg2 string
606		if args[2] != nil {
607			arg2 = args[2].(string)
608		}
609		var arg3 string
610		if args[3] != nil {
611			arg3 = args[3].(string)
612		}
613		var arg4 int64
614		if args[4] != nil {
615			arg4 = args[4].(int64)
616		}
617		var arg5 int
618		if args[5] != nil {
619			arg5 = args[5].(int)
620		}
621		var arg6 int
622		if args[6] != nil {
623			arg6 = args[6].(int)
624		}
625		run(
626			arg0,
627			arg1,
628			arg2,
629			arg3,
630			arg4,
631			arg5,
632			arg6,
633		)
634	})
635	return _c
636}
637
638func (_c *GitHubReleaseAPI_ListAssets_Call) Return(body []byte, link string, err error) *GitHubReleaseAPI_ListAssets_Call {
639	_c.Call.Return(body, link, err)
640	return _c
641}
642
643func (_c *GitHubReleaseAPI_ListAssets_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, owner string, repo string, id int64, page int, perPage int) ([]byte, string, error)) *GitHubReleaseAPI_ListAssets_Call {
644	_c.Call.Return(run)
645	return _c
646}
647
648// ListReleases provides a mock function for the type GitHubReleaseAPI
649func (_mock *GitHubReleaseAPI) ListReleases(ctx context.Context, p domain.Principal, owner string, repo string, page int, perPage int) ([]byte, string, error) {
650	ret := _mock.Called(ctx, p, owner, repo, page, perPage)
651
652	if len(ret) == 0 {
653		panic("no return value specified for ListReleases")
654	}
655
656	var r0 []byte
657	var r1 string
658	var r2 error
659	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, int, int) ([]byte, string, error)); ok {
660		return returnFunc(ctx, p, owner, repo, page, perPage)
661	}
662	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, int, int) []byte); ok {
663		r0 = returnFunc(ctx, p, owner, repo, page, perPage)
664	} else {
665		if ret.Get(0) != nil {
666			r0 = ret.Get(0).([]byte)
667		}
668	}
669	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, string, string, int, int) string); ok {
670		r1 = returnFunc(ctx, p, owner, repo, page, perPage)
671	} else {
672		r1 = ret.Get(1).(string)
673	}
674	if returnFunc, ok := ret.Get(2).(func(context.Context, domain.Principal, string, string, int, int) error); ok {
675		r2 = returnFunc(ctx, p, owner, repo, page, perPage)
676	} else {
677		r2 = ret.Error(2)
678	}
679	return r0, r1, r2
680}
681
682// GitHubReleaseAPI_ListReleases_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListReleases'
683type GitHubReleaseAPI_ListReleases_Call struct {
684	*mock.Call
685}
686
687// ListReleases is a helper method to define mock.On call
688//   - ctx context.Context
689//   - p domain.Principal
690//   - owner string
691//   - repo string
692//   - page int
693//   - perPage int
694func (_e *GitHubReleaseAPI_Expecter) ListReleases(ctx any, p any, owner any, repo any, page any, perPage any) *GitHubReleaseAPI_ListReleases_Call {
695	return &GitHubReleaseAPI_ListReleases_Call{Call: _e.mock.On("ListReleases", ctx, p, owner, repo, page, perPage)}
696}
697
698func (_c *GitHubReleaseAPI_ListReleases_Call) Run(run func(ctx context.Context, p domain.Principal, owner string, repo string, page int, perPage int)) *GitHubReleaseAPI_ListReleases_Call {
699	_c.Call.Run(func(args mock.Arguments) {
700		var arg0 context.Context
701		if args[0] != nil {
702			arg0 = args[0].(context.Context)
703		}
704		var arg1 domain.Principal
705		if args[1] != nil {
706			arg1 = args[1].(domain.Principal)
707		}
708		var arg2 string
709		if args[2] != nil {
710			arg2 = args[2].(string)
711		}
712		var arg3 string
713		if args[3] != nil {
714			arg3 = args[3].(string)
715		}
716		var arg4 int
717		if args[4] != nil {
718			arg4 = args[4].(int)
719		}
720		var arg5 int
721		if args[5] != nil {
722			arg5 = args[5].(int)
723		}
724		run(
725			arg0,
726			arg1,
727			arg2,
728			arg3,
729			arg4,
730			arg5,
731		)
732	})
733	return _c
734}
735
736func (_c *GitHubReleaseAPI_ListReleases_Call) Return(body []byte, link string, err error) *GitHubReleaseAPI_ListReleases_Call {
737	_c.Call.Return(body, link, err)
738	return _c
739}
740
741func (_c *GitHubReleaseAPI_ListReleases_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, owner string, repo string, page int, perPage int) ([]byte, string, error)) *GitHubReleaseAPI_ListReleases_Call {
742	_c.Call.Return(run)
743	return _c
744}
745
746// UpdateAsset provides a mock function for the type GitHubReleaseAPI
747func (_mock *GitHubReleaseAPI) UpdateAsset(ctx context.Context, p domain.Principal, owner string, repo string, assetID int64, body []byte) ([]byte, error) {
748	ret := _mock.Called(ctx, p, owner, repo, assetID, body)
749
750	if len(ret) == 0 {
751		panic("no return value specified for UpdateAsset")
752	}
753
754	var r0 []byte
755	var r1 error
756	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, int64, []byte) ([]byte, error)); ok {
757		return returnFunc(ctx, p, owner, repo, assetID, body)
758	}
759	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, int64, []byte) []byte); ok {
760		r0 = returnFunc(ctx, p, owner, repo, assetID, body)
761	} else {
762		if ret.Get(0) != nil {
763			r0 = ret.Get(0).([]byte)
764		}
765	}
766	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, string, string, int64, []byte) error); ok {
767		r1 = returnFunc(ctx, p, owner, repo, assetID, body)
768	} else {
769		r1 = ret.Error(1)
770	}
771	return r0, r1
772}
773
774// GitHubReleaseAPI_UpdateAsset_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateAsset'
775type GitHubReleaseAPI_UpdateAsset_Call struct {
776	*mock.Call
777}
778
779// UpdateAsset is a helper method to define mock.On call
780//   - ctx context.Context
781//   - p domain.Principal
782//   - owner string
783//   - repo string
784//   - assetID int64
785//   - body []byte
786func (_e *GitHubReleaseAPI_Expecter) UpdateAsset(ctx any, p any, owner any, repo any, assetID any, body any) *GitHubReleaseAPI_UpdateAsset_Call {
787	return &GitHubReleaseAPI_UpdateAsset_Call{Call: _e.mock.On("UpdateAsset", ctx, p, owner, repo, assetID, body)}
788}
789
790func (_c *GitHubReleaseAPI_UpdateAsset_Call) Run(run func(ctx context.Context, p domain.Principal, owner string, repo string, assetID int64, body []byte)) *GitHubReleaseAPI_UpdateAsset_Call {
791	_c.Call.Run(func(args mock.Arguments) {
792		var arg0 context.Context
793		if args[0] != nil {
794			arg0 = args[0].(context.Context)
795		}
796		var arg1 domain.Principal
797		if args[1] != nil {
798			arg1 = args[1].(domain.Principal)
799		}
800		var arg2 string
801		if args[2] != nil {
802			arg2 = args[2].(string)
803		}
804		var arg3 string
805		if args[3] != nil {
806			arg3 = args[3].(string)
807		}
808		var arg4 int64
809		if args[4] != nil {
810			arg4 = args[4].(int64)
811		}
812		var arg5 []byte
813		if args[5] != nil {
814			arg5 = args[5].([]byte)
815		}
816		run(
817			arg0,
818			arg1,
819			arg2,
820			arg3,
821			arg4,
822			arg5,
823		)
824	})
825	return _c
826}
827
828func (_c *GitHubReleaseAPI_UpdateAsset_Call) Return(bytes []byte, err error) *GitHubReleaseAPI_UpdateAsset_Call {
829	_c.Call.Return(bytes, err)
830	return _c
831}
832
833func (_c *GitHubReleaseAPI_UpdateAsset_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, owner string, repo string, assetID int64, body []byte) ([]byte, error)) *GitHubReleaseAPI_UpdateAsset_Call {
834	_c.Call.Return(run)
835	return _c
836}
837
838// UpdateRelease provides a mock function for the type GitHubReleaseAPI
839func (_mock *GitHubReleaseAPI) UpdateRelease(ctx context.Context, p domain.Principal, owner string, repo string, id int64, body []byte) ([]byte, error) {
840	ret := _mock.Called(ctx, p, owner, repo, id, body)
841
842	if len(ret) == 0 {
843		panic("no return value specified for UpdateRelease")
844	}
845
846	var r0 []byte
847	var r1 error
848	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, int64, []byte) ([]byte, error)); ok {
849		return returnFunc(ctx, p, owner, repo, id, body)
850	}
851	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, int64, []byte) []byte); ok {
852		r0 = returnFunc(ctx, p, owner, repo, id, body)
853	} else {
854		if ret.Get(0) != nil {
855			r0 = ret.Get(0).([]byte)
856		}
857	}
858	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, string, string, int64, []byte) error); ok {
859		r1 = returnFunc(ctx, p, owner, repo, id, body)
860	} else {
861		r1 = ret.Error(1)
862	}
863	return r0, r1
864}
865
866// GitHubReleaseAPI_UpdateRelease_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateRelease'
867type GitHubReleaseAPI_UpdateRelease_Call struct {
868	*mock.Call
869}
870
871// UpdateRelease is a helper method to define mock.On call
872//   - ctx context.Context
873//   - p domain.Principal
874//   - owner string
875//   - repo string
876//   - id int64
877//   - body []byte
878func (_e *GitHubReleaseAPI_Expecter) UpdateRelease(ctx any, p any, owner any, repo any, id any, body any) *GitHubReleaseAPI_UpdateRelease_Call {
879	return &GitHubReleaseAPI_UpdateRelease_Call{Call: _e.mock.On("UpdateRelease", ctx, p, owner, repo, id, body)}
880}
881
882func (_c *GitHubReleaseAPI_UpdateRelease_Call) Run(run func(ctx context.Context, p domain.Principal, owner string, repo string, id int64, body []byte)) *GitHubReleaseAPI_UpdateRelease_Call {
883	_c.Call.Run(func(args mock.Arguments) {
884		var arg0 context.Context
885		if args[0] != nil {
886			arg0 = args[0].(context.Context)
887		}
888		var arg1 domain.Principal
889		if args[1] != nil {
890			arg1 = args[1].(domain.Principal)
891		}
892		var arg2 string
893		if args[2] != nil {
894			arg2 = args[2].(string)
895		}
896		var arg3 string
897		if args[3] != nil {
898			arg3 = args[3].(string)
899		}
900		var arg4 int64
901		if args[4] != nil {
902			arg4 = args[4].(int64)
903		}
904		var arg5 []byte
905		if args[5] != nil {
906			arg5 = args[5].([]byte)
907		}
908		run(
909			arg0,
910			arg1,
911			arg2,
912			arg3,
913			arg4,
914			arg5,
915		)
916	})
917	return _c
918}
919
920func (_c *GitHubReleaseAPI_UpdateRelease_Call) Return(bytes []byte, err error) *GitHubReleaseAPI_UpdateRelease_Call {
921	_c.Call.Return(bytes, err)
922	return _c
923}
924
925func (_c *GitHubReleaseAPI_UpdateRelease_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, owner string, repo string, id int64, body []byte) ([]byte, error)) *GitHubReleaseAPI_UpdateRelease_Call {
926	_c.Call.Return(run)
927	return _c
928}
929
930// UploadAsset provides a mock function for the type GitHubReleaseAPI
931func (_mock *GitHubReleaseAPI) UploadAsset(ctx context.Context, p domain.Principal, owner string, repo string, id int64, name string, label string, contentType string, size int64, r io.Reader) ([]byte, error) {
932	ret := _mock.Called(ctx, p, owner, repo, id, name, label, contentType, size, r)
933
934	if len(ret) == 0 {
935		panic("no return value specified for UploadAsset")
936	}
937
938	var r0 []byte
939	var r1 error
940	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, int64, string, string, string, int64, io.Reader) ([]byte, error)); ok {
941		return returnFunc(ctx, p, owner, repo, id, name, label, contentType, size, r)
942	}
943	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, int64, string, string, string, int64, io.Reader) []byte); ok {
944		r0 = returnFunc(ctx, p, owner, repo, id, name, label, contentType, size, r)
945	} else {
946		if ret.Get(0) != nil {
947			r0 = ret.Get(0).([]byte)
948		}
949	}
950	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, string, string, int64, string, string, string, int64, io.Reader) error); ok {
951		r1 = returnFunc(ctx, p, owner, repo, id, name, label, contentType, size, r)
952	} else {
953		r1 = ret.Error(1)
954	}
955	return r0, r1
956}
957
958// GitHubReleaseAPI_UploadAsset_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UploadAsset'
959type GitHubReleaseAPI_UploadAsset_Call struct {
960	*mock.Call
961}
962
963// UploadAsset is a helper method to define mock.On call
964//   - ctx context.Context
965//   - p domain.Principal
966//   - owner string
967//   - repo string
968//   - id int64
969//   - name string
970//   - label string
971//   - contentType string
972//   - size int64
973//   - r io.Reader
974func (_e *GitHubReleaseAPI_Expecter) UploadAsset(ctx any, p any, owner any, repo any, id any, name any, label any, contentType any, size any, r any) *GitHubReleaseAPI_UploadAsset_Call {
975	return &GitHubReleaseAPI_UploadAsset_Call{Call: _e.mock.On("UploadAsset", ctx, p, owner, repo, id, name, label, contentType, size, r)}
976}
977
978func (_c *GitHubReleaseAPI_UploadAsset_Call) Run(run func(ctx context.Context, p domain.Principal, owner string, repo string, id int64, name string, label string, contentType string, size int64, r io.Reader)) *GitHubReleaseAPI_UploadAsset_Call {
979	_c.Call.Run(func(args mock.Arguments) {
980		var arg0 context.Context
981		if args[0] != nil {
982			arg0 = args[0].(context.Context)
983		}
984		var arg1 domain.Principal
985		if args[1] != nil {
986			arg1 = args[1].(domain.Principal)
987		}
988		var arg2 string
989		if args[2] != nil {
990			arg2 = args[2].(string)
991		}
992		var arg3 string
993		if args[3] != nil {
994			arg3 = args[3].(string)
995		}
996		var arg4 int64
997		if args[4] != nil {
998			arg4 = args[4].(int64)
999		}
1000		var arg5 string
1001		if args[5] != nil {
1002			arg5 = args[5].(string)
1003		}
1004		var arg6 string
1005		if args[6] != nil {
1006			arg6 = args[6].(string)
1007		}
1008		var arg7 string
1009		if args[7] != nil {
1010			arg7 = args[7].(string)
1011		}
1012		var arg8 int64
1013		if args[8] != nil {
1014			arg8 = args[8].(int64)
1015		}
1016		var arg9 io.Reader
1017		if args[9] != nil {
1018			arg9 = args[9].(io.Reader)
1019		}
1020		run(
1021			arg0,
1022			arg1,
1023			arg2,
1024			arg3,
1025			arg4,
1026			arg5,
1027			arg6,
1028			arg7,
1029			arg8,
1030			arg9,
1031		)
1032	})
1033	return _c
1034}
1035
1036func (_c *GitHubReleaseAPI_UploadAsset_Call) Return(bytes []byte, err error) *GitHubReleaseAPI_UploadAsset_Call {
1037	_c.Call.Return(bytes, err)
1038	return _c
1039}
1040
1041func (_c *GitHubReleaseAPI_UploadAsset_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, owner string, repo string, id int64, name string, label string, contentType string, size int64, r io.Reader) ([]byte, error)) *GitHubReleaseAPI_UploadAsset_Call {
1042	_c.Call.Return(run)
1043	return _c
1044}

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 4

Tags 45

↑↓ moveenter openesc close