// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "time" "github.com/bnema/dumber/internal/application/dto" "github.com/bnema/dumber/internal/domain/entity" mock "github.com/stretchr/testify/mock" ) // NewMockHomepageHistory creates a new instance of MockHomepageHistory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewMockHomepageHistory(t interface { mock.TestingT Cleanup(func()) }) *MockHomepageHistory { mock := &MockHomepageHistory{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock } // MockHomepageHistory is an autogenerated mock type for the HomepageHistory type type MockHomepageHistory struct { mock.Mock } type MockHomepageHistory_Expecter struct { mock *mock.Mock } func (_m *MockHomepageHistory) EXPECT() *MockHomepageHistory_Expecter { return &MockHomepageHistory_Expecter{mock: &_m.Mock} } // ClearAll provides a mock function for the type MockHomepageHistory func (_mock *MockHomepageHistory) ClearAll(ctx context.Context) error { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for ClearAll") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok { r0 = returnFunc(ctx) } else { r0 = ret.Error(0) } return r0 } // MockHomepageHistory_ClearAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClearAll' type MockHomepageHistory_ClearAll_Call struct { *mock.Call } // ClearAll is a helper method to define mock.On call // - ctx context.Context func (_e *MockHomepageHistory_Expecter) ClearAll(ctx any) *MockHomepageHistory_ClearAll_Call { return &MockHomepageHistory_ClearAll_Call{Call: _e.mock.On("ClearAll", ctx)} } func (_c *MockHomepageHistory_ClearAll_Call) Run(run func(ctx context.Context)) *MockHomepageHistory_ClearAll_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } run( arg0, ) }) return _c } func (_c *MockHomepageHistory_ClearAll_Call) Return(err error) *MockHomepageHistory_ClearAll_Call { _c.Call.Return(err) return _c } func (_c *MockHomepageHistory_ClearAll_Call) RunAndReturn(run func(ctx context.Context) error) *MockHomepageHistory_ClearAll_Call { _c.Call.Return(run) return _c } // ClearOlderThan provides a mock function for the type MockHomepageHistory func (_mock *MockHomepageHistory) ClearOlderThan(ctx context.Context, before time.Time) error { ret := _mock.Called(ctx, before) if len(ret) == 0 { panic("no return value specified for ClearOlderThan") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, time.Time) error); ok { r0 = returnFunc(ctx, before) } else { r0 = ret.Error(0) } return r0 } // MockHomepageHistory_ClearOlderThan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClearOlderThan' type MockHomepageHistory_ClearOlderThan_Call struct { *mock.Call } // ClearOlderThan is a helper method to define mock.On call // - ctx context.Context // - before time.Time func (_e *MockHomepageHistory_Expecter) ClearOlderThan(ctx any, before any) *MockHomepageHistory_ClearOlderThan_Call { return &MockHomepageHistory_ClearOlderThan_Call{Call: _e.mock.On("ClearOlderThan", ctx, before)} } func (_c *MockHomepageHistory_ClearOlderThan_Call) Run(run func(ctx context.Context, before time.Time)) *MockHomepageHistory_ClearOlderThan_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 time.Time if args[1] != nil { arg1 = args[1].(time.Time) } run( arg0, arg1, ) }) return _c } func (_c *MockHomepageHistory_ClearOlderThan_Call) Return(err error) *MockHomepageHistory_ClearOlderThan_Call { _c.Call.Return(err) return _c } func (_c *MockHomepageHistory_ClearOlderThan_Call) RunAndReturn(run func(ctx context.Context, before time.Time) error) *MockHomepageHistory_ClearOlderThan_Call { _c.Call.Return(run) return _c } // ClearRange provides a mock function for the type MockHomepageHistory func (_mock *MockHomepageHistory) ClearRange(ctx context.Context, rangeID string) error { ret := _mock.Called(ctx, rangeID) if len(ret) == 0 { panic("no return value specified for ClearRange") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = returnFunc(ctx, rangeID) } else { r0 = ret.Error(0) } return r0 } // MockHomepageHistory_ClearRange_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClearRange' type MockHomepageHistory_ClearRange_Call struct { *mock.Call } // ClearRange is a helper method to define mock.On call // - ctx context.Context // - rangeID string func (_e *MockHomepageHistory_Expecter) ClearRange(ctx any, rangeID any) *MockHomepageHistory_ClearRange_Call { return &MockHomepageHistory_ClearRange_Call{Call: _e.mock.On("ClearRange", ctx, rangeID)} } func (_c *MockHomepageHistory_ClearRange_Call) Run(run func(ctx context.Context, rangeID string)) *MockHomepageHistory_ClearRange_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } run( arg0, arg1, ) }) return _c } func (_c *MockHomepageHistory_ClearRange_Call) Return(err error) *MockHomepageHistory_ClearRange_Call { _c.Call.Return(err) return _c } func (_c *MockHomepageHistory_ClearRange_Call) RunAndReturn(run func(ctx context.Context, rangeID string) error) *MockHomepageHistory_ClearRange_Call { _c.Call.Return(run) return _c } // Delete provides a mock function for the type MockHomepageHistory func (_mock *MockHomepageHistory) Delete(ctx context.Context, id int64) error { ret := _mock.Called(ctx, id) if len(ret) == 0 { panic("no return value specified for Delete") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, int64) error); ok { r0 = returnFunc(ctx, id) } else { r0 = ret.Error(0) } return r0 } // MockHomepageHistory_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' type MockHomepageHistory_Delete_Call struct { *mock.Call } // Delete is a helper method to define mock.On call // - ctx context.Context // - id int64 func (_e *MockHomepageHistory_Expecter) Delete(ctx any, id any) *MockHomepageHistory_Delete_Call { return &MockHomepageHistory_Delete_Call{Call: _e.mock.On("Delete", ctx, id)} } func (_c *MockHomepageHistory_Delete_Call) Run(run func(ctx context.Context, id int64)) *MockHomepageHistory_Delete_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 int64 if args[1] != nil { arg1 = args[1].(int64) } run( arg0, arg1, ) }) return _c } func (_c *MockHomepageHistory_Delete_Call) Return(err error) *MockHomepageHistory_Delete_Call { _c.Call.Return(err) return _c } func (_c *MockHomepageHistory_Delete_Call) RunAndReturn(run func(ctx context.Context, id int64) error) *MockHomepageHistory_Delete_Call { _c.Call.Return(run) return _c } // DeleteByDomain provides a mock function for the type MockHomepageHistory func (_mock *MockHomepageHistory) DeleteByDomain(ctx context.Context, domain string) error { ret := _mock.Called(ctx, domain) if len(ret) == 0 { panic("no return value specified for DeleteByDomain") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = returnFunc(ctx, domain) } else { r0 = ret.Error(0) } return r0 } // MockHomepageHistory_DeleteByDomain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByDomain' type MockHomepageHistory_DeleteByDomain_Call struct { *mock.Call } // DeleteByDomain is a helper method to define mock.On call // - ctx context.Context // - domain string func (_e *MockHomepageHistory_Expecter) DeleteByDomain(ctx any, domain any) *MockHomepageHistory_DeleteByDomain_Call { return &MockHomepageHistory_DeleteByDomain_Call{Call: _e.mock.On("DeleteByDomain", ctx, domain)} } func (_c *MockHomepageHistory_DeleteByDomain_Call) Run(run func(ctx context.Context, domain string)) *MockHomepageHistory_DeleteByDomain_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } run( arg0, arg1, ) }) return _c } func (_c *MockHomepageHistory_DeleteByDomain_Call) Return(err error) *MockHomepageHistory_DeleteByDomain_Call { _c.Call.Return(err) return _c } func (_c *MockHomepageHistory_DeleteByDomain_Call) RunAndReturn(run func(ctx context.Context, domain string) error) *MockHomepageHistory_DeleteByDomain_Call { _c.Call.Return(run) return _c } // GetAnalytics provides a mock function for the type MockHomepageHistory func (_mock *MockHomepageHistory) GetAnalytics(ctx context.Context) (*entity.HistoryAnalytics, error) { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for GetAnalytics") } var r0 *entity.HistoryAnalytics var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context) (*entity.HistoryAnalytics, error)); ok { return returnFunc(ctx) } if returnFunc, ok := ret.Get(0).(func(context.Context) *entity.HistoryAnalytics); ok { r0 = returnFunc(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*entity.HistoryAnalytics) } } if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } return r0, r1 } // MockHomepageHistory_GetAnalytics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAnalytics' type MockHomepageHistory_GetAnalytics_Call struct { *mock.Call } // GetAnalytics is a helper method to define mock.On call // - ctx context.Context func (_e *MockHomepageHistory_Expecter) GetAnalytics(ctx any) *MockHomepageHistory_GetAnalytics_Call { return &MockHomepageHistory_GetAnalytics_Call{Call: _e.mock.On("GetAnalytics", ctx)} } func (_c *MockHomepageHistory_GetAnalytics_Call) Run(run func(ctx context.Context)) *MockHomepageHistory_GetAnalytics_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } run( arg0, ) }) return _c } func (_c *MockHomepageHistory_GetAnalytics_Call) Return(historyAnalytics *entity.HistoryAnalytics, err error) *MockHomepageHistory_GetAnalytics_Call { _c.Call.Return(historyAnalytics, err) return _c } func (_c *MockHomepageHistory_GetAnalytics_Call) RunAndReturn(run func(ctx context.Context) (*entity.HistoryAnalytics, error)) *MockHomepageHistory_GetAnalytics_Call { _c.Call.Return(run) return _c } // GetDomainStats provides a mock function for the type MockHomepageHistory func (_mock *MockHomepageHistory) GetDomainStats(ctx context.Context, limit int) ([]*entity.DomainStat, error) { ret := _mock.Called(ctx, limit) if len(ret) == 0 { panic("no return value specified for GetDomainStats") } var r0 []*entity.DomainStat var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, int) ([]*entity.DomainStat, error)); ok { return returnFunc(ctx, limit) } if returnFunc, ok := ret.Get(0).(func(context.Context, int) []*entity.DomainStat); ok { r0 = returnFunc(ctx, limit) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*entity.DomainStat) } } if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok { r1 = returnFunc(ctx, limit) } else { r1 = ret.Error(1) } return r0, r1 } // MockHomepageHistory_GetDomainStats_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDomainStats' type MockHomepageHistory_GetDomainStats_Call struct { *mock.Call } // GetDomainStats is a helper method to define mock.On call // - ctx context.Context // - limit int func (_e *MockHomepageHistory_Expecter) GetDomainStats(ctx any, limit any) *MockHomepageHistory_GetDomainStats_Call { return &MockHomepageHistory_GetDomainStats_Call{Call: _e.mock.On("GetDomainStats", ctx, limit)} } func (_c *MockHomepageHistory_GetDomainStats_Call) Run(run func(ctx context.Context, limit int)) *MockHomepageHistory_GetDomainStats_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 int if args[1] != nil { arg1 = args[1].(int) } run( arg0, arg1, ) }) return _c } func (_c *MockHomepageHistory_GetDomainStats_Call) Return(domainStats []*entity.DomainStat, err error) *MockHomepageHistory_GetDomainStats_Call { _c.Call.Return(domainStats, err) return _c } func (_c *MockHomepageHistory_GetDomainStats_Call) RunAndReturn(run func(ctx context.Context, limit int) ([]*entity.DomainStat, error)) *MockHomepageHistory_GetDomainStats_Call { _c.Call.Return(run) return _c } // GetRecent provides a mock function for the type MockHomepageHistory func (_mock *MockHomepageHistory) GetRecent(ctx context.Context, limit int, offset int) ([]*entity.HistoryEntry, error) { ret := _mock.Called(ctx, limit, offset) if len(ret) == 0 { panic("no return value specified for GetRecent") } var r0 []*entity.HistoryEntry var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, int, int) ([]*entity.HistoryEntry, error)); ok { return returnFunc(ctx, limit, offset) } if returnFunc, ok := ret.Get(0).(func(context.Context, int, int) []*entity.HistoryEntry); ok { r0 = returnFunc(ctx, limit, offset) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*entity.HistoryEntry) } } if returnFunc, ok := ret.Get(1).(func(context.Context, int, int) error); ok { r1 = returnFunc(ctx, limit, offset) } else { r1 = ret.Error(1) } return r0, r1 } // MockHomepageHistory_GetRecent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecent' type MockHomepageHistory_GetRecent_Call struct { *mock.Call } // GetRecent is a helper method to define mock.On call // - ctx context.Context // - limit int // - offset int func (_e *MockHomepageHistory_Expecter) GetRecent(ctx any, limit any, offset any) *MockHomepageHistory_GetRecent_Call { return &MockHomepageHistory_GetRecent_Call{Call: _e.mock.On("GetRecent", ctx, limit, offset)} } func (_c *MockHomepageHistory_GetRecent_Call) Run(run func(ctx context.Context, limit int, offset int)) *MockHomepageHistory_GetRecent_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 int if args[1] != nil { arg1 = args[1].(int) } var arg2 int if args[2] != nil { arg2 = args[2].(int) } run( arg0, arg1, arg2, ) }) return _c } func (_c *MockHomepageHistory_GetRecent_Call) Return(historyEntrys []*entity.HistoryEntry, err error) *MockHomepageHistory_GetRecent_Call { _c.Call.Return(historyEntrys, err) return _c } func (_c *MockHomepageHistory_GetRecent_Call) RunAndReturn(run func(ctx context.Context, limit int, offset int) ([]*entity.HistoryEntry, error)) *MockHomepageHistory_GetRecent_Call { _c.Call.Return(run) return _c } // GetRecentByDomain provides a mock function for the type MockHomepageHistory func (_mock *MockHomepageHistory) GetRecentByDomain(ctx context.Context, domain string, limit int, offset int) ([]*entity.HistoryEntry, error) { ret := _mock.Called(ctx, domain, limit, offset) if len(ret) == 0 { panic("no return value specified for GetRecentByDomain") } var r0 []*entity.HistoryEntry var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, int, int) ([]*entity.HistoryEntry, error)); ok { return returnFunc(ctx, domain, limit, offset) } if returnFunc, ok := ret.Get(0).(func(context.Context, string, int, int) []*entity.HistoryEntry); ok { r0 = returnFunc(ctx, domain, limit, offset) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*entity.HistoryEntry) } } if returnFunc, ok := ret.Get(1).(func(context.Context, string, int, int) error); ok { r1 = returnFunc(ctx, domain, limit, offset) } else { r1 = ret.Error(1) } return r0, r1 } // MockHomepageHistory_GetRecentByDomain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecentByDomain' type MockHomepageHistory_GetRecentByDomain_Call struct { *mock.Call } // GetRecentByDomain is a helper method to define mock.On call // - ctx context.Context // - domain string // - limit int // - offset int func (_e *MockHomepageHistory_Expecter) GetRecentByDomain(ctx any, domain any, limit any, offset any) *MockHomepageHistory_GetRecentByDomain_Call { return &MockHomepageHistory_GetRecentByDomain_Call{Call: _e.mock.On("GetRecentByDomain", ctx, domain, limit, offset)} } func (_c *MockHomepageHistory_GetRecentByDomain_Call) Run(run func(ctx context.Context, domain string, limit int, offset int)) *MockHomepageHistory_GetRecentByDomain_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } var arg2 int if args[2] != nil { arg2 = args[2].(int) } var arg3 int if args[3] != nil { arg3 = args[3].(int) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *MockHomepageHistory_GetRecentByDomain_Call) Return(historyEntrys []*entity.HistoryEntry, err error) *MockHomepageHistory_GetRecentByDomain_Call { _c.Call.Return(historyEntrys, err) return _c } func (_c *MockHomepageHistory_GetRecentByDomain_Call) RunAndReturn(run func(ctx context.Context, domain string, limit int, offset int) ([]*entity.HistoryEntry, error)) *MockHomepageHistory_GetRecentByDomain_Call { _c.Call.Return(run) return _c } // GetRecentWindow provides a mock function for the type MockHomepageHistory func (_mock *MockHomepageHistory) GetRecentWindow(ctx context.Context, before time.Time, beforeID int64, domain string) (*entity.HistoryWindow, error) { ret := _mock.Called(ctx, before, beforeID, domain) if len(ret) == 0 { panic("no return value specified for GetRecentWindow") } var r0 *entity.HistoryWindow var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, time.Time, int64, string) (*entity.HistoryWindow, error)); ok { return returnFunc(ctx, before, beforeID, domain) } if returnFunc, ok := ret.Get(0).(func(context.Context, time.Time, int64, string) *entity.HistoryWindow); ok { r0 = returnFunc(ctx, before, beforeID, domain) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*entity.HistoryWindow) } } if returnFunc, ok := ret.Get(1).(func(context.Context, time.Time, int64, string) error); ok { r1 = returnFunc(ctx, before, beforeID, domain) } else { r1 = ret.Error(1) } return r0, r1 } // MockHomepageHistory_GetRecentWindow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecentWindow' type MockHomepageHistory_GetRecentWindow_Call struct { *mock.Call } // GetRecentWindow is a helper method to define mock.On call // - ctx context.Context // - before time.Time // - beforeID int64 // - domain string func (_e *MockHomepageHistory_Expecter) GetRecentWindow(ctx any, before any, beforeID any, domain any) *MockHomepageHistory_GetRecentWindow_Call { return &MockHomepageHistory_GetRecentWindow_Call{Call: _e.mock.On("GetRecentWindow", ctx, before, beforeID, domain)} } func (_c *MockHomepageHistory_GetRecentWindow_Call) Run(run func(ctx context.Context, before time.Time, beforeID int64, domain string)) *MockHomepageHistory_GetRecentWindow_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 time.Time if args[1] != nil { arg1 = args[1].(time.Time) } var arg2 int64 if args[2] != nil { arg2 = args[2].(int64) } var arg3 string if args[3] != nil { arg3 = args[3].(string) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *MockHomepageHistory_GetRecentWindow_Call) Return(historyWindow *entity.HistoryWindow, err error) *MockHomepageHistory_GetRecentWindow_Call { _c.Call.Return(historyWindow, err) return _c } func (_c *MockHomepageHistory_GetRecentWindow_Call) RunAndReturn(run func(ctx context.Context, before time.Time, beforeID int64, domain string) (*entity.HistoryWindow, error)) *MockHomepageHistory_GetRecentWindow_Call { _c.Call.Return(run) return _c } // GetStats provides a mock function for the type MockHomepageHistory func (_mock *MockHomepageHistory) GetStats(ctx context.Context) (*entity.HistoryStats, error) { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for GetStats") } var r0 *entity.HistoryStats var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context) (*entity.HistoryStats, error)); ok { return returnFunc(ctx) } if returnFunc, ok := ret.Get(0).(func(context.Context) *entity.HistoryStats); ok { r0 = returnFunc(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*entity.HistoryStats) } } if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } return r0, r1 } // MockHomepageHistory_GetStats_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStats' type MockHomepageHistory_GetStats_Call struct { *mock.Call } // GetStats is a helper method to define mock.On call // - ctx context.Context func (_e *MockHomepageHistory_Expecter) GetStats(ctx any) *MockHomepageHistory_GetStats_Call { return &MockHomepageHistory_GetStats_Call{Call: _e.mock.On("GetStats", ctx)} } func (_c *MockHomepageHistory_GetStats_Call) Run(run func(ctx context.Context)) *MockHomepageHistory_GetStats_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } run( arg0, ) }) return _c } func (_c *MockHomepageHistory_GetStats_Call) Return(historyStats *entity.HistoryStats, err error) *MockHomepageHistory_GetStats_Call { _c.Call.Return(historyStats, err) return _c } func (_c *MockHomepageHistory_GetStats_Call) RunAndReturn(run func(ctx context.Context) (*entity.HistoryStats, error)) *MockHomepageHistory_GetStats_Call { _c.Call.Return(run) return _c } // Search provides a mock function for the type MockHomepageHistory func (_mock *MockHomepageHistory) Search(ctx context.Context, input dto.HistorySearchInput) (*dto.HistorySearchOutput, error) { ret := _mock.Called(ctx, input) if len(ret) == 0 { panic("no return value specified for Search") } var r0 *dto.HistorySearchOutput var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, dto.HistorySearchInput) (*dto.HistorySearchOutput, error)); ok { return returnFunc(ctx, input) } if returnFunc, ok := ret.Get(0).(func(context.Context, dto.HistorySearchInput) *dto.HistorySearchOutput); ok { r0 = returnFunc(ctx, input) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*dto.HistorySearchOutput) } } if returnFunc, ok := ret.Get(1).(func(context.Context, dto.HistorySearchInput) error); ok { r1 = returnFunc(ctx, input) } else { r1 = ret.Error(1) } return r0, r1 } // MockHomepageHistory_Search_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Search' type MockHomepageHistory_Search_Call struct { *mock.Call } // Search is a helper method to define mock.On call // - ctx context.Context // - input dto.HistorySearchInput func (_e *MockHomepageHistory_Expecter) Search(ctx any, input any) *MockHomepageHistory_Search_Call { return &MockHomepageHistory_Search_Call{Call: _e.mock.On("Search", ctx, input)} } func (_c *MockHomepageHistory_Search_Call) Run(run func(ctx context.Context, input dto.HistorySearchInput)) *MockHomepageHistory_Search_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 dto.HistorySearchInput if args[1] != nil { arg1 = args[1].(dto.HistorySearchInput) } run( arg0, arg1, ) }) return _c } func (_c *MockHomepageHistory_Search_Call) Return(historySearchOutput *dto.HistorySearchOutput, err error) *MockHomepageHistory_Search_Call { _c.Call.Return(historySearchOutput, err) return _c } func (_c *MockHomepageHistory_Search_Call) RunAndReturn(run func(ctx context.Context, input dto.HistorySearchInput) (*dto.HistorySearchOutput, error)) *MockHomepageHistory_Search_Call { _c.Call.Return(run) return _c } // NewMockHomepageFavorites creates a new instance of MockHomepageFavorites. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewMockHomepageFavorites(t interface { mock.TestingT Cleanup(func()) }) *MockHomepageFavorites { mock := &MockHomepageFavorites{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock } // MockHomepageFavorites is an autogenerated mock type for the HomepageFavorites type type MockHomepageFavorites struct { mock.Mock } type MockHomepageFavorites_Expecter struct { mock *mock.Mock } func (_m *MockHomepageFavorites) EXPECT() *MockHomepageFavorites_Expecter { return &MockHomepageFavorites_Expecter{mock: &_m.Mock} } // AddFavorite provides a mock function for the type MockHomepageFavorites func (_mock *MockHomepageFavorites) AddFavorite(ctx context.Context, input dto.FavoriteCreateInput) (*entity.Favorite, error) { ret := _mock.Called(ctx, input) if len(ret) == 0 { panic("no return value specified for AddFavorite") } var r0 *entity.Favorite var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, dto.FavoriteCreateInput) (*entity.Favorite, error)); ok { return returnFunc(ctx, input) } if returnFunc, ok := ret.Get(0).(func(context.Context, dto.FavoriteCreateInput) *entity.Favorite); ok { r0 = returnFunc(ctx, input) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*entity.Favorite) } } if returnFunc, ok := ret.Get(1).(func(context.Context, dto.FavoriteCreateInput) error); ok { r1 = returnFunc(ctx, input) } else { r1 = ret.Error(1) } return r0, r1 } // MockHomepageFavorites_AddFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddFavorite' type MockHomepageFavorites_AddFavorite_Call struct { *mock.Call } // AddFavorite is a helper method to define mock.On call // - ctx context.Context // - input dto.FavoriteCreateInput func (_e *MockHomepageFavorites_Expecter) AddFavorite(ctx any, input any) *MockHomepageFavorites_AddFavorite_Call { return &MockHomepageFavorites_AddFavorite_Call{Call: _e.mock.On("AddFavorite", ctx, input)} } func (_c *MockHomepageFavorites_AddFavorite_Call) Run(run func(ctx context.Context, input dto.FavoriteCreateInput)) *MockHomepageFavorites_AddFavorite_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 dto.FavoriteCreateInput if args[1] != nil { arg1 = args[1].(dto.FavoriteCreateInput) } run( arg0, arg1, ) }) return _c } func (_c *MockHomepageFavorites_AddFavorite_Call) Return(favorite *entity.Favorite, err error) *MockHomepageFavorites_AddFavorite_Call { _c.Call.Return(favorite, err) return _c } func (_c *MockHomepageFavorites_AddFavorite_Call) RunAndReturn(run func(ctx context.Context, input dto.FavoriteCreateInput) (*entity.Favorite, error)) *MockHomepageFavorites_AddFavorite_Call { _c.Call.Return(run) return _c } // AddTag provides a mock function for the type MockHomepageFavorites func (_mock *MockHomepageFavorites) AddTag(ctx context.Context, name string, color string) (*entity.Tag, error) { ret := _mock.Called(ctx, name, color) if len(ret) == 0 { panic("no return value specified for AddTag") } var r0 *entity.Tag var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (*entity.Tag, error)); ok { return returnFunc(ctx, name, color) } if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) *entity.Tag); ok { r0 = returnFunc(ctx, name, color) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*entity.Tag) } } if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok { r1 = returnFunc(ctx, name, color) } else { r1 = ret.Error(1) } return r0, r1 } // MockHomepageFavorites_AddTag_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddTag' type MockHomepageFavorites_AddTag_Call struct { *mock.Call } // AddTag is a helper method to define mock.On call // - ctx context.Context // - name string // - color string func (_e *MockHomepageFavorites_Expecter) AddTag(ctx any, name any, color any) *MockHomepageFavorites_AddTag_Call { return &MockHomepageFavorites_AddTag_Call{Call: _e.mock.On("AddTag", ctx, name, color)} } func (_c *MockHomepageFavorites_AddTag_Call) Run(run func(ctx context.Context, name string, color string)) *MockHomepageFavorites_AddTag_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } var arg2 string if args[2] != nil { arg2 = args[2].(string) } run( arg0, arg1, arg2, ) }) return _c } func (_c *MockHomepageFavorites_AddTag_Call) Return(tag *entity.Tag, err error) *MockHomepageFavorites_AddTag_Call { _c.Call.Return(tag, err) return _c } func (_c *MockHomepageFavorites_AddTag_Call) RunAndReturn(run func(ctx context.Context, name string, color string) (*entity.Tag, error)) *MockHomepageFavorites_AddTag_Call { _c.Call.Return(run) return _c } // DeleteFavorite provides a mock function for the type MockHomepageFavorites func (_mock *MockHomepageFavorites) DeleteFavorite(ctx context.Context, id entity.FavoriteID) error { ret := _mock.Called(ctx, id) if len(ret) == 0 { panic("no return value specified for DeleteFavorite") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) error); ok { r0 = returnFunc(ctx, id) } else { r0 = ret.Error(0) } return r0 } // MockHomepageFavorites_DeleteFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteFavorite' type MockHomepageFavorites_DeleteFavorite_Call struct { *mock.Call } // DeleteFavorite is a helper method to define mock.On call // - ctx context.Context // - id entity.FavoriteID func (_e *MockHomepageFavorites_Expecter) DeleteFavorite(ctx any, id any) *MockHomepageFavorites_DeleteFavorite_Call { return &MockHomepageFavorites_DeleteFavorite_Call{Call: _e.mock.On("DeleteFavorite", ctx, id)} } func (_c *MockHomepageFavorites_DeleteFavorite_Call) Run(run func(ctx context.Context, id entity.FavoriteID)) *MockHomepageFavorites_DeleteFavorite_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 entity.FavoriteID if args[1] != nil { arg1 = args[1].(entity.FavoriteID) } run( arg0, arg1, ) }) return _c } func (_c *MockHomepageFavorites_DeleteFavorite_Call) Return(err error) *MockHomepageFavorites_DeleteFavorite_Call { _c.Call.Return(err) return _c } func (_c *MockHomepageFavorites_DeleteFavorite_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID) error) *MockHomepageFavorites_DeleteFavorite_Call { _c.Call.Return(run) return _c } // DeleteTag provides a mock function for the type MockHomepageFavorites func (_mock *MockHomepageFavorites) DeleteTag(ctx context.Context, id entity.TagID) error { ret := _mock.Called(ctx, id) if len(ret) == 0 { panic("no return value specified for DeleteTag") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID) error); ok { r0 = returnFunc(ctx, id) } else { r0 = ret.Error(0) } return r0 } // MockHomepageFavorites_DeleteTag_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteTag' type MockHomepageFavorites_DeleteTag_Call struct { *mock.Call } // DeleteTag is a helper method to define mock.On call // - ctx context.Context // - id entity.TagID func (_e *MockHomepageFavorites_Expecter) DeleteTag(ctx any, id any) *MockHomepageFavorites_DeleteTag_Call { return &MockHomepageFavorites_DeleteTag_Call{Call: _e.mock.On("DeleteTag", ctx, id)} } func (_c *MockHomepageFavorites_DeleteTag_Call) Run(run func(ctx context.Context, id entity.TagID)) *MockHomepageFavorites_DeleteTag_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 entity.TagID if args[1] != nil { arg1 = args[1].(entity.TagID) } run( arg0, arg1, ) }) return _c } func (_c *MockHomepageFavorites_DeleteTag_Call) Return(err error) *MockHomepageFavorites_DeleteTag_Call { _c.Call.Return(err) return _c } func (_c *MockHomepageFavorites_DeleteTag_Call) RunAndReturn(run func(ctx context.Context, id entity.TagID) error) *MockHomepageFavorites_DeleteTag_Call { _c.Call.Return(run) return _c } // GetAll provides a mock function for the type MockHomepageFavorites func (_mock *MockHomepageFavorites) GetAll(ctx context.Context) ([]*entity.Favorite, error) { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for GetAll") } var r0 []*entity.Favorite var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.Favorite, error)); ok { return returnFunc(ctx) } if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.Favorite); ok { r0 = returnFunc(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*entity.Favorite) } } if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } return r0, r1 } // MockHomepageFavorites_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll' type MockHomepageFavorites_GetAll_Call struct { *mock.Call } // GetAll is a helper method to define mock.On call // - ctx context.Context func (_e *MockHomepageFavorites_Expecter) GetAll(ctx any) *MockHomepageFavorites_GetAll_Call { return &MockHomepageFavorites_GetAll_Call{Call: _e.mock.On("GetAll", ctx)} } func (_c *MockHomepageFavorites_GetAll_Call) Run(run func(ctx context.Context)) *MockHomepageFavorites_GetAll_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } run( arg0, ) }) return _c } func (_c *MockHomepageFavorites_GetAll_Call) Return(favorites []*entity.Favorite, err error) *MockHomepageFavorites_GetAll_Call { _c.Call.Return(favorites, err) return _c } func (_c *MockHomepageFavorites_GetAll_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.Favorite, error)) *MockHomepageFavorites_GetAll_Call { _c.Call.Return(run) return _c } // GetAllTags provides a mock function for the type MockHomepageFavorites func (_mock *MockHomepageFavorites) GetAllTags(ctx context.Context) ([]*entity.Tag, error) { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for GetAllTags") } var r0 []*entity.Tag var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.Tag, error)); ok { return returnFunc(ctx) } if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.Tag); ok { r0 = returnFunc(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*entity.Tag) } } if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } return r0, r1 } // MockHomepageFavorites_GetAllTags_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllTags' type MockHomepageFavorites_GetAllTags_Call struct { *mock.Call } // GetAllTags is a helper method to define mock.On call // - ctx context.Context func (_e *MockHomepageFavorites_Expecter) GetAllTags(ctx any) *MockHomepageFavorites_GetAllTags_Call { return &MockHomepageFavorites_GetAllTags_Call{Call: _e.mock.On("GetAllTags", ctx)} } func (_c *MockHomepageFavorites_GetAllTags_Call) Run(run func(ctx context.Context)) *MockHomepageFavorites_GetAllTags_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } run( arg0, ) }) return _c } func (_c *MockHomepageFavorites_GetAllTags_Call) Return(tags []*entity.Tag, err error) *MockHomepageFavorites_GetAllTags_Call { _c.Call.Return(tags, err) return _c } func (_c *MockHomepageFavorites_GetAllTags_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.Tag, error)) *MockHomepageFavorites_GetAllTags_Call { _c.Call.Return(run) return _c } // GetByShortcut provides a mock function for the type MockHomepageFavorites func (_mock *MockHomepageFavorites) GetByShortcut(ctx context.Context, key int) (*entity.Favorite, error) { ret := _mock.Called(ctx, key) if len(ret) == 0 { panic("no return value specified for GetByShortcut") } var r0 *entity.Favorite var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, int) (*entity.Favorite, error)); ok { return returnFunc(ctx, key) } if returnFunc, ok := ret.Get(0).(func(context.Context, int) *entity.Favorite); ok { r0 = returnFunc(ctx, key) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*entity.Favorite) } } if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok { r1 = returnFunc(ctx, key) } else { r1 = ret.Error(1) } return r0, r1 } // MockHomepageFavorites_GetByShortcut_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByShortcut' type MockHomepageFavorites_GetByShortcut_Call struct { *mock.Call } // GetByShortcut is a helper method to define mock.On call // - ctx context.Context // - key int func (_e *MockHomepageFavorites_Expecter) GetByShortcut(ctx any, key any) *MockHomepageFavorites_GetByShortcut_Call { return &MockHomepageFavorites_GetByShortcut_Call{Call: _e.mock.On("GetByShortcut", ctx, key)} } func (_c *MockHomepageFavorites_GetByShortcut_Call) Run(run func(ctx context.Context, key int)) *MockHomepageFavorites_GetByShortcut_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 int if args[1] != nil { arg1 = args[1].(int) } run( arg0, arg1, ) }) return _c } func (_c *MockHomepageFavorites_GetByShortcut_Call) Return(favorite *entity.Favorite, err error) *MockHomepageFavorites_GetByShortcut_Call { _c.Call.Return(favorite, err) return _c } func (_c *MockHomepageFavorites_GetByShortcut_Call) RunAndReturn(run func(ctx context.Context, key int) (*entity.Favorite, error)) *MockHomepageFavorites_GetByShortcut_Call { _c.Call.Return(run) return _c } // SetShortcut provides a mock function for the type MockHomepageFavorites func (_mock *MockHomepageFavorites) SetShortcut(ctx context.Context, id entity.FavoriteID, key *int) error { ret := _mock.Called(ctx, id, key) if len(ret) == 0 { panic("no return value specified for SetShortcut") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, *int) error); ok { r0 = returnFunc(ctx, id, key) } else { r0 = ret.Error(0) } return r0 } // MockHomepageFavorites_SetShortcut_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetShortcut' type MockHomepageFavorites_SetShortcut_Call struct { *mock.Call } // SetShortcut is a helper method to define mock.On call // - ctx context.Context // - id entity.FavoriteID // - key *int func (_e *MockHomepageFavorites_Expecter) SetShortcut(ctx any, id any, key any) *MockHomepageFavorites_SetShortcut_Call { return &MockHomepageFavorites_SetShortcut_Call{Call: _e.mock.On("SetShortcut", ctx, id, key)} } func (_c *MockHomepageFavorites_SetShortcut_Call) Run(run func(ctx context.Context, id entity.FavoriteID, key *int)) *MockHomepageFavorites_SetShortcut_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 entity.FavoriteID if args[1] != nil { arg1 = args[1].(entity.FavoriteID) } var arg2 *int if args[2] != nil { arg2 = args[2].(*int) } run( arg0, arg1, arg2, ) }) return _c } func (_c *MockHomepageFavorites_SetShortcut_Call) Return(err error) *MockHomepageFavorites_SetShortcut_Call { _c.Call.Return(err) return _c } func (_c *MockHomepageFavorites_SetShortcut_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID, key *int) error) *MockHomepageFavorites_SetShortcut_Call { _c.Call.Return(run) return _c } // TagFavorite provides a mock function for the type MockHomepageFavorites func (_mock *MockHomepageFavorites) TagFavorite(ctx context.Context, favID entity.FavoriteID, tagID entity.TagID) error { ret := _mock.Called(ctx, favID, tagID) if len(ret) == 0 { panic("no return value specified for TagFavorite") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, entity.TagID) error); ok { r0 = returnFunc(ctx, favID, tagID) } else { r0 = ret.Error(0) } return r0 } // MockHomepageFavorites_TagFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TagFavorite' type MockHomepageFavorites_TagFavorite_Call struct { *mock.Call } // TagFavorite is a helper method to define mock.On call // - ctx context.Context // - favID entity.FavoriteID // - tagID entity.TagID func (_e *MockHomepageFavorites_Expecter) TagFavorite(ctx any, favID any, tagID any) *MockHomepageFavorites_TagFavorite_Call { return &MockHomepageFavorites_TagFavorite_Call{Call: _e.mock.On("TagFavorite", ctx, favID, tagID)} } func (_c *MockHomepageFavorites_TagFavorite_Call) Run(run func(ctx context.Context, favID entity.FavoriteID, tagID entity.TagID)) *MockHomepageFavorites_TagFavorite_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 entity.FavoriteID if args[1] != nil { arg1 = args[1].(entity.FavoriteID) } var arg2 entity.TagID if args[2] != nil { arg2 = args[2].(entity.TagID) } run( arg0, arg1, arg2, ) }) return _c } func (_c *MockHomepageFavorites_TagFavorite_Call) Return(err error) *MockHomepageFavorites_TagFavorite_Call { _c.Call.Return(err) return _c } func (_c *MockHomepageFavorites_TagFavorite_Call) RunAndReturn(run func(ctx context.Context, favID entity.FavoriteID, tagID entity.TagID) error) *MockHomepageFavorites_TagFavorite_Call { _c.Call.Return(run) return _c } // UntagFavorite provides a mock function for the type MockHomepageFavorites func (_mock *MockHomepageFavorites) UntagFavorite(ctx context.Context, favID entity.FavoriteID, tagID entity.TagID) error { ret := _mock.Called(ctx, favID, tagID) if len(ret) == 0 { panic("no return value specified for UntagFavorite") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, entity.TagID) error); ok { r0 = returnFunc(ctx, favID, tagID) } else { r0 = ret.Error(0) } return r0 } // MockHomepageFavorites_UntagFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UntagFavorite' type MockHomepageFavorites_UntagFavorite_Call struct { *mock.Call } // UntagFavorite is a helper method to define mock.On call // - ctx context.Context // - favID entity.FavoriteID // - tagID entity.TagID func (_e *MockHomepageFavorites_Expecter) UntagFavorite(ctx any, favID any, tagID any) *MockHomepageFavorites_UntagFavorite_Call { return &MockHomepageFavorites_UntagFavorite_Call{Call: _e.mock.On("UntagFavorite", ctx, favID, tagID)} } func (_c *MockHomepageFavorites_UntagFavorite_Call) Run(run func(ctx context.Context, favID entity.FavoriteID, tagID entity.TagID)) *MockHomepageFavorites_UntagFavorite_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 entity.FavoriteID if args[1] != nil { arg1 = args[1].(entity.FavoriteID) } var arg2 entity.TagID if args[2] != nil { arg2 = args[2].(entity.TagID) } run( arg0, arg1, arg2, ) }) return _c } func (_c *MockHomepageFavorites_UntagFavorite_Call) Return(err error) *MockHomepageFavorites_UntagFavorite_Call { _c.Call.Return(err) return _c } func (_c *MockHomepageFavorites_UntagFavorite_Call) RunAndReturn(run func(ctx context.Context, favID entity.FavoriteID, tagID entity.TagID) error) *MockHomepageFavorites_UntagFavorite_Call { _c.Call.Return(run) return _c } // UpdateFavorite provides a mock function for the type MockHomepageFavorites func (_mock *MockHomepageFavorites) UpdateFavorite(ctx context.Context, input dto.FavoriteUpdateInput) (*entity.Favorite, error) { ret := _mock.Called(ctx, input) if len(ret) == 0 { panic("no return value specified for UpdateFavorite") } var r0 *entity.Favorite var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, dto.FavoriteUpdateInput) (*entity.Favorite, error)); ok { return returnFunc(ctx, input) } if returnFunc, ok := ret.Get(0).(func(context.Context, dto.FavoriteUpdateInput) *entity.Favorite); ok { r0 = returnFunc(ctx, input) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*entity.Favorite) } } if returnFunc, ok := ret.Get(1).(func(context.Context, dto.FavoriteUpdateInput) error); ok { r1 = returnFunc(ctx, input) } else { r1 = ret.Error(1) } return r0, r1 } // MockHomepageFavorites_UpdateFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateFavorite' type MockHomepageFavorites_UpdateFavorite_Call struct { *mock.Call } // UpdateFavorite is a helper method to define mock.On call // - ctx context.Context // - input dto.FavoriteUpdateInput func (_e *MockHomepageFavorites_Expecter) UpdateFavorite(ctx any, input any) *MockHomepageFavorites_UpdateFavorite_Call { return &MockHomepageFavorites_UpdateFavorite_Call{Call: _e.mock.On("UpdateFavorite", ctx, input)} } func (_c *MockHomepageFavorites_UpdateFavorite_Call) Run(run func(ctx context.Context, input dto.FavoriteUpdateInput)) *MockHomepageFavorites_UpdateFavorite_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 dto.FavoriteUpdateInput if args[1] != nil { arg1 = args[1].(dto.FavoriteUpdateInput) } run( arg0, arg1, ) }) return _c } func (_c *MockHomepageFavorites_UpdateFavorite_Call) Return(favorite *entity.Favorite, err error) *MockHomepageFavorites_UpdateFavorite_Call { _c.Call.Return(favorite, err) return _c } func (_c *MockHomepageFavorites_UpdateFavorite_Call) RunAndReturn(run func(ctx context.Context, input dto.FavoriteUpdateInput) (*entity.Favorite, error)) *MockHomepageFavorites_UpdateFavorite_Call { _c.Call.Return(run) return _c } // UpdateTag provides a mock function for the type MockHomepageFavorites func (_mock *MockHomepageFavorites) UpdateTag(ctx context.Context, id entity.TagID, name string, color string) error { ret := _mock.Called(ctx, id, name, color) if len(ret) == 0 { panic("no return value specified for UpdateTag") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID, string, string) error); ok { r0 = returnFunc(ctx, id, name, color) } else { r0 = ret.Error(0) } return r0 } // MockHomepageFavorites_UpdateTag_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateTag' type MockHomepageFavorites_UpdateTag_Call struct { *mock.Call } // UpdateTag is a helper method to define mock.On call // - ctx context.Context // - id entity.TagID // - name string // - color string func (_e *MockHomepageFavorites_Expecter) UpdateTag(ctx any, id any, name any, color any) *MockHomepageFavorites_UpdateTag_Call { return &MockHomepageFavorites_UpdateTag_Call{Call: _e.mock.On("UpdateTag", ctx, id, name, color)} } func (_c *MockHomepageFavorites_UpdateTag_Call) Run(run func(ctx context.Context, id entity.TagID, name string, color string)) *MockHomepageFavorites_UpdateTag_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 entity.TagID if args[1] != nil { arg1 = args[1].(entity.TagID) } var arg2 string if args[2] != nil { arg2 = args[2].(string) } var arg3 string if args[3] != nil { arg3 = args[3].(string) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *MockHomepageFavorites_UpdateTag_Call) Return(err error) *MockHomepageFavorites_UpdateTag_Call { _c.Call.Return(err) return _c } func (_c *MockHomepageFavorites_UpdateTag_Call) RunAndReturn(run func(ctx context.Context, id entity.TagID, name string, color string) error) *MockHomepageFavorites_UpdateTag_Call { _c.Call.Return(run) return _c }