detached fda3c2b

CIArtifactFiles.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/ports"
12	mock "github.com/stretchr/testify/mock"
13)
14
15// NewCIArtifactFiles creates a new instance of CIArtifactFiles. 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 NewCIArtifactFiles(t interface {
18	mock.TestingT
19	Cleanup(func())
20}) *CIArtifactFiles {
21	if helper, ok := t.(interface{ Helper() }); ok {
22		helper.Helper()
23	}
24
25	mock := &CIArtifactFiles{}
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// CIArtifactFiles is an autogenerated mock type for the CIArtifactFiles type
39type CIArtifactFiles struct {
40	mock.Mock
41}
42
43type CIArtifactFiles_Expecter struct {
44	mock *mock.Mock
45}
46
47func (_m *CIArtifactFiles) EXPECT() *CIArtifactFiles_Expecter {
48	return &CIArtifactFiles_Expecter{mock: &_m.Mock}
49}
50
51// ArtifactIDs provides a mock function for the type CIArtifactFiles
52func (_mock *CIArtifactFiles) ArtifactIDs(ctx context.Context, runID int64) ([]int64, error) {
53	ret := _mock.Called(ctx, runID)
54
55	if len(ret) == 0 {
56		panic("no return value specified for ArtifactIDs")
57	}
58
59	var r0 []int64
60	var r1 error
61	if returnFunc, ok := ret.Get(0).(func(context.Context, int64) ([]int64, error)); ok {
62		return returnFunc(ctx, runID)
63	}
64	if returnFunc, ok := ret.Get(0).(func(context.Context, int64) []int64); ok {
65		r0 = returnFunc(ctx, runID)
66	} else {
67		if ret.Get(0) != nil {
68			r0 = ret.Get(0).([]int64)
69		}
70	}
71	if returnFunc, ok := ret.Get(1).(func(context.Context, int64) error); ok {
72		r1 = returnFunc(ctx, runID)
73	} else {
74		r1 = ret.Error(1)
75	}
76	return r0, r1
77}
78
79// CIArtifactFiles_ArtifactIDs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ArtifactIDs'
80type CIArtifactFiles_ArtifactIDs_Call struct {
81	*mock.Call
82}
83
84// ArtifactIDs is a helper method to define mock.On call
85//   - ctx context.Context
86//   - runID int64
87func (_e *CIArtifactFiles_Expecter) ArtifactIDs(ctx any, runID any) *CIArtifactFiles_ArtifactIDs_Call {
88	return &CIArtifactFiles_ArtifactIDs_Call{Call: _e.mock.On("ArtifactIDs", ctx, runID)}
89}
90
91func (_c *CIArtifactFiles_ArtifactIDs_Call) Run(run func(ctx context.Context, runID int64)) *CIArtifactFiles_ArtifactIDs_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 int64
98		if args[1] != nil {
99			arg1 = args[1].(int64)
100		}
101		run(
102			arg0,
103			arg1,
104		)
105	})
106	return _c
107}
108
109func (_c *CIArtifactFiles_ArtifactIDs_Call) Return(int64s []int64, err error) *CIArtifactFiles_ArtifactIDs_Call {
110	_c.Call.Return(int64s, err)
111	return _c
112}
113
114func (_c *CIArtifactFiles_ArtifactIDs_Call) RunAndReturn(run func(ctx context.Context, runID int64) ([]int64, error)) *CIArtifactFiles_ArtifactIDs_Call {
115	_c.Call.Return(run)
116	return _c
117}
118
119// Open provides a mock function for the type CIArtifactFiles
120func (_mock *CIArtifactFiles) Open(ctx context.Context, ref ports.CIArtifactRef, offset int64) (io.ReadCloser, error) {
121	ret := _mock.Called(ctx, ref, offset)
122
123	if len(ret) == 0 {
124		panic("no return value specified for Open")
125	}
126
127	var r0 io.ReadCloser
128	var r1 error
129	if returnFunc, ok := ret.Get(0).(func(context.Context, ports.CIArtifactRef, int64) (io.ReadCloser, error)); ok {
130		return returnFunc(ctx, ref, offset)
131	}
132	if returnFunc, ok := ret.Get(0).(func(context.Context, ports.CIArtifactRef, int64) io.ReadCloser); ok {
133		r0 = returnFunc(ctx, ref, offset)
134	} else {
135		if ret.Get(0) != nil {
136			r0 = ret.Get(0).(io.ReadCloser)
137		}
138	}
139	if returnFunc, ok := ret.Get(1).(func(context.Context, ports.CIArtifactRef, int64) error); ok {
140		r1 = returnFunc(ctx, ref, offset)
141	} else {
142		r1 = ret.Error(1)
143	}
144	return r0, r1
145}
146
147// CIArtifactFiles_Open_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Open'
148type CIArtifactFiles_Open_Call struct {
149	*mock.Call
150}
151
152// Open is a helper method to define mock.On call
153//   - ctx context.Context
154//   - ref ports.CIArtifactRef
155//   - offset int64
156func (_e *CIArtifactFiles_Expecter) Open(ctx any, ref any, offset any) *CIArtifactFiles_Open_Call {
157	return &CIArtifactFiles_Open_Call{Call: _e.mock.On("Open", ctx, ref, offset)}
158}
159
160func (_c *CIArtifactFiles_Open_Call) Run(run func(ctx context.Context, ref ports.CIArtifactRef, offset int64)) *CIArtifactFiles_Open_Call {
161	_c.Call.Run(func(args mock.Arguments) {
162		var arg0 context.Context
163		if args[0] != nil {
164			arg0 = args[0].(context.Context)
165		}
166		var arg1 ports.CIArtifactRef
167		if args[1] != nil {
168			arg1 = args[1].(ports.CIArtifactRef)
169		}
170		var arg2 int64
171		if args[2] != nil {
172			arg2 = args[2].(int64)
173		}
174		run(
175			arg0,
176			arg1,
177			arg2,
178		)
179	})
180	return _c
181}
182
183func (_c *CIArtifactFiles_Open_Call) Return(readCloser io.ReadCloser, err error) *CIArtifactFiles_Open_Call {
184	_c.Call.Return(readCloser, err)
185	return _c
186}
187
188func (_c *CIArtifactFiles_Open_Call) RunAndReturn(run func(ctx context.Context, ref ports.CIArtifactRef, offset int64) (io.ReadCloser, error)) *CIArtifactFiles_Open_Call {
189	_c.Call.Return(run)
190	return _c
191}
192
193// Remove provides a mock function for the type CIArtifactFiles
194func (_mock *CIArtifactFiles) Remove(ctx context.Context, ref ports.CIArtifactRef) error {
195	ret := _mock.Called(ctx, ref)
196
197	if len(ret) == 0 {
198		panic("no return value specified for Remove")
199	}
200
201	var r0 error
202	if returnFunc, ok := ret.Get(0).(func(context.Context, ports.CIArtifactRef) error); ok {
203		r0 = returnFunc(ctx, ref)
204	} else {
205		r0 = ret.Error(0)
206	}
207	return r0
208}
209
210// CIArtifactFiles_Remove_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Remove'
211type CIArtifactFiles_Remove_Call struct {
212	*mock.Call
213}
214
215// Remove is a helper method to define mock.On call
216//   - ctx context.Context
217//   - ref ports.CIArtifactRef
218func (_e *CIArtifactFiles_Expecter) Remove(ctx any, ref any) *CIArtifactFiles_Remove_Call {
219	return &CIArtifactFiles_Remove_Call{Call: _e.mock.On("Remove", ctx, ref)}
220}
221
222func (_c *CIArtifactFiles_Remove_Call) Run(run func(ctx context.Context, ref ports.CIArtifactRef)) *CIArtifactFiles_Remove_Call {
223	_c.Call.Run(func(args mock.Arguments) {
224		var arg0 context.Context
225		if args[0] != nil {
226			arg0 = args[0].(context.Context)
227		}
228		var arg1 ports.CIArtifactRef
229		if args[1] != nil {
230			arg1 = args[1].(ports.CIArtifactRef)
231		}
232		run(
233			arg0,
234			arg1,
235		)
236	})
237	return _c
238}
239
240func (_c *CIArtifactFiles_Remove_Call) Return(err error) *CIArtifactFiles_Remove_Call {
241	_c.Call.Return(err)
242	return _c
243}
244
245func (_c *CIArtifactFiles_Remove_Call) RunAndReturn(run func(ctx context.Context, ref ports.CIArtifactRef) error) *CIArtifactFiles_Remove_Call {
246	_c.Call.Return(run)
247	return _c
248}
249
250// RemoveRuns provides a mock function for the type CIArtifactFiles
251func (_mock *CIArtifactFiles) RemoveRuns(ctx context.Context, runIDs []int64) error {
252	ret := _mock.Called(ctx, runIDs)
253
254	if len(ret) == 0 {
255		panic("no return value specified for RemoveRuns")
256	}
257
258	var r0 error
259	if returnFunc, ok := ret.Get(0).(func(context.Context, []int64) error); ok {
260		r0 = returnFunc(ctx, runIDs)
261	} else {
262		r0 = ret.Error(0)
263	}
264	return r0
265}
266
267// CIArtifactFiles_RemoveRuns_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveRuns'
268type CIArtifactFiles_RemoveRuns_Call struct {
269	*mock.Call
270}
271
272// RemoveRuns is a helper method to define mock.On call
273//   - ctx context.Context
274//   - runIDs []int64
275func (_e *CIArtifactFiles_Expecter) RemoveRuns(ctx any, runIDs any) *CIArtifactFiles_RemoveRuns_Call {
276	return &CIArtifactFiles_RemoveRuns_Call{Call: _e.mock.On("RemoveRuns", ctx, runIDs)}
277}
278
279func (_c *CIArtifactFiles_RemoveRuns_Call) Run(run func(ctx context.Context, runIDs []int64)) *CIArtifactFiles_RemoveRuns_Call {
280	_c.Call.Run(func(args mock.Arguments) {
281		var arg0 context.Context
282		if args[0] != nil {
283			arg0 = args[0].(context.Context)
284		}
285		var arg1 []int64
286		if args[1] != nil {
287			arg1 = args[1].([]int64)
288		}
289		run(
290			arg0,
291			arg1,
292		)
293	})
294	return _c
295}
296
297func (_c *CIArtifactFiles_RemoveRuns_Call) Return(err error) *CIArtifactFiles_RemoveRuns_Call {
298	_c.Call.Return(err)
299	return _c
300}
301
302func (_c *CIArtifactFiles_RemoveRuns_Call) RunAndReturn(run func(ctx context.Context, runIDs []int64) error) *CIArtifactFiles_RemoveRuns_Call {
303	_c.Call.Return(run)
304	return _c
305}
306
307// RunIDs provides a mock function for the type CIArtifactFiles
308func (_mock *CIArtifactFiles) RunIDs(ctx context.Context) ([]int64, error) {
309	ret := _mock.Called(ctx)
310
311	if len(ret) == 0 {
312		panic("no return value specified for RunIDs")
313	}
314
315	var r0 []int64
316	var r1 error
317	if returnFunc, ok := ret.Get(0).(func(context.Context) ([]int64, error)); ok {
318		return returnFunc(ctx)
319	}
320	if returnFunc, ok := ret.Get(0).(func(context.Context) []int64); ok {
321		r0 = returnFunc(ctx)
322	} else {
323		if ret.Get(0) != nil {
324			r0 = ret.Get(0).([]int64)
325		}
326	}
327	if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
328		r1 = returnFunc(ctx)
329	} else {
330		r1 = ret.Error(1)
331	}
332	return r0, r1
333}
334
335// CIArtifactFiles_RunIDs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RunIDs'
336type CIArtifactFiles_RunIDs_Call struct {
337	*mock.Call
338}
339
340// RunIDs is a helper method to define mock.On call
341//   - ctx context.Context
342func (_e *CIArtifactFiles_Expecter) RunIDs(ctx any) *CIArtifactFiles_RunIDs_Call {
343	return &CIArtifactFiles_RunIDs_Call{Call: _e.mock.On("RunIDs", ctx)}
344}
345
346func (_c *CIArtifactFiles_RunIDs_Call) Run(run func(ctx context.Context)) *CIArtifactFiles_RunIDs_Call {
347	_c.Call.Run(func(args mock.Arguments) {
348		var arg0 context.Context
349		if args[0] != nil {
350			arg0 = args[0].(context.Context)
351		}
352		run(
353			arg0,
354		)
355	})
356	return _c
357}
358
359func (_c *CIArtifactFiles_RunIDs_Call) Return(int64s []int64, err error) *CIArtifactFiles_RunIDs_Call {
360	_c.Call.Return(int64s, err)
361	return _c
362}
363
364func (_c *CIArtifactFiles_RunIDs_Call) RunAndReturn(run func(ctx context.Context) ([]int64, error)) *CIArtifactFiles_RunIDs_Call {
365	_c.Call.Return(run)
366	return _c
367}

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