// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "io" "github.com/bnema/gordon/internal/domain" mock "github.com/stretchr/testify/mock" ) // NewMockRegistryService creates a new instance of MockRegistryService. 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 NewMockRegistryService(t interface { mock.TestingT Cleanup(func()) }) *MockRegistryService { mock := &MockRegistryService{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock } // MockRegistryService is an autogenerated mock type for the RegistryService type type MockRegistryService struct { mock.Mock } type MockRegistryService_Expecter struct { mock *mock.Mock } func (_m *MockRegistryService) EXPECT() *MockRegistryService_Expecter { return &MockRegistryService_Expecter{mock: &_m.Mock} } // AppendBlobChunk provides a mock function for the type MockRegistryService func (_mock *MockRegistryService) AppendBlobChunk(ctx context.Context, name string, uuid string, data io.Reader, contentLength int64, maxBlobSize int64) (int64, error) { ret := _mock.Called(ctx, name, uuid, data, contentLength, maxBlobSize) if len(ret) == 0 { panic("no return value specified for AppendBlobChunk") } var r0 int64 var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, int64, int64) (int64, error)); ok { return returnFunc(ctx, name, uuid, data, contentLength, maxBlobSize) } if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, int64, int64) int64); ok { r0 = returnFunc(ctx, name, uuid, data, contentLength, maxBlobSize) } else { r0 = ret.Get(0).(int64) } if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, io.Reader, int64, int64) error); ok { r1 = returnFunc(ctx, name, uuid, data, contentLength, maxBlobSize) } else { r1 = ret.Error(1) } return r0, r1 } // MockRegistryService_AppendBlobChunk_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AppendBlobChunk' type MockRegistryService_AppendBlobChunk_Call struct { *mock.Call } // AppendBlobChunk is a helper method to define mock.On call // - ctx context.Context // - name string // - uuid string // - data io.Reader // - contentLength int64 // - maxBlobSize int64 func (_e *MockRegistryService_Expecter) AppendBlobChunk(ctx any, name any, uuid any, data any, contentLength any, maxBlobSize any) *MockRegistryService_AppendBlobChunk_Call { return &MockRegistryService_AppendBlobChunk_Call{Call: _e.mock.On("AppendBlobChunk", ctx, name, uuid, data, contentLength, maxBlobSize)} } func (_c *MockRegistryService_AppendBlobChunk_Call) Run(run func(ctx context.Context, name string, uuid string, data io.Reader, contentLength int64, maxBlobSize int64)) *MockRegistryService_AppendBlobChunk_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) } var arg3 io.Reader if args[3] != nil { arg3 = args[3].(io.Reader) } var arg4 int64 if args[4] != nil { arg4 = args[4].(int64) } var arg5 int64 if args[5] != nil { arg5 = args[5].(int64) } run( arg0, arg1, arg2, arg3, arg4, arg5, ) }) return _c } func (_c *MockRegistryService_AppendBlobChunk_Call) Return(n int64, err error) *MockRegistryService_AppendBlobChunk_Call { _c.Call.Return(n, err) return _c } func (_c *MockRegistryService_AppendBlobChunk_Call) RunAndReturn(run func(ctx context.Context, name string, uuid string, data io.Reader, contentLength int64, maxBlobSize int64) (int64, error)) *MockRegistryService_AppendBlobChunk_Call { _c.Call.Return(run) return _c } // BlobExists provides a mock function for the type MockRegistryService func (_mock *MockRegistryService) BlobExists(ctx context.Context, digest string) bool { ret := _mock.Called(ctx, digest) if len(ret) == 0 { panic("no return value specified for BlobExists") } var r0 bool if returnFunc, ok := ret.Get(0).(func(context.Context, string) bool); ok { r0 = returnFunc(ctx, digest) } else { r0 = ret.Get(0).(bool) } return r0 } // MockRegistryService_BlobExists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlobExists' type MockRegistryService_BlobExists_Call struct { *mock.Call } // BlobExists is a helper method to define mock.On call // - ctx context.Context // - digest string func (_e *MockRegistryService_Expecter) BlobExists(ctx any, digest any) *MockRegistryService_BlobExists_Call { return &MockRegistryService_BlobExists_Call{Call: _e.mock.On("BlobExists", ctx, digest)} } func (_c *MockRegistryService_BlobExists_Call) Run(run func(ctx context.Context, digest string)) *MockRegistryService_BlobExists_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 *MockRegistryService_BlobExists_Call) Return(b bool) *MockRegistryService_BlobExists_Call { _c.Call.Return(b) return _c } func (_c *MockRegistryService_BlobExists_Call) RunAndReturn(run func(ctx context.Context, digest string) bool) *MockRegistryService_BlobExists_Call { _c.Call.Return(run) return _c } // CancelUpload provides a mock function for the type MockRegistryService func (_mock *MockRegistryService) CancelUpload(ctx context.Context, uuid string) error { ret := _mock.Called(ctx, uuid) if len(ret) == 0 { panic("no return value specified for CancelUpload") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = returnFunc(ctx, uuid) } else { r0 = ret.Error(0) } return r0 } // MockRegistryService_CancelUpload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CancelUpload' type MockRegistryService_CancelUpload_Call struct { *mock.Call } // CancelUpload is a helper method to define mock.On call // - ctx context.Context // - uuid string func (_e *MockRegistryService_Expecter) CancelUpload(ctx any, uuid any) *MockRegistryService_CancelUpload_Call { return &MockRegistryService_CancelUpload_Call{Call: _e.mock.On("CancelUpload", ctx, uuid)} } func (_c *MockRegistryService_CancelUpload_Call) Run(run func(ctx context.Context, uuid string)) *MockRegistryService_CancelUpload_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 *MockRegistryService_CancelUpload_Call) Return(err error) *MockRegistryService_CancelUpload_Call { _c.Call.Return(err) return _c } func (_c *MockRegistryService_CancelUpload_Call) RunAndReturn(run func(ctx context.Context, uuid string) error) *MockRegistryService_CancelUpload_Call { _c.Call.Return(run) return _c } // DeleteManifest provides a mock function for the type MockRegistryService func (_mock *MockRegistryService) DeleteManifest(ctx context.Context, name string, reference string) error { ret := _mock.Called(ctx, name, reference) if len(ret) == 0 { panic("no return value specified for DeleteManifest") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) error); ok { r0 = returnFunc(ctx, name, reference) } else { r0 = ret.Error(0) } return r0 } // MockRegistryService_DeleteManifest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteManifest' type MockRegistryService_DeleteManifest_Call struct { *mock.Call } // DeleteManifest is a helper method to define mock.On call // - ctx context.Context // - name string // - reference string func (_e *MockRegistryService_Expecter) DeleteManifest(ctx any, name any, reference any) *MockRegistryService_DeleteManifest_Call { return &MockRegistryService_DeleteManifest_Call{Call: _e.mock.On("DeleteManifest", ctx, name, reference)} } func (_c *MockRegistryService_DeleteManifest_Call) Run(run func(ctx context.Context, name string, reference string)) *MockRegistryService_DeleteManifest_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 *MockRegistryService_DeleteManifest_Call) Return(err error) *MockRegistryService_DeleteManifest_Call { _c.Call.Return(err) return _c } func (_c *MockRegistryService_DeleteManifest_Call) RunAndReturn(run func(ctx context.Context, name string, reference string) error) *MockRegistryService_DeleteManifest_Call { _c.Call.Return(run) return _c } // FinishUpload provides a mock function for the type MockRegistryService func (_mock *MockRegistryService) FinishUpload(ctx context.Context, uuid string, digest string) error { ret := _mock.Called(ctx, uuid, digest) if len(ret) == 0 { panic("no return value specified for FinishUpload") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) error); ok { r0 = returnFunc(ctx, uuid, digest) } else { r0 = ret.Error(0) } return r0 } // MockRegistryService_FinishUpload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FinishUpload' type MockRegistryService_FinishUpload_Call struct { *mock.Call } // FinishUpload is a helper method to define mock.On call // - ctx context.Context // - uuid string // - digest string func (_e *MockRegistryService_Expecter) FinishUpload(ctx any, uuid any, digest any) *MockRegistryService_FinishUpload_Call { return &MockRegistryService_FinishUpload_Call{Call: _e.mock.On("FinishUpload", ctx, uuid, digest)} } func (_c *MockRegistryService_FinishUpload_Call) Run(run func(ctx context.Context, uuid string, digest string)) *MockRegistryService_FinishUpload_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 *MockRegistryService_FinishUpload_Call) Return(err error) *MockRegistryService_FinishUpload_Call { _c.Call.Return(err) return _c } func (_c *MockRegistryService_FinishUpload_Call) RunAndReturn(run func(ctx context.Context, uuid string, digest string) error) *MockRegistryService_FinishUpload_Call { _c.Call.Return(run) return _c } // GetBlob provides a mock function for the type MockRegistryService func (_mock *MockRegistryService) GetBlob(ctx context.Context, digest string) (io.ReadCloser, error) { ret := _mock.Called(ctx, digest) if len(ret) == 0 { panic("no return value specified for GetBlob") } var r0 io.ReadCloser var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) (io.ReadCloser, error)); ok { return returnFunc(ctx, digest) } if returnFunc, ok := ret.Get(0).(func(context.Context, string) io.ReadCloser); ok { r0 = returnFunc(ctx, digest) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(io.ReadCloser) } } if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = returnFunc(ctx, digest) } else { r1 = ret.Error(1) } return r0, r1 } // MockRegistryService_GetBlob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBlob' type MockRegistryService_GetBlob_Call struct { *mock.Call } // GetBlob is a helper method to define mock.On call // - ctx context.Context // - digest string func (_e *MockRegistryService_Expecter) GetBlob(ctx any, digest any) *MockRegistryService_GetBlob_Call { return &MockRegistryService_GetBlob_Call{Call: _e.mock.On("GetBlob", ctx, digest)} } func (_c *MockRegistryService_GetBlob_Call) Run(run func(ctx context.Context, digest string)) *MockRegistryService_GetBlob_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 *MockRegistryService_GetBlob_Call) Return(readCloser io.ReadCloser, err error) *MockRegistryService_GetBlob_Call { _c.Call.Return(readCloser, err) return _c } func (_c *MockRegistryService_GetBlob_Call) RunAndReturn(run func(ctx context.Context, digest string) (io.ReadCloser, error)) *MockRegistryService_GetBlob_Call { _c.Call.Return(run) return _c } // GetBlobPath provides a mock function for the type MockRegistryService func (_mock *MockRegistryService) GetBlobPath(ctx context.Context, name string, digest string) (string, error) { ret := _mock.Called(ctx, name, digest) if len(ret) == 0 { panic("no return value specified for GetBlobPath") } var r0 string var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (string, error)); ok { return returnFunc(ctx, name, digest) } if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) string); ok { r0 = returnFunc(ctx, name, digest) } else { r0 = ret.Get(0).(string) } if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok { r1 = returnFunc(ctx, name, digest) } else { r1 = ret.Error(1) } return r0, r1 } // MockRegistryService_GetBlobPath_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBlobPath' type MockRegistryService_GetBlobPath_Call struct { *mock.Call } // GetBlobPath is a helper method to define mock.On call // - ctx context.Context // - name string // - digest string func (_e *MockRegistryService_Expecter) GetBlobPath(ctx any, name any, digest any) *MockRegistryService_GetBlobPath_Call { return &MockRegistryService_GetBlobPath_Call{Call: _e.mock.On("GetBlobPath", ctx, name, digest)} } func (_c *MockRegistryService_GetBlobPath_Call) Run(run func(ctx context.Context, name string, digest string)) *MockRegistryService_GetBlobPath_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 *MockRegistryService_GetBlobPath_Call) Return(s string, err error) *MockRegistryService_GetBlobPath_Call { _c.Call.Return(s, err) return _c } func (_c *MockRegistryService_GetBlobPath_Call) RunAndReturn(run func(ctx context.Context, name string, digest string) (string, error)) *MockRegistryService_GetBlobPath_Call { _c.Call.Return(run) return _c } // GetManifest provides a mock function for the type MockRegistryService func (_mock *MockRegistryService) GetManifest(ctx context.Context, name string, reference string) (*domain.Manifest, error) { ret := _mock.Called(ctx, name, reference) if len(ret) == 0 { panic("no return value specified for GetManifest") } var r0 *domain.Manifest var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (*domain.Manifest, error)); ok { return returnFunc(ctx, name, reference) } if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) *domain.Manifest); ok { r0 = returnFunc(ctx, name, reference) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*domain.Manifest) } } if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok { r1 = returnFunc(ctx, name, reference) } else { r1 = ret.Error(1) } return r0, r1 } // MockRegistryService_GetManifest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetManifest' type MockRegistryService_GetManifest_Call struct { *mock.Call } // GetManifest is a helper method to define mock.On call // - ctx context.Context // - name string // - reference string func (_e *MockRegistryService_Expecter) GetManifest(ctx any, name any, reference any) *MockRegistryService_GetManifest_Call { return &MockRegistryService_GetManifest_Call{Call: _e.mock.On("GetManifest", ctx, name, reference)} } func (_c *MockRegistryService_GetManifest_Call) Run(run func(ctx context.Context, name string, reference string)) *MockRegistryService_GetManifest_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 *MockRegistryService_GetManifest_Call) Return(manifest *domain.Manifest, err error) *MockRegistryService_GetManifest_Call { _c.Call.Return(manifest, err) return _c } func (_c *MockRegistryService_GetManifest_Call) RunAndReturn(run func(ctx context.Context, name string, reference string) (*domain.Manifest, error)) *MockRegistryService_GetManifest_Call { _c.Call.Return(run) return _c } // ListRepositories provides a mock function for the type MockRegistryService func (_mock *MockRegistryService) ListRepositories(ctx context.Context) ([]string, error) { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for ListRepositories") } var r0 []string var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok { return returnFunc(ctx) } if returnFunc, ok := ret.Get(0).(func(context.Context) []string); ok { r0 = returnFunc(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]string) } } if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } return r0, r1 } // MockRegistryService_ListRepositories_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRepositories' type MockRegistryService_ListRepositories_Call struct { *mock.Call } // ListRepositories is a helper method to define mock.On call // - ctx context.Context func (_e *MockRegistryService_Expecter) ListRepositories(ctx any) *MockRegistryService_ListRepositories_Call { return &MockRegistryService_ListRepositories_Call{Call: _e.mock.On("ListRepositories", ctx)} } func (_c *MockRegistryService_ListRepositories_Call) Run(run func(ctx context.Context)) *MockRegistryService_ListRepositories_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 *MockRegistryService_ListRepositories_Call) Return(strings []string, err error) *MockRegistryService_ListRepositories_Call { _c.Call.Return(strings, err) return _c } func (_c *MockRegistryService_ListRepositories_Call) RunAndReturn(run func(ctx context.Context) ([]string, error)) *MockRegistryService_ListRepositories_Call { _c.Call.Return(run) return _c } // ListTags provides a mock function for the type MockRegistryService func (_mock *MockRegistryService) ListTags(ctx context.Context, name string) ([]string, error) { ret := _mock.Called(ctx, name) if len(ret) == 0 { panic("no return value specified for ListTags") } var r0 []string var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]string, error)); ok { return returnFunc(ctx, name) } if returnFunc, ok := ret.Get(0).(func(context.Context, string) []string); ok { r0 = returnFunc(ctx, name) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]string) } } if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = returnFunc(ctx, name) } else { r1 = ret.Error(1) } return r0, r1 } // MockRegistryService_ListTags_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListTags' type MockRegistryService_ListTags_Call struct { *mock.Call } // ListTags is a helper method to define mock.On call // - ctx context.Context // - name string func (_e *MockRegistryService_Expecter) ListTags(ctx any, name any) *MockRegistryService_ListTags_Call { return &MockRegistryService_ListTags_Call{Call: _e.mock.On("ListTags", ctx, name)} } func (_c *MockRegistryService_ListTags_Call) Run(run func(ctx context.Context, name string)) *MockRegistryService_ListTags_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 *MockRegistryService_ListTags_Call) Return(strings []string, err error) *MockRegistryService_ListTags_Call { _c.Call.Return(strings, err) return _c } func (_c *MockRegistryService_ListTags_Call) RunAndReturn(run func(ctx context.Context, name string) ([]string, error)) *MockRegistryService_ListTags_Call { _c.Call.Return(run) return _c } // PutBlob provides a mock function for the type MockRegistryService func (_mock *MockRegistryService) PutBlob(ctx context.Context, digest string, data io.Reader, size int64) error { ret := _mock.Called(ctx, digest, data, size) if len(ret) == 0 { panic("no return value specified for PutBlob") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, io.Reader, int64) error); ok { r0 = returnFunc(ctx, digest, data, size) } else { r0 = ret.Error(0) } return r0 } // MockRegistryService_PutBlob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutBlob' type MockRegistryService_PutBlob_Call struct { *mock.Call } // PutBlob is a helper method to define mock.On call // - ctx context.Context // - digest string // - data io.Reader // - size int64 func (_e *MockRegistryService_Expecter) PutBlob(ctx any, digest any, data any, size any) *MockRegistryService_PutBlob_Call { return &MockRegistryService_PutBlob_Call{Call: _e.mock.On("PutBlob", ctx, digest, data, size)} } func (_c *MockRegistryService_PutBlob_Call) Run(run func(ctx context.Context, digest string, data io.Reader, size int64)) *MockRegistryService_PutBlob_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 *MockRegistryService_PutBlob_Call) Return(err error) *MockRegistryService_PutBlob_Call { _c.Call.Return(err) return _c } func (_c *MockRegistryService_PutBlob_Call) RunAndReturn(run func(ctx context.Context, digest string, data io.Reader, size int64) error) *MockRegistryService_PutBlob_Call { _c.Call.Return(run) return _c } // PutManifest provides a mock function for the type MockRegistryService func (_mock *MockRegistryService) PutManifest(ctx context.Context, manifest *domain.Manifest) (string, error) { ret := _mock.Called(ctx, manifest) if len(ret) == 0 { panic("no return value specified for PutManifest") } var r0 string var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, *domain.Manifest) (string, error)); ok { return returnFunc(ctx, manifest) } if returnFunc, ok := ret.Get(0).(func(context.Context, *domain.Manifest) string); ok { r0 = returnFunc(ctx, manifest) } else { r0 = ret.Get(0).(string) } if returnFunc, ok := ret.Get(1).(func(context.Context, *domain.Manifest) error); ok { r1 = returnFunc(ctx, manifest) } else { r1 = ret.Error(1) } return r0, r1 } // MockRegistryService_PutManifest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutManifest' type MockRegistryService_PutManifest_Call struct { *mock.Call } // PutManifest is a helper method to define mock.On call // - ctx context.Context // - manifest *domain.Manifest func (_e *MockRegistryService_Expecter) PutManifest(ctx any, manifest any) *MockRegistryService_PutManifest_Call { return &MockRegistryService_PutManifest_Call{Call: _e.mock.On("PutManifest", ctx, manifest)} } func (_c *MockRegistryService_PutManifest_Call) Run(run func(ctx context.Context, manifest *domain.Manifest)) *MockRegistryService_PutManifest_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 *domain.Manifest if args[1] != nil { arg1 = args[1].(*domain.Manifest) } run( arg0, arg1, ) }) return _c } func (_c *MockRegistryService_PutManifest_Call) Return(digest string, err error) *MockRegistryService_PutManifest_Call { _c.Call.Return(digest, err) return _c } func (_c *MockRegistryService_PutManifest_Call) RunAndReturn(run func(ctx context.Context, manifest *domain.Manifest) (string, error)) *MockRegistryService_PutManifest_Call { _c.Call.Return(run) return _c } // StartUpload provides a mock function for the type MockRegistryService func (_mock *MockRegistryService) StartUpload(ctx context.Context, name string) (string, error) { ret := _mock.Called(ctx, name) if len(ret) == 0 { panic("no return value specified for StartUpload") } var r0 string var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) (string, error)); ok { return returnFunc(ctx, name) } if returnFunc, ok := ret.Get(0).(func(context.Context, string) string); ok { r0 = returnFunc(ctx, name) } else { r0 = ret.Get(0).(string) } if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = returnFunc(ctx, name) } else { r1 = ret.Error(1) } return r0, r1 } // MockRegistryService_StartUpload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StartUpload' type MockRegistryService_StartUpload_Call struct { *mock.Call } // StartUpload is a helper method to define mock.On call // - ctx context.Context // - name string func (_e *MockRegistryService_Expecter) StartUpload(ctx any, name any) *MockRegistryService_StartUpload_Call { return &MockRegistryService_StartUpload_Call{Call: _e.mock.On("StartUpload", ctx, name)} } func (_c *MockRegistryService_StartUpload_Call) Run(run func(ctx context.Context, name string)) *MockRegistryService_StartUpload_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 *MockRegistryService_StartUpload_Call) Return(s string, err error) *MockRegistryService_StartUpload_Call { _c.Call.Return(s, err) return _c } func (_c *MockRegistryService_StartUpload_Call) RunAndReturn(run func(ctx context.Context, name string) (string, error)) *MockRegistryService_StartUpload_Call { _c.Call.Return(run) return _c }