v0.30.0 eb3068f

favorite.go RawHistoryFolder

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

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