v0.24.0 a261e52

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

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 8

Tags 42

↑↓ moveenter openesc close