v0.31.0 bf0756b

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

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