mock_blob_storage.go RawHistoryFolder

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

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 7

Tags 106

↑↓ moveenter openesc close