// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "io" "bnema.dev/ermite/internal/ports" mock "github.com/stretchr/testify/mock" ) // NewBlobStore creates a new instance of BlobStore. 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 NewBlobStore(t interface { mock.TestingT Cleanup(func()) }) *BlobStore { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &BlobStore{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // BlobStore is an autogenerated mock type for the BlobStore type type BlobStore struct { mock.Mock } type BlobStore_Expecter struct { mock *mock.Mock } func (_m *BlobStore) EXPECT() *BlobStore_Expecter { return &BlobStore_Expecter{mock: &_m.Mock} } // AbortMultipart provides a mock function for the type BlobStore func (_mock *BlobStore) AbortMultipart(ctx context.Context, key string, id string) error { ret := _mock.Called(ctx, key, id) if len(ret) == 0 { panic("no return value specified for AbortMultipart") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) error); ok { r0 = returnFunc(ctx, key, id) } else { r0 = ret.Error(0) } return r0 } // BlobStore_AbortMultipart_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AbortMultipart' type BlobStore_AbortMultipart_Call struct { *mock.Call } // AbortMultipart is a helper method to define mock.On call // - ctx context.Context // - key string // - id string func (_e *BlobStore_Expecter) AbortMultipart(ctx any, key any, id any) *BlobStore_AbortMultipart_Call { return &BlobStore_AbortMultipart_Call{Call: _e.mock.On("AbortMultipart", ctx, key, id)} } func (_c *BlobStore_AbortMultipart_Call) Run(run func(ctx context.Context, key string, id string)) *BlobStore_AbortMultipart_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 *BlobStore_AbortMultipart_Call) Return(err error) *BlobStore_AbortMultipart_Call { _c.Call.Return(err) return _c } func (_c *BlobStore_AbortMultipart_Call) RunAndReturn(run func(ctx context.Context, key string, id string) error) *BlobStore_AbortMultipart_Call { _c.Call.Return(run) return _c } // Check provides a mock function for the type BlobStore func (_mock *BlobStore) Check(ctx context.Context) error { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for Check") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok { r0 = returnFunc(ctx) } else { r0 = ret.Error(0) } return r0 } // BlobStore_Check_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Check' type BlobStore_Check_Call struct { *mock.Call } // Check is a helper method to define mock.On call // - ctx context.Context func (_e *BlobStore_Expecter) Check(ctx any) *BlobStore_Check_Call { return &BlobStore_Check_Call{Call: _e.mock.On("Check", ctx)} } func (_c *BlobStore_Check_Call) Run(run func(ctx context.Context)) *BlobStore_Check_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 *BlobStore_Check_Call) Return(err error) *BlobStore_Check_Call { _c.Call.Return(err) return _c } func (_c *BlobStore_Check_Call) RunAndReturn(run func(ctx context.Context) error) *BlobStore_Check_Call { _c.Call.Return(run) return _c } // Delete provides a mock function for the type BlobStore func (_mock *BlobStore) Delete(ctx context.Context, key string) error { ret := _mock.Called(ctx, key) if len(ret) == 0 { panic("no return value specified for Delete") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = returnFunc(ctx, key) } else { r0 = ret.Error(0) } return r0 } // BlobStore_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' type BlobStore_Delete_Call struct { *mock.Call } // Delete is a helper method to define mock.On call // - ctx context.Context // - key string func (_e *BlobStore_Expecter) Delete(ctx any, key any) *BlobStore_Delete_Call { return &BlobStore_Delete_Call{Call: _e.mock.On("Delete", ctx, key)} } func (_c *BlobStore_Delete_Call) Run(run func(ctx context.Context, key string)) *BlobStore_Delete_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 *BlobStore_Delete_Call) Return(err error) *BlobStore_Delete_Call { _c.Call.Return(err) return _c } func (_c *BlobStore_Delete_Call) RunAndReturn(run func(ctx context.Context, key string) error) *BlobStore_Delete_Call { _c.Call.Return(run) return _c } // List provides a mock function for the type BlobStore func (_mock *BlobStore) List(ctx context.Context, prefix string, fn func(ports.BlobInfo) error) error { ret := _mock.Called(ctx, prefix, fn) if len(ret) == 0 { panic("no return value specified for List") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, func(ports.BlobInfo) error) error); ok { r0 = returnFunc(ctx, prefix, fn) } else { r0 = ret.Error(0) } return r0 } // BlobStore_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' type BlobStore_List_Call struct { *mock.Call } // List is a helper method to define mock.On call // - ctx context.Context // - prefix string // - fn func(ports.BlobInfo) error func (_e *BlobStore_Expecter) List(ctx any, prefix any, fn any) *BlobStore_List_Call { return &BlobStore_List_Call{Call: _e.mock.On("List", ctx, prefix, fn)} } func (_c *BlobStore_List_Call) Run(run func(ctx context.Context, prefix string, fn func(ports.BlobInfo) error)) *BlobStore_List_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 func(ports.BlobInfo) error if args[2] != nil { arg2 = args[2].(func(ports.BlobInfo) error) } run( arg0, arg1, arg2, ) }) return _c } func (_c *BlobStore_List_Call) Return(err error) *BlobStore_List_Call { _c.Call.Return(err) return _c } func (_c *BlobStore_List_Call) RunAndReturn(run func(ctx context.Context, prefix string, fn func(ports.BlobInfo) error) error) *BlobStore_List_Call { _c.Call.Return(run) return _c } // ListMultipart provides a mock function for the type BlobStore func (_mock *BlobStore) ListMultipart(ctx context.Context, prefix string, fn func(ports.MultipartInfo) error) error { ret := _mock.Called(ctx, prefix, fn) if len(ret) == 0 { panic("no return value specified for ListMultipart") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, func(ports.MultipartInfo) error) error); ok { r0 = returnFunc(ctx, prefix, fn) } else { r0 = ret.Error(0) } return r0 } // BlobStore_ListMultipart_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListMultipart' type BlobStore_ListMultipart_Call struct { *mock.Call } // ListMultipart is a helper method to define mock.On call // - ctx context.Context // - prefix string // - fn func(ports.MultipartInfo) error func (_e *BlobStore_Expecter) ListMultipart(ctx any, prefix any, fn any) *BlobStore_ListMultipart_Call { return &BlobStore_ListMultipart_Call{Call: _e.mock.On("ListMultipart", ctx, prefix, fn)} } func (_c *BlobStore_ListMultipart_Call) Run(run func(ctx context.Context, prefix string, fn func(ports.MultipartInfo) error)) *BlobStore_ListMultipart_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 func(ports.MultipartInfo) error if args[2] != nil { arg2 = args[2].(func(ports.MultipartInfo) error) } run( arg0, arg1, arg2, ) }) return _c } func (_c *BlobStore_ListMultipart_Call) Return(err error) *BlobStore_ListMultipart_Call { _c.Call.Return(err) return _c } func (_c *BlobStore_ListMultipart_Call) RunAndReturn(run func(ctx context.Context, prefix string, fn func(ports.MultipartInfo) error) error) *BlobStore_ListMultipart_Call { _c.Call.Return(run) return _c } // NewMultipart provides a mock function for the type BlobStore func (_mock *BlobStore) NewMultipart(ctx context.Context, key string) (ports.MultipartUpload, error) { ret := _mock.Called(ctx, key) if len(ret) == 0 { panic("no return value specified for NewMultipart") } var r0 ports.MultipartUpload var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) (ports.MultipartUpload, error)); ok { return returnFunc(ctx, key) } if returnFunc, ok := ret.Get(0).(func(context.Context, string) ports.MultipartUpload); ok { r0 = returnFunc(ctx, key) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(ports.MultipartUpload) } } if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = returnFunc(ctx, key) } else { r1 = ret.Error(1) } return r0, r1 } // BlobStore_NewMultipart_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewMultipart' type BlobStore_NewMultipart_Call struct { *mock.Call } // NewMultipart is a helper method to define mock.On call // - ctx context.Context // - key string func (_e *BlobStore_Expecter) NewMultipart(ctx any, key any) *BlobStore_NewMultipart_Call { return &BlobStore_NewMultipart_Call{Call: _e.mock.On("NewMultipart", ctx, key)} } func (_c *BlobStore_NewMultipart_Call) Run(run func(ctx context.Context, key string)) *BlobStore_NewMultipart_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 *BlobStore_NewMultipart_Call) Return(multipartUpload ports.MultipartUpload, err error) *BlobStore_NewMultipart_Call { _c.Call.Return(multipartUpload, err) return _c } func (_c *BlobStore_NewMultipart_Call) RunAndReturn(run func(ctx context.Context, key string) (ports.MultipartUpload, error)) *BlobStore_NewMultipart_Call { _c.Call.Return(run) return _c } // Open provides a mock function for the type BlobStore func (_mock *BlobStore) Open(ctx context.Context, key string, offset int64, length int64) (io.ReadCloser, ports.BlobInfo, error) { ret := _mock.Called(ctx, key, offset, length) if len(ret) == 0 { panic("no return value specified for Open") } var r0 io.ReadCloser var r1 ports.BlobInfo var r2 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, int64, int64) (io.ReadCloser, ports.BlobInfo, error)); ok { return returnFunc(ctx, key, offset, length) } if returnFunc, ok := ret.Get(0).(func(context.Context, string, int64, int64) io.ReadCloser); ok { r0 = returnFunc(ctx, key, offset, length) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(io.ReadCloser) } } if returnFunc, ok := ret.Get(1).(func(context.Context, string, int64, int64) ports.BlobInfo); ok { r1 = returnFunc(ctx, key, offset, length) } else { r1 = ret.Get(1).(ports.BlobInfo) } if returnFunc, ok := ret.Get(2).(func(context.Context, string, int64, int64) error); ok { r2 = returnFunc(ctx, key, offset, length) } else { r2 = ret.Error(2) } return r0, r1, r2 } // BlobStore_Open_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Open' type BlobStore_Open_Call struct { *mock.Call } // Open is a helper method to define mock.On call // - ctx context.Context // - key string // - offset int64 // - length int64 func (_e *BlobStore_Expecter) Open(ctx any, key any, offset any, length any) *BlobStore_Open_Call { return &BlobStore_Open_Call{Call: _e.mock.On("Open", ctx, key, offset, length)} } func (_c *BlobStore_Open_Call) Run(run func(ctx context.Context, key string, offset int64, length int64)) *BlobStore_Open_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 int64 if args[2] != nil { arg2 = args[2].(int64) } var arg3 int64 if args[3] != nil { arg3 = args[3].(int64) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *BlobStore_Open_Call) Return(readCloser io.ReadCloser, blobInfo ports.BlobInfo, err error) *BlobStore_Open_Call { _c.Call.Return(readCloser, blobInfo, err) return _c } func (_c *BlobStore_Open_Call) RunAndReturn(run func(ctx context.Context, key string, offset int64, length int64) (io.ReadCloser, ports.BlobInfo, error)) *BlobStore_Open_Call { _c.Call.Return(run) return _c } // Put provides a mock function for the type BlobStore func (_mock *BlobStore) Put(ctx context.Context, key string, r io.Reader, size int64) (ports.BlobInfo, error) { ret := _mock.Called(ctx, key, r, size) if len(ret) == 0 { panic("no return value specified for Put") } var r0 ports.BlobInfo var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, io.Reader, int64) (ports.BlobInfo, error)); ok { return returnFunc(ctx, key, r, size) } if returnFunc, ok := ret.Get(0).(func(context.Context, string, io.Reader, int64) ports.BlobInfo); ok { r0 = returnFunc(ctx, key, r, size) } else { r0 = ret.Get(0).(ports.BlobInfo) } if returnFunc, ok := ret.Get(1).(func(context.Context, string, io.Reader, int64) error); ok { r1 = returnFunc(ctx, key, r, size) } else { r1 = ret.Error(1) } return r0, r1 } // BlobStore_Put_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Put' type BlobStore_Put_Call struct { *mock.Call } // Put is a helper method to define mock.On call // - ctx context.Context // - key string // - r io.Reader // - size int64 func (_e *BlobStore_Expecter) Put(ctx any, key any, r any, size any) *BlobStore_Put_Call { return &BlobStore_Put_Call{Call: _e.mock.On("Put", ctx, key, r, size)} } func (_c *BlobStore_Put_Call) Run(run func(ctx context.Context, key string, r io.Reader, size int64)) *BlobStore_Put_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 io.Reader if args[2] != nil { arg2 = args[2].(io.Reader) } var arg3 int64 if args[3] != nil { arg3 = args[3].(int64) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *BlobStore_Put_Call) Return(blobInfo ports.BlobInfo, err error) *BlobStore_Put_Call { _c.Call.Return(blobInfo, err) return _c } func (_c *BlobStore_Put_Call) RunAndReturn(run func(ctx context.Context, key string, r io.Reader, size int64) (ports.BlobInfo, error)) *BlobStore_Put_Call { _c.Call.Return(run) return _c } // Stat provides a mock function for the type BlobStore func (_mock *BlobStore) Stat(ctx context.Context, key string) (ports.BlobInfo, error) { ret := _mock.Called(ctx, key) if len(ret) == 0 { panic("no return value specified for Stat") } var r0 ports.BlobInfo var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) (ports.BlobInfo, error)); ok { return returnFunc(ctx, key) } if returnFunc, ok := ret.Get(0).(func(context.Context, string) ports.BlobInfo); ok { r0 = returnFunc(ctx, key) } else { r0 = ret.Get(0).(ports.BlobInfo) } if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = returnFunc(ctx, key) } else { r1 = ret.Error(1) } return r0, r1 } // BlobStore_Stat_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stat' type BlobStore_Stat_Call struct { *mock.Call } // Stat is a helper method to define mock.On call // - ctx context.Context // - key string func (_e *BlobStore_Expecter) Stat(ctx any, key any) *BlobStore_Stat_Call { return &BlobStore_Stat_Call{Call: _e.mock.On("Stat", ctx, key)} } func (_c *BlobStore_Stat_Call) Run(run func(ctx context.Context, key string)) *BlobStore_Stat_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 *BlobStore_Stat_Call) Return(blobInfo ports.BlobInfo, err error) *BlobStore_Stat_Call { _c.Call.Return(blobInfo, err) return _c } func (_c *BlobStore_Stat_Call) RunAndReturn(run func(ctx context.Context, key string) (ports.BlobInfo, error)) *BlobStore_Stat_Call { _c.Call.Return(run) return _c }