v0.33.0 62a09f5

homepage.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/application/dto"
12	"github.com/bnema/dumber/internal/domain/entity"
13	mock "github.com/stretchr/testify/mock"
14)
15
16// NewMockHomepageHistory creates a new instance of MockHomepageHistory. 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 NewMockHomepageHistory(t interface {
19	mock.TestingT
20	Cleanup(func())
21}) *MockHomepageHistory {
22	mock := &MockHomepageHistory{}
23	mock.Mock.Test(t)
24
25	t.Cleanup(func() { mock.AssertExpectations(t) })
26
27	return mock
28}
29
30// MockHomepageHistory is an autogenerated mock type for the HomepageHistory type
31type MockHomepageHistory struct {
32	mock.Mock
33}
34
35type MockHomepageHistory_Expecter struct {
36	mock *mock.Mock
37}
38
39func (_m *MockHomepageHistory) EXPECT() *MockHomepageHistory_Expecter {
40	return &MockHomepageHistory_Expecter{mock: &_m.Mock}
41}
42
43// ClearAll provides a mock function for the type MockHomepageHistory
44func (_mock *MockHomepageHistory) ClearAll(ctx context.Context) error {
45	ret := _mock.Called(ctx)
46
47	if len(ret) == 0 {
48		panic("no return value specified for ClearAll")
49	}
50
51	var r0 error
52	if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
53		r0 = returnFunc(ctx)
54	} else {
55		r0 = ret.Error(0)
56	}
57	return r0
58}
59
60// MockHomepageHistory_ClearAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClearAll'
61type MockHomepageHistory_ClearAll_Call struct {
62	*mock.Call
63}
64
65// ClearAll is a helper method to define mock.On call
66//   - ctx context.Context
67func (_e *MockHomepageHistory_Expecter) ClearAll(ctx any) *MockHomepageHistory_ClearAll_Call {
68	return &MockHomepageHistory_ClearAll_Call{Call: _e.mock.On("ClearAll", ctx)}
69}
70
71func (_c *MockHomepageHistory_ClearAll_Call) Run(run func(ctx context.Context)) *MockHomepageHistory_ClearAll_Call {
72	_c.Call.Run(func(args mock.Arguments) {
73		var arg0 context.Context
74		if args[0] != nil {
75			arg0 = args[0].(context.Context)
76		}
77		run(
78			arg0,
79		)
80	})
81	return _c
82}
83
84func (_c *MockHomepageHistory_ClearAll_Call) Return(err error) *MockHomepageHistory_ClearAll_Call {
85	_c.Call.Return(err)
86	return _c
87}
88
89func (_c *MockHomepageHistory_ClearAll_Call) RunAndReturn(run func(ctx context.Context) error) *MockHomepageHistory_ClearAll_Call {
90	_c.Call.Return(run)
91	return _c
92}
93
94// ClearOlderThan provides a mock function for the type MockHomepageHistory
95func (_mock *MockHomepageHistory) ClearOlderThan(ctx context.Context, before time.Time) error {
96	ret := _mock.Called(ctx, before)
97
98	if len(ret) == 0 {
99		panic("no return value specified for ClearOlderThan")
100	}
101
102	var r0 error
103	if returnFunc, ok := ret.Get(0).(func(context.Context, time.Time) error); ok {
104		r0 = returnFunc(ctx, before)
105	} else {
106		r0 = ret.Error(0)
107	}
108	return r0
109}
110
111// MockHomepageHistory_ClearOlderThan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClearOlderThan'
112type MockHomepageHistory_ClearOlderThan_Call struct {
113	*mock.Call
114}
115
116// ClearOlderThan is a helper method to define mock.On call
117//   - ctx context.Context
118//   - before time.Time
119func (_e *MockHomepageHistory_Expecter) ClearOlderThan(ctx any, before any) *MockHomepageHistory_ClearOlderThan_Call {
120	return &MockHomepageHistory_ClearOlderThan_Call{Call: _e.mock.On("ClearOlderThan", ctx, before)}
121}
122
123func (_c *MockHomepageHistory_ClearOlderThan_Call) Run(run func(ctx context.Context, before time.Time)) *MockHomepageHistory_ClearOlderThan_Call {
124	_c.Call.Run(func(args mock.Arguments) {
125		var arg0 context.Context
126		if args[0] != nil {
127			arg0 = args[0].(context.Context)
128		}
129		var arg1 time.Time
130		if args[1] != nil {
131			arg1 = args[1].(time.Time)
132		}
133		run(
134			arg0,
135			arg1,
136		)
137	})
138	return _c
139}
140
141func (_c *MockHomepageHistory_ClearOlderThan_Call) Return(err error) *MockHomepageHistory_ClearOlderThan_Call {
142	_c.Call.Return(err)
143	return _c
144}
145
146func (_c *MockHomepageHistory_ClearOlderThan_Call) RunAndReturn(run func(ctx context.Context, before time.Time) error) *MockHomepageHistory_ClearOlderThan_Call {
147	_c.Call.Return(run)
148	return _c
149}
150
151// ClearRange provides a mock function for the type MockHomepageHistory
152func (_mock *MockHomepageHistory) ClearRange(ctx context.Context, rangeID string) error {
153	ret := _mock.Called(ctx, rangeID)
154
155	if len(ret) == 0 {
156		panic("no return value specified for ClearRange")
157	}
158
159	var r0 error
160	if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
161		r0 = returnFunc(ctx, rangeID)
162	} else {
163		r0 = ret.Error(0)
164	}
165	return r0
166}
167
168// MockHomepageHistory_ClearRange_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClearRange'
169type MockHomepageHistory_ClearRange_Call struct {
170	*mock.Call
171}
172
173// ClearRange is a helper method to define mock.On call
174//   - ctx context.Context
175//   - rangeID string
176func (_e *MockHomepageHistory_Expecter) ClearRange(ctx any, rangeID any) *MockHomepageHistory_ClearRange_Call {
177	return &MockHomepageHistory_ClearRange_Call{Call: _e.mock.On("ClearRange", ctx, rangeID)}
178}
179
180func (_c *MockHomepageHistory_ClearRange_Call) Run(run func(ctx context.Context, rangeID string)) *MockHomepageHistory_ClearRange_Call {
181	_c.Call.Run(func(args mock.Arguments) {
182		var arg0 context.Context
183		if args[0] != nil {
184			arg0 = args[0].(context.Context)
185		}
186		var arg1 string
187		if args[1] != nil {
188			arg1 = args[1].(string)
189		}
190		run(
191			arg0,
192			arg1,
193		)
194	})
195	return _c
196}
197
198func (_c *MockHomepageHistory_ClearRange_Call) Return(err error) *MockHomepageHistory_ClearRange_Call {
199	_c.Call.Return(err)
200	return _c
201}
202
203func (_c *MockHomepageHistory_ClearRange_Call) RunAndReturn(run func(ctx context.Context, rangeID string) error) *MockHomepageHistory_ClearRange_Call {
204	_c.Call.Return(run)
205	return _c
206}
207
208// Delete provides a mock function for the type MockHomepageHistory
209func (_mock *MockHomepageHistory) Delete(ctx context.Context, id int64) error {
210	ret := _mock.Called(ctx, id)
211
212	if len(ret) == 0 {
213		panic("no return value specified for Delete")
214	}
215
216	var r0 error
217	if returnFunc, ok := ret.Get(0).(func(context.Context, int64) error); ok {
218		r0 = returnFunc(ctx, id)
219	} else {
220		r0 = ret.Error(0)
221	}
222	return r0
223}
224
225// MockHomepageHistory_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
226type MockHomepageHistory_Delete_Call struct {
227	*mock.Call
228}
229
230// Delete is a helper method to define mock.On call
231//   - ctx context.Context
232//   - id int64
233func (_e *MockHomepageHistory_Expecter) Delete(ctx any, id any) *MockHomepageHistory_Delete_Call {
234	return &MockHomepageHistory_Delete_Call{Call: _e.mock.On("Delete", ctx, id)}
235}
236
237func (_c *MockHomepageHistory_Delete_Call) Run(run func(ctx context.Context, id int64)) *MockHomepageHistory_Delete_Call {
238	_c.Call.Run(func(args mock.Arguments) {
239		var arg0 context.Context
240		if args[0] != nil {
241			arg0 = args[0].(context.Context)
242		}
243		var arg1 int64
244		if args[1] != nil {
245			arg1 = args[1].(int64)
246		}
247		run(
248			arg0,
249			arg1,
250		)
251	})
252	return _c
253}
254
255func (_c *MockHomepageHistory_Delete_Call) Return(err error) *MockHomepageHistory_Delete_Call {
256	_c.Call.Return(err)
257	return _c
258}
259
260func (_c *MockHomepageHistory_Delete_Call) RunAndReturn(run func(ctx context.Context, id int64) error) *MockHomepageHistory_Delete_Call {
261	_c.Call.Return(run)
262	return _c
263}
264
265// DeleteByDomain provides a mock function for the type MockHomepageHistory
266func (_mock *MockHomepageHistory) DeleteByDomain(ctx context.Context, domain string) error {
267	ret := _mock.Called(ctx, domain)
268
269	if len(ret) == 0 {
270		panic("no return value specified for DeleteByDomain")
271	}
272
273	var r0 error
274	if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
275		r0 = returnFunc(ctx, domain)
276	} else {
277		r0 = ret.Error(0)
278	}
279	return r0
280}
281
282// MockHomepageHistory_DeleteByDomain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByDomain'
283type MockHomepageHistory_DeleteByDomain_Call struct {
284	*mock.Call
285}
286
287// DeleteByDomain is a helper method to define mock.On call
288//   - ctx context.Context
289//   - domain string
290func (_e *MockHomepageHistory_Expecter) DeleteByDomain(ctx any, domain any) *MockHomepageHistory_DeleteByDomain_Call {
291	return &MockHomepageHistory_DeleteByDomain_Call{Call: _e.mock.On("DeleteByDomain", ctx, domain)}
292}
293
294func (_c *MockHomepageHistory_DeleteByDomain_Call) Run(run func(ctx context.Context, domain string)) *MockHomepageHistory_DeleteByDomain_Call {
295	_c.Call.Run(func(args mock.Arguments) {
296		var arg0 context.Context
297		if args[0] != nil {
298			arg0 = args[0].(context.Context)
299		}
300		var arg1 string
301		if args[1] != nil {
302			arg1 = args[1].(string)
303		}
304		run(
305			arg0,
306			arg1,
307		)
308	})
309	return _c
310}
311
312func (_c *MockHomepageHistory_DeleteByDomain_Call) Return(err error) *MockHomepageHistory_DeleteByDomain_Call {
313	_c.Call.Return(err)
314	return _c
315}
316
317func (_c *MockHomepageHistory_DeleteByDomain_Call) RunAndReturn(run func(ctx context.Context, domain string) error) *MockHomepageHistory_DeleteByDomain_Call {
318	_c.Call.Return(run)
319	return _c
320}
321
322// GetAnalytics provides a mock function for the type MockHomepageHistory
323func (_mock *MockHomepageHistory) GetAnalytics(ctx context.Context) (*entity.HistoryAnalytics, error) {
324	ret := _mock.Called(ctx)
325
326	if len(ret) == 0 {
327		panic("no return value specified for GetAnalytics")
328	}
329
330	var r0 *entity.HistoryAnalytics
331	var r1 error
332	if returnFunc, ok := ret.Get(0).(func(context.Context) (*entity.HistoryAnalytics, error)); ok {
333		return returnFunc(ctx)
334	}
335	if returnFunc, ok := ret.Get(0).(func(context.Context) *entity.HistoryAnalytics); ok {
336		r0 = returnFunc(ctx)
337	} else {
338		if ret.Get(0) != nil {
339			r0 = ret.Get(0).(*entity.HistoryAnalytics)
340		}
341	}
342	if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
343		r1 = returnFunc(ctx)
344	} else {
345		r1 = ret.Error(1)
346	}
347	return r0, r1
348}
349
350// MockHomepageHistory_GetAnalytics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAnalytics'
351type MockHomepageHistory_GetAnalytics_Call struct {
352	*mock.Call
353}
354
355// GetAnalytics is a helper method to define mock.On call
356//   - ctx context.Context
357func (_e *MockHomepageHistory_Expecter) GetAnalytics(ctx any) *MockHomepageHistory_GetAnalytics_Call {
358	return &MockHomepageHistory_GetAnalytics_Call{Call: _e.mock.On("GetAnalytics", ctx)}
359}
360
361func (_c *MockHomepageHistory_GetAnalytics_Call) Run(run func(ctx context.Context)) *MockHomepageHistory_GetAnalytics_Call {
362	_c.Call.Run(func(args mock.Arguments) {
363		var arg0 context.Context
364		if args[0] != nil {
365			arg0 = args[0].(context.Context)
366		}
367		run(
368			arg0,
369		)
370	})
371	return _c
372}
373
374func (_c *MockHomepageHistory_GetAnalytics_Call) Return(historyAnalytics *entity.HistoryAnalytics, err error) *MockHomepageHistory_GetAnalytics_Call {
375	_c.Call.Return(historyAnalytics, err)
376	return _c
377}
378
379func (_c *MockHomepageHistory_GetAnalytics_Call) RunAndReturn(run func(ctx context.Context) (*entity.HistoryAnalytics, error)) *MockHomepageHistory_GetAnalytics_Call {
380	_c.Call.Return(run)
381	return _c
382}
383
384// GetDomainStats provides a mock function for the type MockHomepageHistory
385func (_mock *MockHomepageHistory) GetDomainStats(ctx context.Context, limit int) ([]*entity.DomainStat, error) {
386	ret := _mock.Called(ctx, limit)
387
388	if len(ret) == 0 {
389		panic("no return value specified for GetDomainStats")
390	}
391
392	var r0 []*entity.DomainStat
393	var r1 error
394	if returnFunc, ok := ret.Get(0).(func(context.Context, int) ([]*entity.DomainStat, error)); ok {
395		return returnFunc(ctx, limit)
396	}
397	if returnFunc, ok := ret.Get(0).(func(context.Context, int) []*entity.DomainStat); ok {
398		r0 = returnFunc(ctx, limit)
399	} else {
400		if ret.Get(0) != nil {
401			r0 = ret.Get(0).([]*entity.DomainStat)
402		}
403	}
404	if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok {
405		r1 = returnFunc(ctx, limit)
406	} else {
407		r1 = ret.Error(1)
408	}
409	return r0, r1
410}
411
412// MockHomepageHistory_GetDomainStats_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDomainStats'
413type MockHomepageHistory_GetDomainStats_Call struct {
414	*mock.Call
415}
416
417// GetDomainStats is a helper method to define mock.On call
418//   - ctx context.Context
419//   - limit int
420func (_e *MockHomepageHistory_Expecter) GetDomainStats(ctx any, limit any) *MockHomepageHistory_GetDomainStats_Call {
421	return &MockHomepageHistory_GetDomainStats_Call{Call: _e.mock.On("GetDomainStats", ctx, limit)}
422}
423
424func (_c *MockHomepageHistory_GetDomainStats_Call) Run(run func(ctx context.Context, limit int)) *MockHomepageHistory_GetDomainStats_Call {
425	_c.Call.Run(func(args mock.Arguments) {
426		var arg0 context.Context
427		if args[0] != nil {
428			arg0 = args[0].(context.Context)
429		}
430		var arg1 int
431		if args[1] != nil {
432			arg1 = args[1].(int)
433		}
434		run(
435			arg0,
436			arg1,
437		)
438	})
439	return _c
440}
441
442func (_c *MockHomepageHistory_GetDomainStats_Call) Return(domainStats []*entity.DomainStat, err error) *MockHomepageHistory_GetDomainStats_Call {
443	_c.Call.Return(domainStats, err)
444	return _c
445}
446
447func (_c *MockHomepageHistory_GetDomainStats_Call) RunAndReturn(run func(ctx context.Context, limit int) ([]*entity.DomainStat, error)) *MockHomepageHistory_GetDomainStats_Call {
448	_c.Call.Return(run)
449	return _c
450}
451
452// GetRecent provides a mock function for the type MockHomepageHistory
453func (_mock *MockHomepageHistory) GetRecent(ctx context.Context, limit int, offset int) ([]*entity.HistoryEntry, error) {
454	ret := _mock.Called(ctx, limit, offset)
455
456	if len(ret) == 0 {
457		panic("no return value specified for GetRecent")
458	}
459
460	var r0 []*entity.HistoryEntry
461	var r1 error
462	if returnFunc, ok := ret.Get(0).(func(context.Context, int, int) ([]*entity.HistoryEntry, error)); ok {
463		return returnFunc(ctx, limit, offset)
464	}
465	if returnFunc, ok := ret.Get(0).(func(context.Context, int, int) []*entity.HistoryEntry); ok {
466		r0 = returnFunc(ctx, limit, offset)
467	} else {
468		if ret.Get(0) != nil {
469			r0 = ret.Get(0).([]*entity.HistoryEntry)
470		}
471	}
472	if returnFunc, ok := ret.Get(1).(func(context.Context, int, int) error); ok {
473		r1 = returnFunc(ctx, limit, offset)
474	} else {
475		r1 = ret.Error(1)
476	}
477	return r0, r1
478}
479
480// MockHomepageHistory_GetRecent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecent'
481type MockHomepageHistory_GetRecent_Call struct {
482	*mock.Call
483}
484
485// GetRecent is a helper method to define mock.On call
486//   - ctx context.Context
487//   - limit int
488//   - offset int
489func (_e *MockHomepageHistory_Expecter) GetRecent(ctx any, limit any, offset any) *MockHomepageHistory_GetRecent_Call {
490	return &MockHomepageHistory_GetRecent_Call{Call: _e.mock.On("GetRecent", ctx, limit, offset)}
491}
492
493func (_c *MockHomepageHistory_GetRecent_Call) Run(run func(ctx context.Context, limit int, offset int)) *MockHomepageHistory_GetRecent_Call {
494	_c.Call.Run(func(args mock.Arguments) {
495		var arg0 context.Context
496		if args[0] != nil {
497			arg0 = args[0].(context.Context)
498		}
499		var arg1 int
500		if args[1] != nil {
501			arg1 = args[1].(int)
502		}
503		var arg2 int
504		if args[2] != nil {
505			arg2 = args[2].(int)
506		}
507		run(
508			arg0,
509			arg1,
510			arg2,
511		)
512	})
513	return _c
514}
515
516func (_c *MockHomepageHistory_GetRecent_Call) Return(historyEntrys []*entity.HistoryEntry, err error) *MockHomepageHistory_GetRecent_Call {
517	_c.Call.Return(historyEntrys, err)
518	return _c
519}
520
521func (_c *MockHomepageHistory_GetRecent_Call) RunAndReturn(run func(ctx context.Context, limit int, offset int) ([]*entity.HistoryEntry, error)) *MockHomepageHistory_GetRecent_Call {
522	_c.Call.Return(run)
523	return _c
524}
525
526// GetRecentByDomain provides a mock function for the type MockHomepageHistory
527func (_mock *MockHomepageHistory) GetRecentByDomain(ctx context.Context, domain string, limit int, offset int) ([]*entity.HistoryEntry, error) {
528	ret := _mock.Called(ctx, domain, limit, offset)
529
530	if len(ret) == 0 {
531		panic("no return value specified for GetRecentByDomain")
532	}
533
534	var r0 []*entity.HistoryEntry
535	var r1 error
536	if returnFunc, ok := ret.Get(0).(func(context.Context, string, int, int) ([]*entity.HistoryEntry, error)); ok {
537		return returnFunc(ctx, domain, limit, offset)
538	}
539	if returnFunc, ok := ret.Get(0).(func(context.Context, string, int, int) []*entity.HistoryEntry); ok {
540		r0 = returnFunc(ctx, domain, limit, offset)
541	} else {
542		if ret.Get(0) != nil {
543			r0 = ret.Get(0).([]*entity.HistoryEntry)
544		}
545	}
546	if returnFunc, ok := ret.Get(1).(func(context.Context, string, int, int) error); ok {
547		r1 = returnFunc(ctx, domain, limit, offset)
548	} else {
549		r1 = ret.Error(1)
550	}
551	return r0, r1
552}
553
554// MockHomepageHistory_GetRecentByDomain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecentByDomain'
555type MockHomepageHistory_GetRecentByDomain_Call struct {
556	*mock.Call
557}
558
559// GetRecentByDomain is a helper method to define mock.On call
560//   - ctx context.Context
561//   - domain string
562//   - limit int
563//   - offset int
564func (_e *MockHomepageHistory_Expecter) GetRecentByDomain(ctx any, domain any, limit any, offset any) *MockHomepageHistory_GetRecentByDomain_Call {
565	return &MockHomepageHistory_GetRecentByDomain_Call{Call: _e.mock.On("GetRecentByDomain", ctx, domain, limit, offset)}
566}
567
568func (_c *MockHomepageHistory_GetRecentByDomain_Call) Run(run func(ctx context.Context, domain string, limit int, offset int)) *MockHomepageHistory_GetRecentByDomain_Call {
569	_c.Call.Run(func(args mock.Arguments) {
570		var arg0 context.Context
571		if args[0] != nil {
572			arg0 = args[0].(context.Context)
573		}
574		var arg1 string
575		if args[1] != nil {
576			arg1 = args[1].(string)
577		}
578		var arg2 int
579		if args[2] != nil {
580			arg2 = args[2].(int)
581		}
582		var arg3 int
583		if args[3] != nil {
584			arg3 = args[3].(int)
585		}
586		run(
587			arg0,
588			arg1,
589			arg2,
590			arg3,
591		)
592	})
593	return _c
594}
595
596func (_c *MockHomepageHistory_GetRecentByDomain_Call) Return(historyEntrys []*entity.HistoryEntry, err error) *MockHomepageHistory_GetRecentByDomain_Call {
597	_c.Call.Return(historyEntrys, err)
598	return _c
599}
600
601func (_c *MockHomepageHistory_GetRecentByDomain_Call) RunAndReturn(run func(ctx context.Context, domain string, limit int, offset int) ([]*entity.HistoryEntry, error)) *MockHomepageHistory_GetRecentByDomain_Call {
602	_c.Call.Return(run)
603	return _c
604}
605
606// GetRecentWindow provides a mock function for the type MockHomepageHistory
607func (_mock *MockHomepageHistory) GetRecentWindow(ctx context.Context, before time.Time, beforeID int64, domain string) (*entity.HistoryWindow, error) {
608	ret := _mock.Called(ctx, before, beforeID, domain)
609
610	if len(ret) == 0 {
611		panic("no return value specified for GetRecentWindow")
612	}
613
614	var r0 *entity.HistoryWindow
615	var r1 error
616	if returnFunc, ok := ret.Get(0).(func(context.Context, time.Time, int64, string) (*entity.HistoryWindow, error)); ok {
617		return returnFunc(ctx, before, beforeID, domain)
618	}
619	if returnFunc, ok := ret.Get(0).(func(context.Context, time.Time, int64, string) *entity.HistoryWindow); ok {
620		r0 = returnFunc(ctx, before, beforeID, domain)
621	} else {
622		if ret.Get(0) != nil {
623			r0 = ret.Get(0).(*entity.HistoryWindow)
624		}
625	}
626	if returnFunc, ok := ret.Get(1).(func(context.Context, time.Time, int64, string) error); ok {
627		r1 = returnFunc(ctx, before, beforeID, domain)
628	} else {
629		r1 = ret.Error(1)
630	}
631	return r0, r1
632}
633
634// MockHomepageHistory_GetRecentWindow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecentWindow'
635type MockHomepageHistory_GetRecentWindow_Call struct {
636	*mock.Call
637}
638
639// GetRecentWindow is a helper method to define mock.On call
640//   - ctx context.Context
641//   - before time.Time
642//   - beforeID int64
643//   - domain string
644func (_e *MockHomepageHistory_Expecter) GetRecentWindow(ctx any, before any, beforeID any, domain any) *MockHomepageHistory_GetRecentWindow_Call {
645	return &MockHomepageHistory_GetRecentWindow_Call{Call: _e.mock.On("GetRecentWindow", ctx, before, beforeID, domain)}
646}
647
648func (_c *MockHomepageHistory_GetRecentWindow_Call) Run(run func(ctx context.Context, before time.Time, beforeID int64, domain string)) *MockHomepageHistory_GetRecentWindow_Call {
649	_c.Call.Run(func(args mock.Arguments) {
650		var arg0 context.Context
651		if args[0] != nil {
652			arg0 = args[0].(context.Context)
653		}
654		var arg1 time.Time
655		if args[1] != nil {
656			arg1 = args[1].(time.Time)
657		}
658		var arg2 int64
659		if args[2] != nil {
660			arg2 = args[2].(int64)
661		}
662		var arg3 string
663		if args[3] != nil {
664			arg3 = args[3].(string)
665		}
666		run(
667			arg0,
668			arg1,
669			arg2,
670			arg3,
671		)
672	})
673	return _c
674}
675
676func (_c *MockHomepageHistory_GetRecentWindow_Call) Return(historyWindow *entity.HistoryWindow, err error) *MockHomepageHistory_GetRecentWindow_Call {
677	_c.Call.Return(historyWindow, err)
678	return _c
679}
680
681func (_c *MockHomepageHistory_GetRecentWindow_Call) RunAndReturn(run func(ctx context.Context, before time.Time, beforeID int64, domain string) (*entity.HistoryWindow, error)) *MockHomepageHistory_GetRecentWindow_Call {
682	_c.Call.Return(run)
683	return _c
684}
685
686// GetStats provides a mock function for the type MockHomepageHistory
687func (_mock *MockHomepageHistory) GetStats(ctx context.Context) (*entity.HistoryStats, error) {
688	ret := _mock.Called(ctx)
689
690	if len(ret) == 0 {
691		panic("no return value specified for GetStats")
692	}
693
694	var r0 *entity.HistoryStats
695	var r1 error
696	if returnFunc, ok := ret.Get(0).(func(context.Context) (*entity.HistoryStats, error)); ok {
697		return returnFunc(ctx)
698	}
699	if returnFunc, ok := ret.Get(0).(func(context.Context) *entity.HistoryStats); ok {
700		r0 = returnFunc(ctx)
701	} else {
702		if ret.Get(0) != nil {
703			r0 = ret.Get(0).(*entity.HistoryStats)
704		}
705	}
706	if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
707		r1 = returnFunc(ctx)
708	} else {
709		r1 = ret.Error(1)
710	}
711	return r0, r1
712}
713
714// MockHomepageHistory_GetStats_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStats'
715type MockHomepageHistory_GetStats_Call struct {
716	*mock.Call
717}
718
719// GetStats is a helper method to define mock.On call
720//   - ctx context.Context
721func (_e *MockHomepageHistory_Expecter) GetStats(ctx any) *MockHomepageHistory_GetStats_Call {
722	return &MockHomepageHistory_GetStats_Call{Call: _e.mock.On("GetStats", ctx)}
723}
724
725func (_c *MockHomepageHistory_GetStats_Call) Run(run func(ctx context.Context)) *MockHomepageHistory_GetStats_Call {
726	_c.Call.Run(func(args mock.Arguments) {
727		var arg0 context.Context
728		if args[0] != nil {
729			arg0 = args[0].(context.Context)
730		}
731		run(
732			arg0,
733		)
734	})
735	return _c
736}
737
738func (_c *MockHomepageHistory_GetStats_Call) Return(historyStats *entity.HistoryStats, err error) *MockHomepageHistory_GetStats_Call {
739	_c.Call.Return(historyStats, err)
740	return _c
741}
742
743func (_c *MockHomepageHistory_GetStats_Call) RunAndReturn(run func(ctx context.Context) (*entity.HistoryStats, error)) *MockHomepageHistory_GetStats_Call {
744	_c.Call.Return(run)
745	return _c
746}
747
748// Search provides a mock function for the type MockHomepageHistory
749func (_mock *MockHomepageHistory) Search(ctx context.Context, input dto.HistorySearchInput) (*dto.HistorySearchOutput, error) {
750	ret := _mock.Called(ctx, input)
751
752	if len(ret) == 0 {
753		panic("no return value specified for Search")
754	}
755
756	var r0 *dto.HistorySearchOutput
757	var r1 error
758	if returnFunc, ok := ret.Get(0).(func(context.Context, dto.HistorySearchInput) (*dto.HistorySearchOutput, error)); ok {
759		return returnFunc(ctx, input)
760	}
761	if returnFunc, ok := ret.Get(0).(func(context.Context, dto.HistorySearchInput) *dto.HistorySearchOutput); ok {
762		r0 = returnFunc(ctx, input)
763	} else {
764		if ret.Get(0) != nil {
765			r0 = ret.Get(0).(*dto.HistorySearchOutput)
766		}
767	}
768	if returnFunc, ok := ret.Get(1).(func(context.Context, dto.HistorySearchInput) error); ok {
769		r1 = returnFunc(ctx, input)
770	} else {
771		r1 = ret.Error(1)
772	}
773	return r0, r1
774}
775
776// MockHomepageHistory_Search_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Search'
777type MockHomepageHistory_Search_Call struct {
778	*mock.Call
779}
780
781// Search is a helper method to define mock.On call
782//   - ctx context.Context
783//   - input dto.HistorySearchInput
784func (_e *MockHomepageHistory_Expecter) Search(ctx any, input any) *MockHomepageHistory_Search_Call {
785	return &MockHomepageHistory_Search_Call{Call: _e.mock.On("Search", ctx, input)}
786}
787
788func (_c *MockHomepageHistory_Search_Call) Run(run func(ctx context.Context, input dto.HistorySearchInput)) *MockHomepageHistory_Search_Call {
789	_c.Call.Run(func(args mock.Arguments) {
790		var arg0 context.Context
791		if args[0] != nil {
792			arg0 = args[0].(context.Context)
793		}
794		var arg1 dto.HistorySearchInput
795		if args[1] != nil {
796			arg1 = args[1].(dto.HistorySearchInput)
797		}
798		run(
799			arg0,
800			arg1,
801		)
802	})
803	return _c
804}
805
806func (_c *MockHomepageHistory_Search_Call) Return(historySearchOutput *dto.HistorySearchOutput, err error) *MockHomepageHistory_Search_Call {
807	_c.Call.Return(historySearchOutput, err)
808	return _c
809}
810
811func (_c *MockHomepageHistory_Search_Call) RunAndReturn(run func(ctx context.Context, input dto.HistorySearchInput) (*dto.HistorySearchOutput, error)) *MockHomepageHistory_Search_Call {
812	_c.Call.Return(run)
813	return _c
814}
815
816// NewMockHomepageFavorites creates a new instance of MockHomepageFavorites. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
817// The first argument is typically a *testing.T value.
818func NewMockHomepageFavorites(t interface {
819	mock.TestingT
820	Cleanup(func())
821}) *MockHomepageFavorites {
822	mock := &MockHomepageFavorites{}
823	mock.Mock.Test(t)
824
825	t.Cleanup(func() { mock.AssertExpectations(t) })
826
827	return mock
828}
829
830// MockHomepageFavorites is an autogenerated mock type for the HomepageFavorites type
831type MockHomepageFavorites struct {
832	mock.Mock
833}
834
835type MockHomepageFavorites_Expecter struct {
836	mock *mock.Mock
837}
838
839func (_m *MockHomepageFavorites) EXPECT() *MockHomepageFavorites_Expecter {
840	return &MockHomepageFavorites_Expecter{mock: &_m.Mock}
841}
842
843// AddFavorite provides a mock function for the type MockHomepageFavorites
844func (_mock *MockHomepageFavorites) AddFavorite(ctx context.Context, input dto.FavoriteCreateInput) (*entity.Favorite, error) {
845	ret := _mock.Called(ctx, input)
846
847	if len(ret) == 0 {
848		panic("no return value specified for AddFavorite")
849	}
850
851	var r0 *entity.Favorite
852	var r1 error
853	if returnFunc, ok := ret.Get(0).(func(context.Context, dto.FavoriteCreateInput) (*entity.Favorite, error)); ok {
854		return returnFunc(ctx, input)
855	}
856	if returnFunc, ok := ret.Get(0).(func(context.Context, dto.FavoriteCreateInput) *entity.Favorite); ok {
857		r0 = returnFunc(ctx, input)
858	} else {
859		if ret.Get(0) != nil {
860			r0 = ret.Get(0).(*entity.Favorite)
861		}
862	}
863	if returnFunc, ok := ret.Get(1).(func(context.Context, dto.FavoriteCreateInput) error); ok {
864		r1 = returnFunc(ctx, input)
865	} else {
866		r1 = ret.Error(1)
867	}
868	return r0, r1
869}
870
871// MockHomepageFavorites_AddFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddFavorite'
872type MockHomepageFavorites_AddFavorite_Call struct {
873	*mock.Call
874}
875
876// AddFavorite is a helper method to define mock.On call
877//   - ctx context.Context
878//   - input dto.FavoriteCreateInput
879func (_e *MockHomepageFavorites_Expecter) AddFavorite(ctx any, input any) *MockHomepageFavorites_AddFavorite_Call {
880	return &MockHomepageFavorites_AddFavorite_Call{Call: _e.mock.On("AddFavorite", ctx, input)}
881}
882
883func (_c *MockHomepageFavorites_AddFavorite_Call) Run(run func(ctx context.Context, input dto.FavoriteCreateInput)) *MockHomepageFavorites_AddFavorite_Call {
884	_c.Call.Run(func(args mock.Arguments) {
885		var arg0 context.Context
886		if args[0] != nil {
887			arg0 = args[0].(context.Context)
888		}
889		var arg1 dto.FavoriteCreateInput
890		if args[1] != nil {
891			arg1 = args[1].(dto.FavoriteCreateInput)
892		}
893		run(
894			arg0,
895			arg1,
896		)
897	})
898	return _c
899}
900
901func (_c *MockHomepageFavorites_AddFavorite_Call) Return(favorite *entity.Favorite, err error) *MockHomepageFavorites_AddFavorite_Call {
902	_c.Call.Return(favorite, err)
903	return _c
904}
905
906func (_c *MockHomepageFavorites_AddFavorite_Call) RunAndReturn(run func(ctx context.Context, input dto.FavoriteCreateInput) (*entity.Favorite, error)) *MockHomepageFavorites_AddFavorite_Call {
907	_c.Call.Return(run)
908	return _c
909}
910
911// AddTag provides a mock function for the type MockHomepageFavorites
912func (_mock *MockHomepageFavorites) AddTag(ctx context.Context, name string, color string) (*entity.Tag, error) {
913	ret := _mock.Called(ctx, name, color)
914
915	if len(ret) == 0 {
916		panic("no return value specified for AddTag")
917	}
918
919	var r0 *entity.Tag
920	var r1 error
921	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (*entity.Tag, error)); ok {
922		return returnFunc(ctx, name, color)
923	}
924	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) *entity.Tag); ok {
925		r0 = returnFunc(ctx, name, color)
926	} else {
927		if ret.Get(0) != nil {
928			r0 = ret.Get(0).(*entity.Tag)
929		}
930	}
931	if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
932		r1 = returnFunc(ctx, name, color)
933	} else {
934		r1 = ret.Error(1)
935	}
936	return r0, r1
937}
938
939// MockHomepageFavorites_AddTag_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddTag'
940type MockHomepageFavorites_AddTag_Call struct {
941	*mock.Call
942}
943
944// AddTag is a helper method to define mock.On call
945//   - ctx context.Context
946//   - name string
947//   - color string
948func (_e *MockHomepageFavorites_Expecter) AddTag(ctx any, name any, color any) *MockHomepageFavorites_AddTag_Call {
949	return &MockHomepageFavorites_AddTag_Call{Call: _e.mock.On("AddTag", ctx, name, color)}
950}
951
952func (_c *MockHomepageFavorites_AddTag_Call) Run(run func(ctx context.Context, name string, color string)) *MockHomepageFavorites_AddTag_Call {
953	_c.Call.Run(func(args mock.Arguments) {
954		var arg0 context.Context
955		if args[0] != nil {
956			arg0 = args[0].(context.Context)
957		}
958		var arg1 string
959		if args[1] != nil {
960			arg1 = args[1].(string)
961		}
962		var arg2 string
963		if args[2] != nil {
964			arg2 = args[2].(string)
965		}
966		run(
967			arg0,
968			arg1,
969			arg2,
970		)
971	})
972	return _c
973}
974
975func (_c *MockHomepageFavorites_AddTag_Call) Return(tag *entity.Tag, err error) *MockHomepageFavorites_AddTag_Call {
976	_c.Call.Return(tag, err)
977	return _c
978}
979
980func (_c *MockHomepageFavorites_AddTag_Call) RunAndReturn(run func(ctx context.Context, name string, color string) (*entity.Tag, error)) *MockHomepageFavorites_AddTag_Call {
981	_c.Call.Return(run)
982	return _c
983}
984
985// DeleteFavorite provides a mock function for the type MockHomepageFavorites
986func (_mock *MockHomepageFavorites) DeleteFavorite(ctx context.Context, id entity.FavoriteID) error {
987	ret := _mock.Called(ctx, id)
988
989	if len(ret) == 0 {
990		panic("no return value specified for DeleteFavorite")
991	}
992
993	var r0 error
994	if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) error); ok {
995		r0 = returnFunc(ctx, id)
996	} else {
997		r0 = ret.Error(0)
998	}
999	return r0
1000}
1001
1002// MockHomepageFavorites_DeleteFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteFavorite'
1003type MockHomepageFavorites_DeleteFavorite_Call struct {
1004	*mock.Call
1005}
1006
1007// DeleteFavorite is a helper method to define mock.On call
1008//   - ctx context.Context
1009//   - id entity.FavoriteID
1010func (_e *MockHomepageFavorites_Expecter) DeleteFavorite(ctx any, id any) *MockHomepageFavorites_DeleteFavorite_Call {
1011	return &MockHomepageFavorites_DeleteFavorite_Call{Call: _e.mock.On("DeleteFavorite", ctx, id)}
1012}
1013
1014func (_c *MockHomepageFavorites_DeleteFavorite_Call) Run(run func(ctx context.Context, id entity.FavoriteID)) *MockHomepageFavorites_DeleteFavorite_Call {
1015	_c.Call.Run(func(args mock.Arguments) {
1016		var arg0 context.Context
1017		if args[0] != nil {
1018			arg0 = args[0].(context.Context)
1019		}
1020		var arg1 entity.FavoriteID
1021		if args[1] != nil {
1022			arg1 = args[1].(entity.FavoriteID)
1023		}
1024		run(
1025			arg0,
1026			arg1,
1027		)
1028	})
1029	return _c
1030}
1031
1032func (_c *MockHomepageFavorites_DeleteFavorite_Call) Return(err error) *MockHomepageFavorites_DeleteFavorite_Call {
1033	_c.Call.Return(err)
1034	return _c
1035}
1036
1037func (_c *MockHomepageFavorites_DeleteFavorite_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID) error) *MockHomepageFavorites_DeleteFavorite_Call {
1038	_c.Call.Return(run)
1039	return _c
1040}
1041
1042// DeleteTag provides a mock function for the type MockHomepageFavorites
1043func (_mock *MockHomepageFavorites) DeleteTag(ctx context.Context, id entity.TagID) error {
1044	ret := _mock.Called(ctx, id)
1045
1046	if len(ret) == 0 {
1047		panic("no return value specified for DeleteTag")
1048	}
1049
1050	var r0 error
1051	if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID) error); ok {
1052		r0 = returnFunc(ctx, id)
1053	} else {
1054		r0 = ret.Error(0)
1055	}
1056	return r0
1057}
1058
1059// MockHomepageFavorites_DeleteTag_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteTag'
1060type MockHomepageFavorites_DeleteTag_Call struct {
1061	*mock.Call
1062}
1063
1064// DeleteTag is a helper method to define mock.On call
1065//   - ctx context.Context
1066//   - id entity.TagID
1067func (_e *MockHomepageFavorites_Expecter) DeleteTag(ctx any, id any) *MockHomepageFavorites_DeleteTag_Call {
1068	return &MockHomepageFavorites_DeleteTag_Call{Call: _e.mock.On("DeleteTag", ctx, id)}
1069}
1070
1071func (_c *MockHomepageFavorites_DeleteTag_Call) Run(run func(ctx context.Context, id entity.TagID)) *MockHomepageFavorites_DeleteTag_Call {
1072	_c.Call.Run(func(args mock.Arguments) {
1073		var arg0 context.Context
1074		if args[0] != nil {
1075			arg0 = args[0].(context.Context)
1076		}
1077		var arg1 entity.TagID
1078		if args[1] != nil {
1079			arg1 = args[1].(entity.TagID)
1080		}
1081		run(
1082			arg0,
1083			arg1,
1084		)
1085	})
1086	return _c
1087}
1088
1089func (_c *MockHomepageFavorites_DeleteTag_Call) Return(err error) *MockHomepageFavorites_DeleteTag_Call {
1090	_c.Call.Return(err)
1091	return _c
1092}
1093
1094func (_c *MockHomepageFavorites_DeleteTag_Call) RunAndReturn(run func(ctx context.Context, id entity.TagID) error) *MockHomepageFavorites_DeleteTag_Call {
1095	_c.Call.Return(run)
1096	return _c
1097}
1098
1099// GetAll provides a mock function for the type MockHomepageFavorites
1100func (_mock *MockHomepageFavorites) GetAll(ctx context.Context) ([]*entity.Favorite, error) {
1101	ret := _mock.Called(ctx)
1102
1103	if len(ret) == 0 {
1104		panic("no return value specified for GetAll")
1105	}
1106
1107	var r0 []*entity.Favorite
1108	var r1 error
1109	if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.Favorite, error)); ok {
1110		return returnFunc(ctx)
1111	}
1112	if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.Favorite); ok {
1113		r0 = returnFunc(ctx)
1114	} else {
1115		if ret.Get(0) != nil {
1116			r0 = ret.Get(0).([]*entity.Favorite)
1117		}
1118	}
1119	if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
1120		r1 = returnFunc(ctx)
1121	} else {
1122		r1 = ret.Error(1)
1123	}
1124	return r0, r1
1125}
1126
1127// MockHomepageFavorites_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll'
1128type MockHomepageFavorites_GetAll_Call struct {
1129	*mock.Call
1130}
1131
1132// GetAll is a helper method to define mock.On call
1133//   - ctx context.Context
1134func (_e *MockHomepageFavorites_Expecter) GetAll(ctx any) *MockHomepageFavorites_GetAll_Call {
1135	return &MockHomepageFavorites_GetAll_Call{Call: _e.mock.On("GetAll", ctx)}
1136}
1137
1138func (_c *MockHomepageFavorites_GetAll_Call) Run(run func(ctx context.Context)) *MockHomepageFavorites_GetAll_Call {
1139	_c.Call.Run(func(args mock.Arguments) {
1140		var arg0 context.Context
1141		if args[0] != nil {
1142			arg0 = args[0].(context.Context)
1143		}
1144		run(
1145			arg0,
1146		)
1147	})
1148	return _c
1149}
1150
1151func (_c *MockHomepageFavorites_GetAll_Call) Return(favorites []*entity.Favorite, err error) *MockHomepageFavorites_GetAll_Call {
1152	_c.Call.Return(favorites, err)
1153	return _c
1154}
1155
1156func (_c *MockHomepageFavorites_GetAll_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.Favorite, error)) *MockHomepageFavorites_GetAll_Call {
1157	_c.Call.Return(run)
1158	return _c
1159}
1160
1161// GetAllTags provides a mock function for the type MockHomepageFavorites
1162func (_mock *MockHomepageFavorites) GetAllTags(ctx context.Context) ([]*entity.Tag, error) {
1163	ret := _mock.Called(ctx)
1164
1165	if len(ret) == 0 {
1166		panic("no return value specified for GetAllTags")
1167	}
1168
1169	var r0 []*entity.Tag
1170	var r1 error
1171	if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.Tag, error)); ok {
1172		return returnFunc(ctx)
1173	}
1174	if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.Tag); ok {
1175		r0 = returnFunc(ctx)
1176	} else {
1177		if ret.Get(0) != nil {
1178			r0 = ret.Get(0).([]*entity.Tag)
1179		}
1180	}
1181	if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
1182		r1 = returnFunc(ctx)
1183	} else {
1184		r1 = ret.Error(1)
1185	}
1186	return r0, r1
1187}
1188
1189// MockHomepageFavorites_GetAllTags_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllTags'
1190type MockHomepageFavorites_GetAllTags_Call struct {
1191	*mock.Call
1192}
1193
1194// GetAllTags is a helper method to define mock.On call
1195//   - ctx context.Context
1196func (_e *MockHomepageFavorites_Expecter) GetAllTags(ctx any) *MockHomepageFavorites_GetAllTags_Call {
1197	return &MockHomepageFavorites_GetAllTags_Call{Call: _e.mock.On("GetAllTags", ctx)}
1198}
1199
1200func (_c *MockHomepageFavorites_GetAllTags_Call) Run(run func(ctx context.Context)) *MockHomepageFavorites_GetAllTags_Call {
1201	_c.Call.Run(func(args mock.Arguments) {
1202		var arg0 context.Context
1203		if args[0] != nil {
1204			arg0 = args[0].(context.Context)
1205		}
1206		run(
1207			arg0,
1208		)
1209	})
1210	return _c
1211}
1212
1213func (_c *MockHomepageFavorites_GetAllTags_Call) Return(tags []*entity.Tag, err error) *MockHomepageFavorites_GetAllTags_Call {
1214	_c.Call.Return(tags, err)
1215	return _c
1216}
1217
1218func (_c *MockHomepageFavorites_GetAllTags_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.Tag, error)) *MockHomepageFavorites_GetAllTags_Call {
1219	_c.Call.Return(run)
1220	return _c
1221}
1222
1223// GetByShortcut provides a mock function for the type MockHomepageFavorites
1224func (_mock *MockHomepageFavorites) GetByShortcut(ctx context.Context, key int) (*entity.Favorite, error) {
1225	ret := _mock.Called(ctx, key)
1226
1227	if len(ret) == 0 {
1228		panic("no return value specified for GetByShortcut")
1229	}
1230
1231	var r0 *entity.Favorite
1232	var r1 error
1233	if returnFunc, ok := ret.Get(0).(func(context.Context, int) (*entity.Favorite, error)); ok {
1234		return returnFunc(ctx, key)
1235	}
1236	if returnFunc, ok := ret.Get(0).(func(context.Context, int) *entity.Favorite); ok {
1237		r0 = returnFunc(ctx, key)
1238	} else {
1239		if ret.Get(0) != nil {
1240			r0 = ret.Get(0).(*entity.Favorite)
1241		}
1242	}
1243	if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok {
1244		r1 = returnFunc(ctx, key)
1245	} else {
1246		r1 = ret.Error(1)
1247	}
1248	return r0, r1
1249}
1250
1251// MockHomepageFavorites_GetByShortcut_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByShortcut'
1252type MockHomepageFavorites_GetByShortcut_Call struct {
1253	*mock.Call
1254}
1255
1256// GetByShortcut is a helper method to define mock.On call
1257//   - ctx context.Context
1258//   - key int
1259func (_e *MockHomepageFavorites_Expecter) GetByShortcut(ctx any, key any) *MockHomepageFavorites_GetByShortcut_Call {
1260	return &MockHomepageFavorites_GetByShortcut_Call{Call: _e.mock.On("GetByShortcut", ctx, key)}
1261}
1262
1263func (_c *MockHomepageFavorites_GetByShortcut_Call) Run(run func(ctx context.Context, key int)) *MockHomepageFavorites_GetByShortcut_Call {
1264	_c.Call.Run(func(args mock.Arguments) {
1265		var arg0 context.Context
1266		if args[0] != nil {
1267			arg0 = args[0].(context.Context)
1268		}
1269		var arg1 int
1270		if args[1] != nil {
1271			arg1 = args[1].(int)
1272		}
1273		run(
1274			arg0,
1275			arg1,
1276		)
1277	})
1278	return _c
1279}
1280
1281func (_c *MockHomepageFavorites_GetByShortcut_Call) Return(favorite *entity.Favorite, err error) *MockHomepageFavorites_GetByShortcut_Call {
1282	_c.Call.Return(favorite, err)
1283	return _c
1284}
1285
1286func (_c *MockHomepageFavorites_GetByShortcut_Call) RunAndReturn(run func(ctx context.Context, key int) (*entity.Favorite, error)) *MockHomepageFavorites_GetByShortcut_Call {
1287	_c.Call.Return(run)
1288	return _c
1289}
1290
1291// SetShortcut provides a mock function for the type MockHomepageFavorites
1292func (_mock *MockHomepageFavorites) SetShortcut(ctx context.Context, id entity.FavoriteID, key *int) error {
1293	ret := _mock.Called(ctx, id, key)
1294
1295	if len(ret) == 0 {
1296		panic("no return value specified for SetShortcut")
1297	}
1298
1299	var r0 error
1300	if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, *int) error); ok {
1301		r0 = returnFunc(ctx, id, key)
1302	} else {
1303		r0 = ret.Error(0)
1304	}
1305	return r0
1306}
1307
1308// MockHomepageFavorites_SetShortcut_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetShortcut'
1309type MockHomepageFavorites_SetShortcut_Call struct {
1310	*mock.Call
1311}
1312
1313// SetShortcut is a helper method to define mock.On call
1314//   - ctx context.Context
1315//   - id entity.FavoriteID
1316//   - key *int
1317func (_e *MockHomepageFavorites_Expecter) SetShortcut(ctx any, id any, key any) *MockHomepageFavorites_SetShortcut_Call {
1318	return &MockHomepageFavorites_SetShortcut_Call{Call: _e.mock.On("SetShortcut", ctx, id, key)}
1319}
1320
1321func (_c *MockHomepageFavorites_SetShortcut_Call) Run(run func(ctx context.Context, id entity.FavoriteID, key *int)) *MockHomepageFavorites_SetShortcut_Call {
1322	_c.Call.Run(func(args mock.Arguments) {
1323		var arg0 context.Context
1324		if args[0] != nil {
1325			arg0 = args[0].(context.Context)
1326		}
1327		var arg1 entity.FavoriteID
1328		if args[1] != nil {
1329			arg1 = args[1].(entity.FavoriteID)
1330		}
1331		var arg2 *int
1332		if args[2] != nil {
1333			arg2 = args[2].(*int)
1334		}
1335		run(
1336			arg0,
1337			arg1,
1338			arg2,
1339		)
1340	})
1341	return _c
1342}
1343
1344func (_c *MockHomepageFavorites_SetShortcut_Call) Return(err error) *MockHomepageFavorites_SetShortcut_Call {
1345	_c.Call.Return(err)
1346	return _c
1347}
1348
1349func (_c *MockHomepageFavorites_SetShortcut_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID, key *int) error) *MockHomepageFavorites_SetShortcut_Call {
1350	_c.Call.Return(run)
1351	return _c
1352}
1353
1354// TagFavorite provides a mock function for the type MockHomepageFavorites
1355func (_mock *MockHomepageFavorites) TagFavorite(ctx context.Context, favID entity.FavoriteID, tagID entity.TagID) error {
1356	ret := _mock.Called(ctx, favID, tagID)
1357
1358	if len(ret) == 0 {
1359		panic("no return value specified for TagFavorite")
1360	}
1361
1362	var r0 error
1363	if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, entity.TagID) error); ok {
1364		r0 = returnFunc(ctx, favID, tagID)
1365	} else {
1366		r0 = ret.Error(0)
1367	}
1368	return r0
1369}
1370
1371// MockHomepageFavorites_TagFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TagFavorite'
1372type MockHomepageFavorites_TagFavorite_Call struct {
1373	*mock.Call
1374}
1375
1376// TagFavorite is a helper method to define mock.On call
1377//   - ctx context.Context
1378//   - favID entity.FavoriteID
1379//   - tagID entity.TagID
1380func (_e *MockHomepageFavorites_Expecter) TagFavorite(ctx any, favID any, tagID any) *MockHomepageFavorites_TagFavorite_Call {
1381	return &MockHomepageFavorites_TagFavorite_Call{Call: _e.mock.On("TagFavorite", ctx, favID, tagID)}
1382}
1383
1384func (_c *MockHomepageFavorites_TagFavorite_Call) Run(run func(ctx context.Context, favID entity.FavoriteID, tagID entity.TagID)) *MockHomepageFavorites_TagFavorite_Call {
1385	_c.Call.Run(func(args mock.Arguments) {
1386		var arg0 context.Context
1387		if args[0] != nil {
1388			arg0 = args[0].(context.Context)
1389		}
1390		var arg1 entity.FavoriteID
1391		if args[1] != nil {
1392			arg1 = args[1].(entity.FavoriteID)
1393		}
1394		var arg2 entity.TagID
1395		if args[2] != nil {
1396			arg2 = args[2].(entity.TagID)
1397		}
1398		run(
1399			arg0,
1400			arg1,
1401			arg2,
1402		)
1403	})
1404	return _c
1405}
1406
1407func (_c *MockHomepageFavorites_TagFavorite_Call) Return(err error) *MockHomepageFavorites_TagFavorite_Call {
1408	_c.Call.Return(err)
1409	return _c
1410}
1411
1412func (_c *MockHomepageFavorites_TagFavorite_Call) RunAndReturn(run func(ctx context.Context, favID entity.FavoriteID, tagID entity.TagID) error) *MockHomepageFavorites_TagFavorite_Call {
1413	_c.Call.Return(run)
1414	return _c
1415}
1416
1417// UntagFavorite provides a mock function for the type MockHomepageFavorites
1418func (_mock *MockHomepageFavorites) UntagFavorite(ctx context.Context, favID entity.FavoriteID, tagID entity.TagID) error {
1419	ret := _mock.Called(ctx, favID, tagID)
1420
1421	if len(ret) == 0 {
1422		panic("no return value specified for UntagFavorite")
1423	}
1424
1425	var r0 error
1426	if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, entity.TagID) error); ok {
1427		r0 = returnFunc(ctx, favID, tagID)
1428	} else {
1429		r0 = ret.Error(0)
1430	}
1431	return r0
1432}
1433
1434// MockHomepageFavorites_UntagFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UntagFavorite'
1435type MockHomepageFavorites_UntagFavorite_Call struct {
1436	*mock.Call
1437}
1438
1439// UntagFavorite is a helper method to define mock.On call
1440//   - ctx context.Context
1441//   - favID entity.FavoriteID
1442//   - tagID entity.TagID
1443func (_e *MockHomepageFavorites_Expecter) UntagFavorite(ctx any, favID any, tagID any) *MockHomepageFavorites_UntagFavorite_Call {
1444	return &MockHomepageFavorites_UntagFavorite_Call{Call: _e.mock.On("UntagFavorite", ctx, favID, tagID)}
1445}
1446
1447func (_c *MockHomepageFavorites_UntagFavorite_Call) Run(run func(ctx context.Context, favID entity.FavoriteID, tagID entity.TagID)) *MockHomepageFavorites_UntagFavorite_Call {
1448	_c.Call.Run(func(args mock.Arguments) {
1449		var arg0 context.Context
1450		if args[0] != nil {
1451			arg0 = args[0].(context.Context)
1452		}
1453		var arg1 entity.FavoriteID
1454		if args[1] != nil {
1455			arg1 = args[1].(entity.FavoriteID)
1456		}
1457		var arg2 entity.TagID
1458		if args[2] != nil {
1459			arg2 = args[2].(entity.TagID)
1460		}
1461		run(
1462			arg0,
1463			arg1,
1464			arg2,
1465		)
1466	})
1467	return _c
1468}
1469
1470func (_c *MockHomepageFavorites_UntagFavorite_Call) Return(err error) *MockHomepageFavorites_UntagFavorite_Call {
1471	_c.Call.Return(err)
1472	return _c
1473}
1474
1475func (_c *MockHomepageFavorites_UntagFavorite_Call) RunAndReturn(run func(ctx context.Context, favID entity.FavoriteID, tagID entity.TagID) error) *MockHomepageFavorites_UntagFavorite_Call {
1476	_c.Call.Return(run)
1477	return _c
1478}
1479
1480// UpdateFavorite provides a mock function for the type MockHomepageFavorites
1481func (_mock *MockHomepageFavorites) UpdateFavorite(ctx context.Context, input dto.FavoriteUpdateInput) (*entity.Favorite, error) {
1482	ret := _mock.Called(ctx, input)
1483
1484	if len(ret) == 0 {
1485		panic("no return value specified for UpdateFavorite")
1486	}
1487
1488	var r0 *entity.Favorite
1489	var r1 error
1490	if returnFunc, ok := ret.Get(0).(func(context.Context, dto.FavoriteUpdateInput) (*entity.Favorite, error)); ok {
1491		return returnFunc(ctx, input)
1492	}
1493	if returnFunc, ok := ret.Get(0).(func(context.Context, dto.FavoriteUpdateInput) *entity.Favorite); ok {
1494		r0 = returnFunc(ctx, input)
1495	} else {
1496		if ret.Get(0) != nil {
1497			r0 = ret.Get(0).(*entity.Favorite)
1498		}
1499	}
1500	if returnFunc, ok := ret.Get(1).(func(context.Context, dto.FavoriteUpdateInput) error); ok {
1501		r1 = returnFunc(ctx, input)
1502	} else {
1503		r1 = ret.Error(1)
1504	}
1505	return r0, r1
1506}
1507
1508// MockHomepageFavorites_UpdateFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateFavorite'
1509type MockHomepageFavorites_UpdateFavorite_Call struct {
1510	*mock.Call
1511}
1512
1513// UpdateFavorite is a helper method to define mock.On call
1514//   - ctx context.Context
1515//   - input dto.FavoriteUpdateInput
1516func (_e *MockHomepageFavorites_Expecter) UpdateFavorite(ctx any, input any) *MockHomepageFavorites_UpdateFavorite_Call {
1517	return &MockHomepageFavorites_UpdateFavorite_Call{Call: _e.mock.On("UpdateFavorite", ctx, input)}
1518}
1519
1520func (_c *MockHomepageFavorites_UpdateFavorite_Call) Run(run func(ctx context.Context, input dto.FavoriteUpdateInput)) *MockHomepageFavorites_UpdateFavorite_Call {
1521	_c.Call.Run(func(args mock.Arguments) {
1522		var arg0 context.Context
1523		if args[0] != nil {
1524			arg0 = args[0].(context.Context)
1525		}
1526		var arg1 dto.FavoriteUpdateInput
1527		if args[1] != nil {
1528			arg1 = args[1].(dto.FavoriteUpdateInput)
1529		}
1530		run(
1531			arg0,
1532			arg1,
1533		)
1534	})
1535	return _c
1536}
1537
1538func (_c *MockHomepageFavorites_UpdateFavorite_Call) Return(favorite *entity.Favorite, err error) *MockHomepageFavorites_UpdateFavorite_Call {
1539	_c.Call.Return(favorite, err)
1540	return _c
1541}
1542
1543func (_c *MockHomepageFavorites_UpdateFavorite_Call) RunAndReturn(run func(ctx context.Context, input dto.FavoriteUpdateInput) (*entity.Favorite, error)) *MockHomepageFavorites_UpdateFavorite_Call {
1544	_c.Call.Return(run)
1545	return _c
1546}
1547
1548// UpdateTag provides a mock function for the type MockHomepageFavorites
1549func (_mock *MockHomepageFavorites) UpdateTag(ctx context.Context, id entity.TagID, name string, color string) error {
1550	ret := _mock.Called(ctx, id, name, color)
1551
1552	if len(ret) == 0 {
1553		panic("no return value specified for UpdateTag")
1554	}
1555
1556	var r0 error
1557	if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID, string, string) error); ok {
1558		r0 = returnFunc(ctx, id, name, color)
1559	} else {
1560		r0 = ret.Error(0)
1561	}
1562	return r0
1563}
1564
1565// MockHomepageFavorites_UpdateTag_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateTag'
1566type MockHomepageFavorites_UpdateTag_Call struct {
1567	*mock.Call
1568}
1569
1570// UpdateTag is a helper method to define mock.On call
1571//   - ctx context.Context
1572//   - id entity.TagID
1573//   - name string
1574//   - color string
1575func (_e *MockHomepageFavorites_Expecter) UpdateTag(ctx any, id any, name any, color any) *MockHomepageFavorites_UpdateTag_Call {
1576	return &MockHomepageFavorites_UpdateTag_Call{Call: _e.mock.On("UpdateTag", ctx, id, name, color)}
1577}
1578
1579func (_c *MockHomepageFavorites_UpdateTag_Call) Run(run func(ctx context.Context, id entity.TagID, name string, color string)) *MockHomepageFavorites_UpdateTag_Call {
1580	_c.Call.Run(func(args mock.Arguments) {
1581		var arg0 context.Context
1582		if args[0] != nil {
1583			arg0 = args[0].(context.Context)
1584		}
1585		var arg1 entity.TagID
1586		if args[1] != nil {
1587			arg1 = args[1].(entity.TagID)
1588		}
1589		var arg2 string
1590		if args[2] != nil {
1591			arg2 = args[2].(string)
1592		}
1593		var arg3 string
1594		if args[3] != nil {
1595			arg3 = args[3].(string)
1596		}
1597		run(
1598			arg0,
1599			arg1,
1600			arg2,
1601			arg3,
1602		)
1603	})
1604	return _c
1605}
1606
1607func (_c *MockHomepageFavorites_UpdateTag_Call) Return(err error) *MockHomepageFavorites_UpdateTag_Call {
1608	_c.Call.Return(err)
1609	return _c
1610}
1611
1612func (_c *MockHomepageFavorites_UpdateTag_Call) RunAndReturn(run func(ctx context.Context, id entity.TagID, name string, color string) error) *MockHomepageFavorites_UpdateTag_Call {
1613	_c.Call.Return(run)
1614	return _c
1615}

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