// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "github.com/bnema/dumber/internal/domain/favicon" mock "github.com/stretchr/testify/mock" ) // NewMockFaviconBlobStore creates a new instance of MockFaviconBlobStore. 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 NewMockFaviconBlobStore(t interface { mock.TestingT Cleanup(func()) }) *MockFaviconBlobStore { mock := &MockFaviconBlobStore{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock } // MockFaviconBlobStore is an autogenerated mock type for the FaviconBlobStore type type MockFaviconBlobStore struct { mock.Mock } type MockFaviconBlobStore_Expecter struct { mock *mock.Mock } func (_m *MockFaviconBlobStore) EXPECT() *MockFaviconBlobStore_Expecter { return &MockFaviconBlobStore_Expecter{mock: &_m.Mock} } // ReadOriginal provides a mock function for the type MockFaviconBlobStore func (_mock *MockFaviconBlobStore) ReadOriginal(ctx context.Context, key favicon.Key) ([]byte, string, error) { ret := _mock.Called(ctx, key) if len(ret) == 0 { panic("no return value specified for ReadOriginal") } var r0 []byte var r1 string var r2 error if returnFunc, ok := ret.Get(0).(func(context.Context, favicon.Key) ([]byte, string, error)); ok { return returnFunc(ctx, key) } if returnFunc, ok := ret.Get(0).(func(context.Context, favicon.Key) []byte); ok { r0 = returnFunc(ctx, key) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]byte) } } if returnFunc, ok := ret.Get(1).(func(context.Context, favicon.Key) string); ok { r1 = returnFunc(ctx, key) } else { r1 = ret.Get(1).(string) } if returnFunc, ok := ret.Get(2).(func(context.Context, favicon.Key) error); ok { r2 = returnFunc(ctx, key) } else { r2 = ret.Error(2) } return r0, r1, r2 } // MockFaviconBlobStore_ReadOriginal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadOriginal' type MockFaviconBlobStore_ReadOriginal_Call struct { *mock.Call } // ReadOriginal is a helper method to define mock.On call // - ctx context.Context // - key favicon.Key func (_e *MockFaviconBlobStore_Expecter) ReadOriginal(ctx any, key any) *MockFaviconBlobStore_ReadOriginal_Call { return &MockFaviconBlobStore_ReadOriginal_Call{Call: _e.mock.On("ReadOriginal", ctx, key)} } func (_c *MockFaviconBlobStore_ReadOriginal_Call) Run(run func(ctx context.Context, key favicon.Key)) *MockFaviconBlobStore_ReadOriginal_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 favicon.Key if args[1] != nil { arg1 = args[1].(favicon.Key) } run( arg0, arg1, ) }) return _c } func (_c *MockFaviconBlobStore_ReadOriginal_Call) Return(bytes []byte, s string, err error) *MockFaviconBlobStore_ReadOriginal_Call { _c.Call.Return(bytes, s, err) return _c } func (_c *MockFaviconBlobStore_ReadOriginal_Call) RunAndReturn(run func(ctx context.Context, key favicon.Key) ([]byte, string, error)) *MockFaviconBlobStore_ReadOriginal_Call { _c.Call.Return(run) return _c } // ReadPNG provides a mock function for the type MockFaviconBlobStore func (_mock *MockFaviconBlobStore) ReadPNG(ctx context.Context, key favicon.Key) ([]byte, string, error) { ret := _mock.Called(ctx, key) if len(ret) == 0 { panic("no return value specified for ReadPNG") } var r0 []byte var r1 string var r2 error if returnFunc, ok := ret.Get(0).(func(context.Context, favicon.Key) ([]byte, string, error)); ok { return returnFunc(ctx, key) } if returnFunc, ok := ret.Get(0).(func(context.Context, favicon.Key) []byte); ok { r0 = returnFunc(ctx, key) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]byte) } } if returnFunc, ok := ret.Get(1).(func(context.Context, favicon.Key) string); ok { r1 = returnFunc(ctx, key) } else { r1 = ret.Get(1).(string) } if returnFunc, ok := ret.Get(2).(func(context.Context, favicon.Key) error); ok { r2 = returnFunc(ctx, key) } else { r2 = ret.Error(2) } return r0, r1, r2 } // MockFaviconBlobStore_ReadPNG_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadPNG' type MockFaviconBlobStore_ReadPNG_Call struct { *mock.Call } // ReadPNG is a helper method to define mock.On call // - ctx context.Context // - key favicon.Key func (_e *MockFaviconBlobStore_Expecter) ReadPNG(ctx any, key any) *MockFaviconBlobStore_ReadPNG_Call { return &MockFaviconBlobStore_ReadPNG_Call{Call: _e.mock.On("ReadPNG", ctx, key)} } func (_c *MockFaviconBlobStore_ReadPNG_Call) Run(run func(ctx context.Context, key favicon.Key)) *MockFaviconBlobStore_ReadPNG_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 favicon.Key if args[1] != nil { arg1 = args[1].(favicon.Key) } run( arg0, arg1, ) }) return _c } func (_c *MockFaviconBlobStore_ReadPNG_Call) Return(bytes []byte, s string, err error) *MockFaviconBlobStore_ReadPNG_Call { _c.Call.Return(bytes, s, err) return _c } func (_c *MockFaviconBlobStore_ReadPNG_Call) RunAndReturn(run func(ctx context.Context, key favicon.Key) ([]byte, string, error)) *MockFaviconBlobStore_ReadPNG_Call { _c.Call.Return(run) return _c } // ReadSizedPNG provides a mock function for the type MockFaviconBlobStore func (_mock *MockFaviconBlobStore) ReadSizedPNG(ctx context.Context, key favicon.Key, size int) ([]byte, string, error) { ret := _mock.Called(ctx, key, size) if len(ret) == 0 { panic("no return value specified for ReadSizedPNG") } var r0 []byte var r1 string var r2 error if returnFunc, ok := ret.Get(0).(func(context.Context, favicon.Key, int) ([]byte, string, error)); ok { return returnFunc(ctx, key, size) } if returnFunc, ok := ret.Get(0).(func(context.Context, favicon.Key, int) []byte); ok { r0 = returnFunc(ctx, key, size) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]byte) } } if returnFunc, ok := ret.Get(1).(func(context.Context, favicon.Key, int) string); ok { r1 = returnFunc(ctx, key, size) } else { r1 = ret.Get(1).(string) } if returnFunc, ok := ret.Get(2).(func(context.Context, favicon.Key, int) error); ok { r2 = returnFunc(ctx, key, size) } else { r2 = ret.Error(2) } return r0, r1, r2 } // MockFaviconBlobStore_ReadSizedPNG_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadSizedPNG' type MockFaviconBlobStore_ReadSizedPNG_Call struct { *mock.Call } // ReadSizedPNG is a helper method to define mock.On call // - ctx context.Context // - key favicon.Key // - size int func (_e *MockFaviconBlobStore_Expecter) ReadSizedPNG(ctx any, key any, size any) *MockFaviconBlobStore_ReadSizedPNG_Call { return &MockFaviconBlobStore_ReadSizedPNG_Call{Call: _e.mock.On("ReadSizedPNG", ctx, key, size)} } func (_c *MockFaviconBlobStore_ReadSizedPNG_Call) Run(run func(ctx context.Context, key favicon.Key, size int)) *MockFaviconBlobStore_ReadSizedPNG_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 favicon.Key if args[1] != nil { arg1 = args[1].(favicon.Key) } var arg2 int if args[2] != nil { arg2 = args[2].(int) } run( arg0, arg1, arg2, ) }) return _c } func (_c *MockFaviconBlobStore_ReadSizedPNG_Call) Return(bytes []byte, s string, err error) *MockFaviconBlobStore_ReadSizedPNG_Call { _c.Call.Return(bytes, s, err) return _c } func (_c *MockFaviconBlobStore_ReadSizedPNG_Call) RunAndReturn(run func(ctx context.Context, key favicon.Key, size int) ([]byte, string, error)) *MockFaviconBlobStore_ReadSizedPNG_Call { _c.Call.Return(run) return _c } // RemoveDerived provides a mock function for the type MockFaviconBlobStore func (_mock *MockFaviconBlobStore) RemoveDerived(ctx context.Context, key favicon.Key) error { ret := _mock.Called(ctx, key) if len(ret) == 0 { panic("no return value specified for RemoveDerived") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, favicon.Key) error); ok { r0 = returnFunc(ctx, key) } else { r0 = ret.Error(0) } return r0 } // MockFaviconBlobStore_RemoveDerived_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveDerived' type MockFaviconBlobStore_RemoveDerived_Call struct { *mock.Call } // RemoveDerived is a helper method to define mock.On call // - ctx context.Context // - key favicon.Key func (_e *MockFaviconBlobStore_Expecter) RemoveDerived(ctx any, key any) *MockFaviconBlobStore_RemoveDerived_Call { return &MockFaviconBlobStore_RemoveDerived_Call{Call: _e.mock.On("RemoveDerived", ctx, key)} } func (_c *MockFaviconBlobStore_RemoveDerived_Call) Run(run func(ctx context.Context, key favicon.Key)) *MockFaviconBlobStore_RemoveDerived_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 favicon.Key if args[1] != nil { arg1 = args[1].(favicon.Key) } run( arg0, arg1, ) }) return _c } func (_c *MockFaviconBlobStore_RemoveDerived_Call) Return(err error) *MockFaviconBlobStore_RemoveDerived_Call { _c.Call.Return(err) return _c } func (_c *MockFaviconBlobStore_RemoveDerived_Call) RunAndReturn(run func(ctx context.Context, key favicon.Key) error) *MockFaviconBlobStore_RemoveDerived_Call { _c.Call.Return(run) return _c } // WriteOriginal provides a mock function for the type MockFaviconBlobStore func (_mock *MockFaviconBlobStore) WriteOriginal(ctx context.Context, key favicon.Key, data []byte, contentType string) error { ret := _mock.Called(ctx, key, data, contentType) if len(ret) == 0 { panic("no return value specified for WriteOriginal") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, favicon.Key, []byte, string) error); ok { r0 = returnFunc(ctx, key, data, contentType) } else { r0 = ret.Error(0) } return r0 } // MockFaviconBlobStore_WriteOriginal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WriteOriginal' type MockFaviconBlobStore_WriteOriginal_Call struct { *mock.Call } // WriteOriginal is a helper method to define mock.On call // - ctx context.Context // - key favicon.Key // - data []byte // - contentType string func (_e *MockFaviconBlobStore_Expecter) WriteOriginal(ctx any, key any, data any, contentType any) *MockFaviconBlobStore_WriteOriginal_Call { return &MockFaviconBlobStore_WriteOriginal_Call{Call: _e.mock.On("WriteOriginal", ctx, key, data, contentType)} } func (_c *MockFaviconBlobStore_WriteOriginal_Call) Run(run func(ctx context.Context, key favicon.Key, data []byte, contentType string)) *MockFaviconBlobStore_WriteOriginal_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 favicon.Key if args[1] != nil { arg1 = args[1].(favicon.Key) } var arg2 []byte if args[2] != nil { arg2 = args[2].([]byte) } var arg3 string if args[3] != nil { arg3 = args[3].(string) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *MockFaviconBlobStore_WriteOriginal_Call) Return(err error) *MockFaviconBlobStore_WriteOriginal_Call { _c.Call.Return(err) return _c } func (_c *MockFaviconBlobStore_WriteOriginal_Call) RunAndReturn(run func(ctx context.Context, key favicon.Key, data []byte, contentType string) error) *MockFaviconBlobStore_WriteOriginal_Call { _c.Call.Return(run) return _c } // WritePNG provides a mock function for the type MockFaviconBlobStore func (_mock *MockFaviconBlobStore) WritePNG(ctx context.Context, key favicon.Key, data []byte) error { ret := _mock.Called(ctx, key, data) if len(ret) == 0 { panic("no return value specified for WritePNG") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, favicon.Key, []byte) error); ok { r0 = returnFunc(ctx, key, data) } else { r0 = ret.Error(0) } return r0 } // MockFaviconBlobStore_WritePNG_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WritePNG' type MockFaviconBlobStore_WritePNG_Call struct { *mock.Call } // WritePNG is a helper method to define mock.On call // - ctx context.Context // - key favicon.Key // - data []byte func (_e *MockFaviconBlobStore_Expecter) WritePNG(ctx any, key any, data any) *MockFaviconBlobStore_WritePNG_Call { return &MockFaviconBlobStore_WritePNG_Call{Call: _e.mock.On("WritePNG", ctx, key, data)} } func (_c *MockFaviconBlobStore_WritePNG_Call) Run(run func(ctx context.Context, key favicon.Key, data []byte)) *MockFaviconBlobStore_WritePNG_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 favicon.Key if args[1] != nil { arg1 = args[1].(favicon.Key) } var arg2 []byte if args[2] != nil { arg2 = args[2].([]byte) } run( arg0, arg1, arg2, ) }) return _c } func (_c *MockFaviconBlobStore_WritePNG_Call) Return(err error) *MockFaviconBlobStore_WritePNG_Call { _c.Call.Return(err) return _c } func (_c *MockFaviconBlobStore_WritePNG_Call) RunAndReturn(run func(ctx context.Context, key favicon.Key, data []byte) error) *MockFaviconBlobStore_WritePNG_Call { _c.Call.Return(run) return _c } // WriteSizedPNG provides a mock function for the type MockFaviconBlobStore func (_mock *MockFaviconBlobStore) WriteSizedPNG(ctx context.Context, key favicon.Key, size int, data []byte) error { ret := _mock.Called(ctx, key, size, data) if len(ret) == 0 { panic("no return value specified for WriteSizedPNG") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, favicon.Key, int, []byte) error); ok { r0 = returnFunc(ctx, key, size, data) } else { r0 = ret.Error(0) } return r0 } // MockFaviconBlobStore_WriteSizedPNG_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WriteSizedPNG' type MockFaviconBlobStore_WriteSizedPNG_Call struct { *mock.Call } // WriteSizedPNG is a helper method to define mock.On call // - ctx context.Context // - key favicon.Key // - size int // - data []byte func (_e *MockFaviconBlobStore_Expecter) WriteSizedPNG(ctx any, key any, size any, data any) *MockFaviconBlobStore_WriteSizedPNG_Call { return &MockFaviconBlobStore_WriteSizedPNG_Call{Call: _e.mock.On("WriteSizedPNG", ctx, key, size, data)} } func (_c *MockFaviconBlobStore_WriteSizedPNG_Call) Run(run func(ctx context.Context, key favicon.Key, size int, data []byte)) *MockFaviconBlobStore_WriteSizedPNG_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 favicon.Key if args[1] != nil { arg1 = args[1].(favicon.Key) } var arg2 int if args[2] != nil { arg2 = args[2].(int) } var arg3 []byte if args[3] != nil { arg3 = args[3].([]byte) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *MockFaviconBlobStore_WriteSizedPNG_Call) Return(err error) *MockFaviconBlobStore_WriteSizedPNG_Call { _c.Call.Return(err) return _c } func (_c *MockFaviconBlobStore_WriteSizedPNG_Call) RunAndReturn(run func(ctx context.Context, key favicon.Key, size int, data []byte) error) *MockFaviconBlobStore_WriteSizedPNG_Call { _c.Call.Return(run) return _c }