v0.14.0 815fb98

RunService.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// NewRunService creates a new instance of RunService. 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 NewRunService(t interface {
18	mock.TestingT
19	Cleanup(func())
20}) *RunService {
21	if helper, ok := t.(interface{ Helper() }); ok {
22		helper.Helper()
23	}
24
25	mock := &RunService{}
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// RunService is an autogenerated mock type for the RunService type
39type RunService struct {
40	mock.Mock
41}
42
43type RunService_Expecter struct {
44	mock *mock.Mock
45}
46
47func (_m *RunService) EXPECT() *RunService_Expecter {
48	return &RunService_Expecter{mock: &_m.Mock}
49}
50
51// CancelRun provides a mock function for the type RunService
52func (_mock *RunService) CancelRun(ctx context.Context, p domain.Principal, repo domain.RepoName, runID int64) (domain.CIRun, error) {
53	ret := _mock.Called(ctx, p, repo, runID)
54
55	if len(ret) == 0 {
56		panic("no return value specified for CancelRun")
57	}
58
59	var r0 domain.CIRun
60	var r1 error
61	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64) (domain.CIRun, error)); ok {
62		return returnFunc(ctx, p, repo, runID)
63	}
64	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64) domain.CIRun); ok {
65		r0 = returnFunc(ctx, p, repo, runID)
66	} else {
67		r0 = ret.Get(0).(domain.CIRun)
68	}
69	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, int64) error); ok {
70		r1 = returnFunc(ctx, p, repo, runID)
71	} else {
72		r1 = ret.Error(1)
73	}
74	return r0, r1
75}
76
77// RunService_CancelRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CancelRun'
78type RunService_CancelRun_Call struct {
79	*mock.Call
80}
81
82// CancelRun is a helper method to define mock.On call
83//   - ctx context.Context
84//   - p domain.Principal
85//   - repo domain.RepoName
86//   - runID int64
87func (_e *RunService_Expecter) CancelRun(ctx any, p any, repo any, runID any) *RunService_CancelRun_Call {
88	return &RunService_CancelRun_Call{Call: _e.mock.On("CancelRun", ctx, p, repo, runID)}
89}
90
91func (_c *RunService_CancelRun_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, runID int64)) *RunService_CancelRun_Call {
92	_c.Call.Run(func(args mock.Arguments) {
93		var arg0 context.Context
94		if args[0] != nil {
95			arg0 = args[0].(context.Context)
96		}
97		var arg1 domain.Principal
98		if args[1] != nil {
99			arg1 = args[1].(domain.Principal)
100		}
101		var arg2 domain.RepoName
102		if args[2] != nil {
103			arg2 = args[2].(domain.RepoName)
104		}
105		var arg3 int64
106		if args[3] != nil {
107			arg3 = args[3].(int64)
108		}
109		run(
110			arg0,
111			arg1,
112			arg2,
113			arg3,
114		)
115	})
116	return _c
117}
118
119func (_c *RunService_CancelRun_Call) Return(cIRun domain.CIRun, err error) *RunService_CancelRun_Call {
120	_c.Call.Return(cIRun, err)
121	return _c
122}
123
124func (_c *RunService_CancelRun_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, runID int64) (domain.CIRun, error)) *RunService_CancelRun_Call {
125	_c.Call.Return(run)
126	return _c
127}
128
129// GetJob provides a mock function for the type RunService
130func (_mock *RunService) GetJob(ctx context.Context, p domain.Principal, repo domain.RepoName, jobID string, attempt int32) (ports.JobView, error) {
131	ret := _mock.Called(ctx, p, repo, jobID, attempt)
132
133	if len(ret) == 0 {
134		panic("no return value specified for GetJob")
135	}
136
137	var r0 ports.JobView
138	var r1 error
139	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, string, int32) (ports.JobView, error)); ok {
140		return returnFunc(ctx, p, repo, jobID, attempt)
141	}
142	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, string, int32) ports.JobView); ok {
143		r0 = returnFunc(ctx, p, repo, jobID, attempt)
144	} else {
145		r0 = ret.Get(0).(ports.JobView)
146	}
147	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, string, int32) error); ok {
148		r1 = returnFunc(ctx, p, repo, jobID, attempt)
149	} else {
150		r1 = ret.Error(1)
151	}
152	return r0, r1
153}
154
155// RunService_GetJob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetJob'
156type RunService_GetJob_Call struct {
157	*mock.Call
158}
159
160// GetJob is a helper method to define mock.On call
161//   - ctx context.Context
162//   - p domain.Principal
163//   - repo domain.RepoName
164//   - jobID string
165//   - attempt int32
166func (_e *RunService_Expecter) GetJob(ctx any, p any, repo any, jobID any, attempt any) *RunService_GetJob_Call {
167	return &RunService_GetJob_Call{Call: _e.mock.On("GetJob", ctx, p, repo, jobID, attempt)}
168}
169
170func (_c *RunService_GetJob_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, jobID string, attempt int32)) *RunService_GetJob_Call {
171	_c.Call.Run(func(args mock.Arguments) {
172		var arg0 context.Context
173		if args[0] != nil {
174			arg0 = args[0].(context.Context)
175		}
176		var arg1 domain.Principal
177		if args[1] != nil {
178			arg1 = args[1].(domain.Principal)
179		}
180		var arg2 domain.RepoName
181		if args[2] != nil {
182			arg2 = args[2].(domain.RepoName)
183		}
184		var arg3 string
185		if args[3] != nil {
186			arg3 = args[3].(string)
187		}
188		var arg4 int32
189		if args[4] != nil {
190			arg4 = args[4].(int32)
191		}
192		run(
193			arg0,
194			arg1,
195			arg2,
196			arg3,
197			arg4,
198		)
199	})
200	return _c
201}
202
203func (_c *RunService_GetJob_Call) Return(jobView ports.JobView, err error) *RunService_GetJob_Call {
204	_c.Call.Return(jobView, err)
205	return _c
206}
207
208func (_c *RunService_GetJob_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, jobID string, attempt int32) (ports.JobView, error)) *RunService_GetJob_Call {
209	_c.Call.Return(run)
210	return _c
211}
212
213// GetJobLog provides a mock function for the type RunService
214func (_mock *RunService) GetJobLog(ctx context.Context, p domain.Principal, repo domain.RepoName, params ports.GetJobLogParams, send func(ports.LogBatch) error) error {
215	ret := _mock.Called(ctx, p, repo, params, send)
216
217	if len(ret) == 0 {
218		panic("no return value specified for GetJobLog")
219	}
220
221	var r0 error
222	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, ports.GetJobLogParams, func(ports.LogBatch) error) error); ok {
223		r0 = returnFunc(ctx, p, repo, params, send)
224	} else {
225		r0 = ret.Error(0)
226	}
227	return r0
228}
229
230// RunService_GetJobLog_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetJobLog'
231type RunService_GetJobLog_Call struct {
232	*mock.Call
233}
234
235// GetJobLog is a helper method to define mock.On call
236//   - ctx context.Context
237//   - p domain.Principal
238//   - repo domain.RepoName
239//   - params ports.GetJobLogParams
240//   - send func(ports.LogBatch) error
241func (_e *RunService_Expecter) GetJobLog(ctx any, p any, repo any, params any, send any) *RunService_GetJobLog_Call {
242	return &RunService_GetJobLog_Call{Call: _e.mock.On("GetJobLog", ctx, p, repo, params, send)}
243}
244
245func (_c *RunService_GetJobLog_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, params ports.GetJobLogParams, send func(ports.LogBatch) error)) *RunService_GetJobLog_Call {
246	_c.Call.Run(func(args mock.Arguments) {
247		var arg0 context.Context
248		if args[0] != nil {
249			arg0 = args[0].(context.Context)
250		}
251		var arg1 domain.Principal
252		if args[1] != nil {
253			arg1 = args[1].(domain.Principal)
254		}
255		var arg2 domain.RepoName
256		if args[2] != nil {
257			arg2 = args[2].(domain.RepoName)
258		}
259		var arg3 ports.GetJobLogParams
260		if args[3] != nil {
261			arg3 = args[3].(ports.GetJobLogParams)
262		}
263		var arg4 func(ports.LogBatch) error
264		if args[4] != nil {
265			arg4 = args[4].(func(ports.LogBatch) error)
266		}
267		run(
268			arg0,
269			arg1,
270			arg2,
271			arg3,
272			arg4,
273		)
274	})
275	return _c
276}
277
278func (_c *RunService_GetJobLog_Call) Return(err error) *RunService_GetJobLog_Call {
279	_c.Call.Return(err)
280	return _c
281}
282
283func (_c *RunService_GetJobLog_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, params ports.GetJobLogParams, send func(ports.LogBatch) error) error) *RunService_GetJobLog_Call {
284	_c.Call.Return(run)
285	return _c
286}
287
288// GetRun provides a mock function for the type RunService
289func (_mock *RunService) GetRun(ctx context.Context, p domain.Principal, repo domain.RepoName, runID int64, attempt int32) (ports.RunDetail, error) {
290	ret := _mock.Called(ctx, p, repo, runID, attempt)
291
292	if len(ret) == 0 {
293		panic("no return value specified for GetRun")
294	}
295
296	var r0 ports.RunDetail
297	var r1 error
298	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, int32) (ports.RunDetail, error)); ok {
299		return returnFunc(ctx, p, repo, runID, attempt)
300	}
301	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, int32) ports.RunDetail); ok {
302		r0 = returnFunc(ctx, p, repo, runID, attempt)
303	} else {
304		r0 = ret.Get(0).(ports.RunDetail)
305	}
306	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, int64, int32) error); ok {
307		r1 = returnFunc(ctx, p, repo, runID, attempt)
308	} else {
309		r1 = ret.Error(1)
310	}
311	return r0, r1
312}
313
314// RunService_GetRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRun'
315type RunService_GetRun_Call struct {
316	*mock.Call
317}
318
319// GetRun is a helper method to define mock.On call
320//   - ctx context.Context
321//   - p domain.Principal
322//   - repo domain.RepoName
323//   - runID int64
324//   - attempt int32
325func (_e *RunService_Expecter) GetRun(ctx any, p any, repo any, runID any, attempt any) *RunService_GetRun_Call {
326	return &RunService_GetRun_Call{Call: _e.mock.On("GetRun", ctx, p, repo, runID, attempt)}
327}
328
329func (_c *RunService_GetRun_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, runID int64, attempt int32)) *RunService_GetRun_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 domain.RepoName
340		if args[2] != nil {
341			arg2 = args[2].(domain.RepoName)
342		}
343		var arg3 int64
344		if args[3] != nil {
345			arg3 = args[3].(int64)
346		}
347		var arg4 int32
348		if args[4] != nil {
349			arg4 = args[4].(int32)
350		}
351		run(
352			arg0,
353			arg1,
354			arg2,
355			arg3,
356			arg4,
357		)
358	})
359	return _c
360}
361
362func (_c *RunService_GetRun_Call) Return(runDetail ports.RunDetail, err error) *RunService_GetRun_Call {
363	_c.Call.Return(runDetail, err)
364	return _c
365}
366
367func (_c *RunService_GetRun_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, runID int64, attempt int32) (ports.RunDetail, error)) *RunService_GetRun_Call {
368	_c.Call.Return(run)
369	return _c
370}
371
372// GetStepSummaries provides a mock function for the type RunService
373func (_mock *RunService) GetStepSummaries(ctx context.Context, p domain.Principal, repo domain.RepoName, jobID string, attempt int32, maxBytes int64) (ports.SummaryList, error) {
374	ret := _mock.Called(ctx, p, repo, jobID, attempt, maxBytes)
375
376	if len(ret) == 0 {
377		panic("no return value specified for GetStepSummaries")
378	}
379
380	var r0 ports.SummaryList
381	var r1 error
382	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, string, int32, int64) (ports.SummaryList, error)); ok {
383		return returnFunc(ctx, p, repo, jobID, attempt, maxBytes)
384	}
385	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, string, int32, int64) ports.SummaryList); ok {
386		r0 = returnFunc(ctx, p, repo, jobID, attempt, maxBytes)
387	} else {
388		r0 = ret.Get(0).(ports.SummaryList)
389	}
390	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, string, int32, int64) error); ok {
391		r1 = returnFunc(ctx, p, repo, jobID, attempt, maxBytes)
392	} else {
393		r1 = ret.Error(1)
394	}
395	return r0, r1
396}
397
398// RunService_GetStepSummaries_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStepSummaries'
399type RunService_GetStepSummaries_Call struct {
400	*mock.Call
401}
402
403// GetStepSummaries is a helper method to define mock.On call
404//   - ctx context.Context
405//   - p domain.Principal
406//   - repo domain.RepoName
407//   - jobID string
408//   - attempt int32
409//   - maxBytes int64
410func (_e *RunService_Expecter) GetStepSummaries(ctx any, p any, repo any, jobID any, attempt any, maxBytes any) *RunService_GetStepSummaries_Call {
411	return &RunService_GetStepSummaries_Call{Call: _e.mock.On("GetStepSummaries", ctx, p, repo, jobID, attempt, maxBytes)}
412}
413
414func (_c *RunService_GetStepSummaries_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, jobID string, attempt int32, maxBytes int64)) *RunService_GetStepSummaries_Call {
415	_c.Call.Run(func(args mock.Arguments) {
416		var arg0 context.Context
417		if args[0] != nil {
418			arg0 = args[0].(context.Context)
419		}
420		var arg1 domain.Principal
421		if args[1] != nil {
422			arg1 = args[1].(domain.Principal)
423		}
424		var arg2 domain.RepoName
425		if args[2] != nil {
426			arg2 = args[2].(domain.RepoName)
427		}
428		var arg3 string
429		if args[3] != nil {
430			arg3 = args[3].(string)
431		}
432		var arg4 int32
433		if args[4] != nil {
434			arg4 = args[4].(int32)
435		}
436		var arg5 int64
437		if args[5] != nil {
438			arg5 = args[5].(int64)
439		}
440		run(
441			arg0,
442			arg1,
443			arg2,
444			arg3,
445			arg4,
446			arg5,
447		)
448	})
449	return _c
450}
451
452func (_c *RunService_GetStepSummaries_Call) Return(summaryList ports.SummaryList, err error) *RunService_GetStepSummaries_Call {
453	_c.Call.Return(summaryList, err)
454	return _c
455}
456
457func (_c *RunService_GetStepSummaries_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, jobID string, attempt int32, maxBytes int64) (ports.SummaryList, error)) *RunService_GetStepSummaries_Call {
458	_c.Call.Return(run)
459	return _c
460}
461
462// ListAnnotations provides a mock function for the type RunService
463func (_mock *RunService) ListAnnotations(ctx context.Context, p domain.Principal, repo domain.RepoName, runID int64, attempt int32, jobID string) (ports.AnnotationList, error) {
464	ret := _mock.Called(ctx, p, repo, runID, attempt, jobID)
465
466	if len(ret) == 0 {
467		panic("no return value specified for ListAnnotations")
468	}
469
470	var r0 ports.AnnotationList
471	var r1 error
472	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, int32, string) (ports.AnnotationList, error)); ok {
473		return returnFunc(ctx, p, repo, runID, attempt, jobID)
474	}
475	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, int32, string) ports.AnnotationList); ok {
476		r0 = returnFunc(ctx, p, repo, runID, attempt, jobID)
477	} else {
478		r0 = ret.Get(0).(ports.AnnotationList)
479	}
480	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, int64, int32, string) error); ok {
481		r1 = returnFunc(ctx, p, repo, runID, attempt, jobID)
482	} else {
483		r1 = ret.Error(1)
484	}
485	return r0, r1
486}
487
488// RunService_ListAnnotations_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAnnotations'
489type RunService_ListAnnotations_Call struct {
490	*mock.Call
491}
492
493// ListAnnotations is a helper method to define mock.On call
494//   - ctx context.Context
495//   - p domain.Principal
496//   - repo domain.RepoName
497//   - runID int64
498//   - attempt int32
499//   - jobID string
500func (_e *RunService_Expecter) ListAnnotations(ctx any, p any, repo any, runID any, attempt any, jobID any) *RunService_ListAnnotations_Call {
501	return &RunService_ListAnnotations_Call{Call: _e.mock.On("ListAnnotations", ctx, p, repo, runID, attempt, jobID)}
502}
503
504func (_c *RunService_ListAnnotations_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, runID int64, attempt int32, jobID string)) *RunService_ListAnnotations_Call {
505	_c.Call.Run(func(args mock.Arguments) {
506		var arg0 context.Context
507		if args[0] != nil {
508			arg0 = args[0].(context.Context)
509		}
510		var arg1 domain.Principal
511		if args[1] != nil {
512			arg1 = args[1].(domain.Principal)
513		}
514		var arg2 domain.RepoName
515		if args[2] != nil {
516			arg2 = args[2].(domain.RepoName)
517		}
518		var arg3 int64
519		if args[3] != nil {
520			arg3 = args[3].(int64)
521		}
522		var arg4 int32
523		if args[4] != nil {
524			arg4 = args[4].(int32)
525		}
526		var arg5 string
527		if args[5] != nil {
528			arg5 = args[5].(string)
529		}
530		run(
531			arg0,
532			arg1,
533			arg2,
534			arg3,
535			arg4,
536			arg5,
537		)
538	})
539	return _c
540}
541
542func (_c *RunService_ListAnnotations_Call) Return(annotationList ports.AnnotationList, err error) *RunService_ListAnnotations_Call {
543	_c.Call.Return(annotationList, err)
544	return _c
545}
546
547func (_c *RunService_ListAnnotations_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, runID int64, attempt int32, jobID string) (ports.AnnotationList, error)) *RunService_ListAnnotations_Call {
548	_c.Call.Return(run)
549	return _c
550}
551
552// ListChecks provides a mock function for the type RunService
553func (_mock *RunService) ListChecks(ctx context.Context, p domain.Principal, repo domain.RepoName, sha string) (ports.ChecksResult, error) {
554	ret := _mock.Called(ctx, p, repo, sha)
555
556	if len(ret) == 0 {
557		panic("no return value specified for ListChecks")
558	}
559
560	var r0 ports.ChecksResult
561	var r1 error
562	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, string) (ports.ChecksResult, error)); ok {
563		return returnFunc(ctx, p, repo, sha)
564	}
565	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, string) ports.ChecksResult); ok {
566		r0 = returnFunc(ctx, p, repo, sha)
567	} else {
568		r0 = ret.Get(0).(ports.ChecksResult)
569	}
570	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, string) error); ok {
571		r1 = returnFunc(ctx, p, repo, sha)
572	} else {
573		r1 = ret.Error(1)
574	}
575	return r0, r1
576}
577
578// RunService_ListChecks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListChecks'
579type RunService_ListChecks_Call struct {
580	*mock.Call
581}
582
583// ListChecks is a helper method to define mock.On call
584//   - ctx context.Context
585//   - p domain.Principal
586//   - repo domain.RepoName
587//   - sha string
588func (_e *RunService_Expecter) ListChecks(ctx any, p any, repo any, sha any) *RunService_ListChecks_Call {
589	return &RunService_ListChecks_Call{Call: _e.mock.On("ListChecks", ctx, p, repo, sha)}
590}
591
592func (_c *RunService_ListChecks_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, sha string)) *RunService_ListChecks_Call {
593	_c.Call.Run(func(args mock.Arguments) {
594		var arg0 context.Context
595		if args[0] != nil {
596			arg0 = args[0].(context.Context)
597		}
598		var arg1 domain.Principal
599		if args[1] != nil {
600			arg1 = args[1].(domain.Principal)
601		}
602		var arg2 domain.RepoName
603		if args[2] != nil {
604			arg2 = args[2].(domain.RepoName)
605		}
606		var arg3 string
607		if args[3] != nil {
608			arg3 = args[3].(string)
609		}
610		run(
611			arg0,
612			arg1,
613			arg2,
614			arg3,
615		)
616	})
617	return _c
618}
619
620func (_c *RunService_ListChecks_Call) Return(checksResult ports.ChecksResult, err error) *RunService_ListChecks_Call {
621	_c.Call.Return(checksResult, err)
622	return _c
623}
624
625func (_c *RunService_ListChecks_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, sha string) (ports.ChecksResult, error)) *RunService_ListChecks_Call {
626	_c.Call.Return(run)
627	return _c
628}
629
630// ListRunners provides a mock function for the type RunService
631func (_mock *RunService) ListRunners(ctx context.Context, p domain.Principal, size int, token string) (ports.RunnerPage, error) {
632	ret := _mock.Called(ctx, p, size, token)
633
634	if len(ret) == 0 {
635		panic("no return value specified for ListRunners")
636	}
637
638	var r0 ports.RunnerPage
639	var r1 error
640	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, int, string) (ports.RunnerPage, error)); ok {
641		return returnFunc(ctx, p, size, token)
642	}
643	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, int, string) ports.RunnerPage); ok {
644		r0 = returnFunc(ctx, p, size, token)
645	} else {
646		r0 = ret.Get(0).(ports.RunnerPage)
647	}
648	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, int, string) error); ok {
649		r1 = returnFunc(ctx, p, size, token)
650	} else {
651		r1 = ret.Error(1)
652	}
653	return r0, r1
654}
655
656// RunService_ListRunners_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRunners'
657type RunService_ListRunners_Call struct {
658	*mock.Call
659}
660
661// ListRunners is a helper method to define mock.On call
662//   - ctx context.Context
663//   - p domain.Principal
664//   - size int
665//   - token string
666func (_e *RunService_Expecter) ListRunners(ctx any, p any, size any, token any) *RunService_ListRunners_Call {
667	return &RunService_ListRunners_Call{Call: _e.mock.On("ListRunners", ctx, p, size, token)}
668}
669
670func (_c *RunService_ListRunners_Call) Run(run func(ctx context.Context, p domain.Principal, size int, token string)) *RunService_ListRunners_Call {
671	_c.Call.Run(func(args mock.Arguments) {
672		var arg0 context.Context
673		if args[0] != nil {
674			arg0 = args[0].(context.Context)
675		}
676		var arg1 domain.Principal
677		if args[1] != nil {
678			arg1 = args[1].(domain.Principal)
679		}
680		var arg2 int
681		if args[2] != nil {
682			arg2 = args[2].(int)
683		}
684		var arg3 string
685		if args[3] != nil {
686			arg3 = args[3].(string)
687		}
688		run(
689			arg0,
690			arg1,
691			arg2,
692			arg3,
693		)
694	})
695	return _c
696}
697
698func (_c *RunService_ListRunners_Call) Return(runnerPage ports.RunnerPage, err error) *RunService_ListRunners_Call {
699	_c.Call.Return(runnerPage, err)
700	return _c
701}
702
703func (_c *RunService_ListRunners_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, size int, token string) (ports.RunnerPage, error)) *RunService_ListRunners_Call {
704	_c.Call.Return(run)
705	return _c
706}
707
708// ListRuns provides a mock function for the type RunService
709func (_mock *RunService) ListRuns(ctx context.Context, p domain.Principal, repo domain.RepoName, params ports.ListRunsParams) (ports.RunPage, error) {
710	ret := _mock.Called(ctx, p, repo, params)
711
712	if len(ret) == 0 {
713		panic("no return value specified for ListRuns")
714	}
715
716	var r0 ports.RunPage
717	var r1 error
718	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, ports.ListRunsParams) (ports.RunPage, error)); ok {
719		return returnFunc(ctx, p, repo, params)
720	}
721	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, ports.ListRunsParams) ports.RunPage); ok {
722		r0 = returnFunc(ctx, p, repo, params)
723	} else {
724		r0 = ret.Get(0).(ports.RunPage)
725	}
726	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, ports.ListRunsParams) error); ok {
727		r1 = returnFunc(ctx, p, repo, params)
728	} else {
729		r1 = ret.Error(1)
730	}
731	return r0, r1
732}
733
734// RunService_ListRuns_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRuns'
735type RunService_ListRuns_Call struct {
736	*mock.Call
737}
738
739// ListRuns is a helper method to define mock.On call
740//   - ctx context.Context
741//   - p domain.Principal
742//   - repo domain.RepoName
743//   - params ports.ListRunsParams
744func (_e *RunService_Expecter) ListRuns(ctx any, p any, repo any, params any) *RunService_ListRuns_Call {
745	return &RunService_ListRuns_Call{Call: _e.mock.On("ListRuns", ctx, p, repo, params)}
746}
747
748func (_c *RunService_ListRuns_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, params ports.ListRunsParams)) *RunService_ListRuns_Call {
749	_c.Call.Run(func(args mock.Arguments) {
750		var arg0 context.Context
751		if args[0] != nil {
752			arg0 = args[0].(context.Context)
753		}
754		var arg1 domain.Principal
755		if args[1] != nil {
756			arg1 = args[1].(domain.Principal)
757		}
758		var arg2 domain.RepoName
759		if args[2] != nil {
760			arg2 = args[2].(domain.RepoName)
761		}
762		var arg3 ports.ListRunsParams
763		if args[3] != nil {
764			arg3 = args[3].(ports.ListRunsParams)
765		}
766		run(
767			arg0,
768			arg1,
769			arg2,
770			arg3,
771		)
772	})
773	return _c
774}
775
776func (_c *RunService_ListRuns_Call) Return(runPage ports.RunPage, err error) *RunService_ListRuns_Call {
777	_c.Call.Return(runPage, err)
778	return _c
779}
780
781func (_c *RunService_ListRuns_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, params ports.ListRunsParams) (ports.RunPage, error)) *RunService_ListRuns_Call {
782	_c.Call.Return(run)
783	return _c
784}
785
786// RemoveRunner provides a mock function for the type RunService
787func (_mock *RunService) RemoveRunner(ctx context.Context, p domain.Principal, id string) error {
788	ret := _mock.Called(ctx, p, id)
789
790	if len(ret) == 0 {
791		panic("no return value specified for RemoveRunner")
792	}
793
794	var r0 error
795	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string) error); ok {
796		r0 = returnFunc(ctx, p, id)
797	} else {
798		r0 = ret.Error(0)
799	}
800	return r0
801}
802
803// RunService_RemoveRunner_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveRunner'
804type RunService_RemoveRunner_Call struct {
805	*mock.Call
806}
807
808// RemoveRunner is a helper method to define mock.On call
809//   - ctx context.Context
810//   - p domain.Principal
811//   - id string
812func (_e *RunService_Expecter) RemoveRunner(ctx any, p any, id any) *RunService_RemoveRunner_Call {
813	return &RunService_RemoveRunner_Call{Call: _e.mock.On("RemoveRunner", ctx, p, id)}
814}
815
816func (_c *RunService_RemoveRunner_Call) Run(run func(ctx context.Context, p domain.Principal, id string)) *RunService_RemoveRunner_Call {
817	_c.Call.Run(func(args mock.Arguments) {
818		var arg0 context.Context
819		if args[0] != nil {
820			arg0 = args[0].(context.Context)
821		}
822		var arg1 domain.Principal
823		if args[1] != nil {
824			arg1 = args[1].(domain.Principal)
825		}
826		var arg2 string
827		if args[2] != nil {
828			arg2 = args[2].(string)
829		}
830		run(
831			arg0,
832			arg1,
833			arg2,
834		)
835	})
836	return _c
837}
838
839func (_c *RunService_RemoveRunner_Call) Return(err error) *RunService_RemoveRunner_Call {
840	_c.Call.Return(err)
841	return _c
842}
843
844func (_c *RunService_RemoveRunner_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, id string) error) *RunService_RemoveRunner_Call {
845	_c.Call.Return(run)
846	return _c
847}
848
849// RerunRun provides a mock function for the type RunService
850func (_mock *RunService) RerunRun(ctx context.Context, p domain.Principal, repo domain.RepoName, runID int64, failedOnly bool) (domain.CIRun, error) {
851	ret := _mock.Called(ctx, p, repo, runID, failedOnly)
852
853	if len(ret) == 0 {
854		panic("no return value specified for RerunRun")
855	}
856
857	var r0 domain.CIRun
858	var r1 error
859	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, bool) (domain.CIRun, error)); ok {
860		return returnFunc(ctx, p, repo, runID, failedOnly)
861	}
862	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, bool) domain.CIRun); ok {
863		r0 = returnFunc(ctx, p, repo, runID, failedOnly)
864	} else {
865		r0 = ret.Get(0).(domain.CIRun)
866	}
867	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, int64, bool) error); ok {
868		r1 = returnFunc(ctx, p, repo, runID, failedOnly)
869	} else {
870		r1 = ret.Error(1)
871	}
872	return r0, r1
873}
874
875// RunService_RerunRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RerunRun'
876type RunService_RerunRun_Call struct {
877	*mock.Call
878}
879
880// RerunRun is a helper method to define mock.On call
881//   - ctx context.Context
882//   - p domain.Principal
883//   - repo domain.RepoName
884//   - runID int64
885//   - failedOnly bool
886func (_e *RunService_Expecter) RerunRun(ctx any, p any, repo any, runID any, failedOnly any) *RunService_RerunRun_Call {
887	return &RunService_RerunRun_Call{Call: _e.mock.On("RerunRun", ctx, p, repo, runID, failedOnly)}
888}
889
890func (_c *RunService_RerunRun_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, runID int64, failedOnly bool)) *RunService_RerunRun_Call {
891	_c.Call.Run(func(args mock.Arguments) {
892		var arg0 context.Context
893		if args[0] != nil {
894			arg0 = args[0].(context.Context)
895		}
896		var arg1 domain.Principal
897		if args[1] != nil {
898			arg1 = args[1].(domain.Principal)
899		}
900		var arg2 domain.RepoName
901		if args[2] != nil {
902			arg2 = args[2].(domain.RepoName)
903		}
904		var arg3 int64
905		if args[3] != nil {
906			arg3 = args[3].(int64)
907		}
908		var arg4 bool
909		if args[4] != nil {
910			arg4 = args[4].(bool)
911		}
912		run(
913			arg0,
914			arg1,
915			arg2,
916			arg3,
917			arg4,
918		)
919	})
920	return _c
921}
922
923func (_c *RunService_RerunRun_Call) Return(cIRun domain.CIRun, err error) *RunService_RerunRun_Call {
924	_c.Call.Return(cIRun, err)
925	return _c
926}
927
928func (_c *RunService_RerunRun_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, runID int64, failedOnly bool) (domain.CIRun, error)) *RunService_RerunRun_Call {
929	_c.Call.Return(run)
930	return _c
931}

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