main 5041353

favicon_service.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	mock "github.com/stretchr/testify/mock"
11)
12
13// NewMockFaviconService creates a new instance of MockFaviconService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
14// The first argument is typically a *testing.T value.
15func NewMockFaviconService(t interface {
16	mock.TestingT
17	Cleanup(func())
18}) *MockFaviconService {
19	mock := &MockFaviconService{}
20	mock.Mock.Test(t)
21
22	t.Cleanup(func() { mock.AssertExpectations(t) })
23
24	return mock
25}
26
27// MockFaviconService is an autogenerated mock type for the FaviconService type
28type MockFaviconService struct {
29	mock.Mock
30}
31
32type MockFaviconService_Expecter struct {
33	mock *mock.Mock
34}
35
36func (_m *MockFaviconService) EXPECT() *MockFaviconService_Expecter {
37	return &MockFaviconService_Expecter{mock: &_m.Mock}
38}
39
40// Close provides a mock function for the type MockFaviconService
41func (_mock *MockFaviconService) Close() {
42	_mock.Called()
43	return
44}
45
46// MockFaviconService_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
47type MockFaviconService_Close_Call struct {
48	*mock.Call
49}
50
51// Close is a helper method to define mock.On call
52func (_e *MockFaviconService_Expecter) Close() *MockFaviconService_Close_Call {
53	return &MockFaviconService_Close_Call{Call: _e.mock.On("Close")}
54}
55
56func (_c *MockFaviconService_Close_Call) Run(run func()) *MockFaviconService_Close_Call {
57	_c.Call.Run(func(args mock.Arguments) {
58		run()
59	})
60	return _c
61}
62
63func (_c *MockFaviconService_Close_Call) Return() *MockFaviconService_Close_Call {
64	_c.Call.Return()
65	return _c
66}
67
68func (_c *MockFaviconService_Close_Call) RunAndReturn(run func()) *MockFaviconService_Close_Call {
69	_c.Run(run)
70	return _c
71}
72
73// DiskPathPNG provides a mock function for the type MockFaviconService
74func (_mock *MockFaviconService) DiskPathPNG(domain string) string {
75	ret := _mock.Called(domain)
76
77	if len(ret) == 0 {
78		panic("no return value specified for DiskPathPNG")
79	}
80
81	var r0 string
82	if returnFunc, ok := ret.Get(0).(func(string) string); ok {
83		r0 = returnFunc(domain)
84	} else {
85		r0 = ret.Get(0).(string)
86	}
87	return r0
88}
89
90// MockFaviconService_DiskPathPNG_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DiskPathPNG'
91type MockFaviconService_DiskPathPNG_Call struct {
92	*mock.Call
93}
94
95// DiskPathPNG is a helper method to define mock.On call
96//   - domain string
97func (_e *MockFaviconService_Expecter) DiskPathPNG(domain any) *MockFaviconService_DiskPathPNG_Call {
98	return &MockFaviconService_DiskPathPNG_Call{Call: _e.mock.On("DiskPathPNG", domain)}
99}
100
101func (_c *MockFaviconService_DiskPathPNG_Call) Run(run func(domain string)) *MockFaviconService_DiskPathPNG_Call {
102	_c.Call.Run(func(args mock.Arguments) {
103		var arg0 string
104		if args[0] != nil {
105			arg0 = args[0].(string)
106		}
107		run(
108			arg0,
109		)
110	})
111	return _c
112}
113
114func (_c *MockFaviconService_DiskPathPNG_Call) Return(s string) *MockFaviconService_DiskPathPNG_Call {
115	_c.Call.Return(s)
116	return _c
117}
118
119func (_c *MockFaviconService_DiskPathPNG_Call) RunAndReturn(run func(domain string) string) *MockFaviconService_DiskPathPNG_Call {
120	_c.Call.Return(run)
121	return _c
122}
123
124// DiskPathPNGSized provides a mock function for the type MockFaviconService
125func (_mock *MockFaviconService) DiskPathPNGSized(domain string, size int) string {
126	ret := _mock.Called(domain, size)
127
128	if len(ret) == 0 {
129		panic("no return value specified for DiskPathPNGSized")
130	}
131
132	var r0 string
133	if returnFunc, ok := ret.Get(0).(func(string, int) string); ok {
134		r0 = returnFunc(domain, size)
135	} else {
136		r0 = ret.Get(0).(string)
137	}
138	return r0
139}
140
141// MockFaviconService_DiskPathPNGSized_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DiskPathPNGSized'
142type MockFaviconService_DiskPathPNGSized_Call struct {
143	*mock.Call
144}
145
146// DiskPathPNGSized is a helper method to define mock.On call
147//   - domain string
148//   - size int
149func (_e *MockFaviconService_Expecter) DiskPathPNGSized(domain any, size any) *MockFaviconService_DiskPathPNGSized_Call {
150	return &MockFaviconService_DiskPathPNGSized_Call{Call: _e.mock.On("DiskPathPNGSized", domain, size)}
151}
152
153func (_c *MockFaviconService_DiskPathPNGSized_Call) Run(run func(domain string, size int)) *MockFaviconService_DiskPathPNGSized_Call {
154	_c.Call.Run(func(args mock.Arguments) {
155		var arg0 string
156		if args[0] != nil {
157			arg0 = args[0].(string)
158		}
159		var arg1 int
160		if args[1] != nil {
161			arg1 = args[1].(int)
162		}
163		run(
164			arg0,
165			arg1,
166		)
167	})
168	return _c
169}
170
171func (_c *MockFaviconService_DiskPathPNGSized_Call) Return(s string) *MockFaviconService_DiskPathPNGSized_Call {
172	_c.Call.Return(s)
173	return _c
174}
175
176func (_c *MockFaviconService_DiskPathPNGSized_Call) RunAndReturn(run func(domain string, size int) string) *MockFaviconService_DiskPathPNGSized_Call {
177	_c.Call.Return(run)
178	return _c
179}
180
181// EnsureCacheDir provides a mock function for the type MockFaviconService
182func (_mock *MockFaviconService) EnsureCacheDir() error {
183	ret := _mock.Called()
184
185	if len(ret) == 0 {
186		panic("no return value specified for EnsureCacheDir")
187	}
188
189	var r0 error
190	if returnFunc, ok := ret.Get(0).(func() error); ok {
191		r0 = returnFunc()
192	} else {
193		r0 = ret.Error(0)
194	}
195	return r0
196}
197
198// MockFaviconService_EnsureCacheDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnsureCacheDir'
199type MockFaviconService_EnsureCacheDir_Call struct {
200	*mock.Call
201}
202
203// EnsureCacheDir is a helper method to define mock.On call
204func (_e *MockFaviconService_Expecter) EnsureCacheDir() *MockFaviconService_EnsureCacheDir_Call {
205	return &MockFaviconService_EnsureCacheDir_Call{Call: _e.mock.On("EnsureCacheDir")}
206}
207
208func (_c *MockFaviconService_EnsureCacheDir_Call) Run(run func()) *MockFaviconService_EnsureCacheDir_Call {
209	_c.Call.Run(func(args mock.Arguments) {
210		run()
211	})
212	return _c
213}
214
215func (_c *MockFaviconService_EnsureCacheDir_Call) Return(err error) *MockFaviconService_EnsureCacheDir_Call {
216	_c.Call.Return(err)
217	return _c
218}
219
220func (_c *MockFaviconService_EnsureCacheDir_Call) RunAndReturn(run func() error) *MockFaviconService_EnsureCacheDir_Call {
221	_c.Call.Return(run)
222	return _c
223}
224
225// EnsureDiskCache provides a mock function for the type MockFaviconService
226func (_mock *MockFaviconService) EnsureDiskCache(ctx context.Context, domain string) {
227	_mock.Called(ctx, domain)
228	return
229}
230
231// MockFaviconService_EnsureDiskCache_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnsureDiskCache'
232type MockFaviconService_EnsureDiskCache_Call struct {
233	*mock.Call
234}
235
236// EnsureDiskCache is a helper method to define mock.On call
237//   - ctx context.Context
238//   - domain string
239func (_e *MockFaviconService_Expecter) EnsureDiskCache(ctx any, domain any) *MockFaviconService_EnsureDiskCache_Call {
240	return &MockFaviconService_EnsureDiskCache_Call{Call: _e.mock.On("EnsureDiskCache", ctx, domain)}
241}
242
243func (_c *MockFaviconService_EnsureDiskCache_Call) Run(run func(ctx context.Context, domain string)) *MockFaviconService_EnsureDiskCache_Call {
244	_c.Call.Run(func(args mock.Arguments) {
245		var arg0 context.Context
246		if args[0] != nil {
247			arg0 = args[0].(context.Context)
248		}
249		var arg1 string
250		if args[1] != nil {
251			arg1 = args[1].(string)
252		}
253		run(
254			arg0,
255			arg1,
256		)
257	})
258	return _c
259}
260
261func (_c *MockFaviconService_EnsureDiskCache_Call) Return() *MockFaviconService_EnsureDiskCache_Call {
262	_c.Call.Return()
263	return _c
264}
265
266func (_c *MockFaviconService_EnsureDiskCache_Call) RunAndReturn(run func(ctx context.Context, domain string)) *MockFaviconService_EnsureDiskCache_Call {
267	_c.Run(run)
268	return _c
269}
270
271// EnsureSizedPNG provides a mock function for the type MockFaviconService
272func (_mock *MockFaviconService) EnsureSizedPNG(ctx context.Context, domain string, size int) error {
273	ret := _mock.Called(ctx, domain, size)
274
275	if len(ret) == 0 {
276		panic("no return value specified for EnsureSizedPNG")
277	}
278
279	var r0 error
280	if returnFunc, ok := ret.Get(0).(func(context.Context, string, int) error); ok {
281		r0 = returnFunc(ctx, domain, size)
282	} else {
283		r0 = ret.Error(0)
284	}
285	return r0
286}
287
288// MockFaviconService_EnsureSizedPNG_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnsureSizedPNG'
289type MockFaviconService_EnsureSizedPNG_Call struct {
290	*mock.Call
291}
292
293// EnsureSizedPNG is a helper method to define mock.On call
294//   - ctx context.Context
295//   - domain string
296//   - size int
297func (_e *MockFaviconService_Expecter) EnsureSizedPNG(ctx any, domain any, size any) *MockFaviconService_EnsureSizedPNG_Call {
298	return &MockFaviconService_EnsureSizedPNG_Call{Call: _e.mock.On("EnsureSizedPNG", ctx, domain, size)}
299}
300
301func (_c *MockFaviconService_EnsureSizedPNG_Call) Run(run func(ctx context.Context, domain string, size int)) *MockFaviconService_EnsureSizedPNG_Call {
302	_c.Call.Run(func(args mock.Arguments) {
303		var arg0 context.Context
304		if args[0] != nil {
305			arg0 = args[0].(context.Context)
306		}
307		var arg1 string
308		if args[1] != nil {
309			arg1 = args[1].(string)
310		}
311		var arg2 int
312		if args[2] != nil {
313			arg2 = args[2].(int)
314		}
315		run(
316			arg0,
317			arg1,
318			arg2,
319		)
320	})
321	return _c
322}
323
324func (_c *MockFaviconService_EnsureSizedPNG_Call) Return(err error) *MockFaviconService_EnsureSizedPNG_Call {
325	_c.Call.Return(err)
326	return _c
327}
328
329func (_c *MockFaviconService_EnsureSizedPNG_Call) RunAndReturn(run func(ctx context.Context, domain string, size int) error) *MockFaviconService_EnsureSizedPNG_Call {
330	_c.Call.Return(run)
331	return _c
332}
333
334// Get provides a mock function for the type MockFaviconService
335func (_mock *MockFaviconService) Get(ctx context.Context, domain string) ([]byte, error) {
336	ret := _mock.Called(ctx, domain)
337
338	if len(ret) == 0 {
339		panic("no return value specified for Get")
340	}
341
342	var r0 []byte
343	var r1 error
344	if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]byte, error)); ok {
345		return returnFunc(ctx, domain)
346	}
347	if returnFunc, ok := ret.Get(0).(func(context.Context, string) []byte); ok {
348		r0 = returnFunc(ctx, domain)
349	} else {
350		if ret.Get(0) != nil {
351			r0 = ret.Get(0).([]byte)
352		}
353	}
354	if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
355		r1 = returnFunc(ctx, domain)
356	} else {
357		r1 = ret.Error(1)
358	}
359	return r0, r1
360}
361
362// MockFaviconService_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'
363type MockFaviconService_Get_Call struct {
364	*mock.Call
365}
366
367// Get is a helper method to define mock.On call
368//   - ctx context.Context
369//   - domain string
370func (_e *MockFaviconService_Expecter) Get(ctx any, domain any) *MockFaviconService_Get_Call {
371	return &MockFaviconService_Get_Call{Call: _e.mock.On("Get", ctx, domain)}
372}
373
374func (_c *MockFaviconService_Get_Call) Run(run func(ctx context.Context, domain string)) *MockFaviconService_Get_Call {
375	_c.Call.Run(func(args mock.Arguments) {
376		var arg0 context.Context
377		if args[0] != nil {
378			arg0 = args[0].(context.Context)
379		}
380		var arg1 string
381		if args[1] != nil {
382			arg1 = args[1].(string)
383		}
384		run(
385			arg0,
386			arg1,
387		)
388	})
389	return _c
390}
391
392func (_c *MockFaviconService_Get_Call) Return(bytes []byte, err error) *MockFaviconService_Get_Call {
393	_c.Call.Return(bytes, err)
394	return _c
395}
396
397func (_c *MockFaviconService_Get_Call) RunAndReturn(run func(ctx context.Context, domain string) ([]byte, error)) *MockFaviconService_Get_Call {
398	_c.Call.Return(run)
399	return _c
400}
401
402// GetCached provides a mock function for the type MockFaviconService
403func (_mock *MockFaviconService) GetCached(ctx context.Context, domain string) ([]byte, bool) {
404	ret := _mock.Called(ctx, domain)
405
406	if len(ret) == 0 {
407		panic("no return value specified for GetCached")
408	}
409
410	var r0 []byte
411	var r1 bool
412	if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]byte, bool)); ok {
413		return returnFunc(ctx, domain)
414	}
415	if returnFunc, ok := ret.Get(0).(func(context.Context, string) []byte); ok {
416		r0 = returnFunc(ctx, domain)
417	} else {
418		if ret.Get(0) != nil {
419			r0 = ret.Get(0).([]byte)
420		}
421	}
422	if returnFunc, ok := ret.Get(1).(func(context.Context, string) bool); ok {
423		r1 = returnFunc(ctx, domain)
424	} else {
425		r1 = ret.Get(1).(bool)
426	}
427	return r0, r1
428}
429
430// MockFaviconService_GetCached_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCached'
431type MockFaviconService_GetCached_Call struct {
432	*mock.Call
433}
434
435// GetCached is a helper method to define mock.On call
436//   - ctx context.Context
437//   - domain string
438func (_e *MockFaviconService_Expecter) GetCached(ctx any, domain any) *MockFaviconService_GetCached_Call {
439	return &MockFaviconService_GetCached_Call{Call: _e.mock.On("GetCached", ctx, domain)}
440}
441
442func (_c *MockFaviconService_GetCached_Call) Run(run func(ctx context.Context, domain string)) *MockFaviconService_GetCached_Call {
443	_c.Call.Run(func(args mock.Arguments) {
444		var arg0 context.Context
445		if args[0] != nil {
446			arg0 = args[0].(context.Context)
447		}
448		var arg1 string
449		if args[1] != nil {
450			arg1 = args[1].(string)
451		}
452		run(
453			arg0,
454			arg1,
455		)
456	})
457	return _c
458}
459
460func (_c *MockFaviconService_GetCached_Call) Return(bytes []byte, b bool) *MockFaviconService_GetCached_Call {
461	_c.Call.Return(bytes, b)
462	return _c
463}
464
465func (_c *MockFaviconService_GetCached_Call) RunAndReturn(run func(ctx context.Context, domain string) ([]byte, bool)) *MockFaviconService_GetCached_Call {
466	_c.Call.Return(run)
467	return _c
468}
469
470// HasPNGOnDisk provides a mock function for the type MockFaviconService
471func (_mock *MockFaviconService) HasPNGOnDisk(domain string) bool {
472	ret := _mock.Called(domain)
473
474	if len(ret) == 0 {
475		panic("no return value specified for HasPNGOnDisk")
476	}
477
478	var r0 bool
479	if returnFunc, ok := ret.Get(0).(func(string) bool); ok {
480		r0 = returnFunc(domain)
481	} else {
482		r0 = ret.Get(0).(bool)
483	}
484	return r0
485}
486
487// MockFaviconService_HasPNGOnDisk_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasPNGOnDisk'
488type MockFaviconService_HasPNGOnDisk_Call struct {
489	*mock.Call
490}
491
492// HasPNGOnDisk is a helper method to define mock.On call
493//   - domain string
494func (_e *MockFaviconService_Expecter) HasPNGOnDisk(domain any) *MockFaviconService_HasPNGOnDisk_Call {
495	return &MockFaviconService_HasPNGOnDisk_Call{Call: _e.mock.On("HasPNGOnDisk", domain)}
496}
497
498func (_c *MockFaviconService_HasPNGOnDisk_Call) Run(run func(domain string)) *MockFaviconService_HasPNGOnDisk_Call {
499	_c.Call.Run(func(args mock.Arguments) {
500		var arg0 string
501		if args[0] != nil {
502			arg0 = args[0].(string)
503		}
504		run(
505			arg0,
506		)
507	})
508	return _c
509}
510
511func (_c *MockFaviconService_HasPNGOnDisk_Call) Return(b bool) *MockFaviconService_HasPNGOnDisk_Call {
512	_c.Call.Return(b)
513	return _c
514}
515
516func (_c *MockFaviconService_HasPNGOnDisk_Call) RunAndReturn(run func(domain string) bool) *MockFaviconService_HasPNGOnDisk_Call {
517	_c.Call.Return(run)
518	return _c
519}
520
521// HasPNGSizedOnDisk provides a mock function for the type MockFaviconService
522func (_mock *MockFaviconService) HasPNGSizedOnDisk(domain string, size int) bool {
523	ret := _mock.Called(domain, size)
524
525	if len(ret) == 0 {
526		panic("no return value specified for HasPNGSizedOnDisk")
527	}
528
529	var r0 bool
530	if returnFunc, ok := ret.Get(0).(func(string, int) bool); ok {
531		r0 = returnFunc(domain, size)
532	} else {
533		r0 = ret.Get(0).(bool)
534	}
535	return r0
536}
537
538// MockFaviconService_HasPNGSizedOnDisk_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasPNGSizedOnDisk'
539type MockFaviconService_HasPNGSizedOnDisk_Call struct {
540	*mock.Call
541}
542
543// HasPNGSizedOnDisk is a helper method to define mock.On call
544//   - domain string
545//   - size int
546func (_e *MockFaviconService_Expecter) HasPNGSizedOnDisk(domain any, size any) *MockFaviconService_HasPNGSizedOnDisk_Call {
547	return &MockFaviconService_HasPNGSizedOnDisk_Call{Call: _e.mock.On("HasPNGSizedOnDisk", domain, size)}
548}
549
550func (_c *MockFaviconService_HasPNGSizedOnDisk_Call) Run(run func(domain string, size int)) *MockFaviconService_HasPNGSizedOnDisk_Call {
551	_c.Call.Run(func(args mock.Arguments) {
552		var arg0 string
553		if args[0] != nil {
554			arg0 = args[0].(string)
555		}
556		var arg1 int
557		if args[1] != nil {
558			arg1 = args[1].(int)
559		}
560		run(
561			arg0,
562			arg1,
563		)
564	})
565	return _c
566}
567
568func (_c *MockFaviconService_HasPNGSizedOnDisk_Call) Return(b bool) *MockFaviconService_HasPNGSizedOnDisk_Call {
569	_c.Call.Return(b)
570	return _c
571}
572
573func (_c *MockFaviconService_HasPNGSizedOnDisk_Call) RunAndReturn(run func(domain string, size int) bool) *MockFaviconService_HasPNGSizedOnDisk_Call {
574	_c.Call.Return(run)
575	return _c
576}

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