// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "io" "bnema.dev/ermite/internal/domain" "bnema.dev/ermite/internal/ports" mock "github.com/stretchr/testify/mock" ) // NewReleaseService creates a new instance of ReleaseService. 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 NewReleaseService(t interface { mock.TestingT Cleanup(func()) }) *ReleaseService { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &ReleaseService{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // ReleaseService is an autogenerated mock type for the ReleaseService type type ReleaseService struct { mock.Mock } type ReleaseService_Expecter struct { mock *mock.Mock } func (_m *ReleaseService) EXPECT() *ReleaseService_Expecter { return &ReleaseService_Expecter{mock: &_m.Mock} } // CreateRelease provides a mock function for the type ReleaseService func (_mock *ReleaseService) CreateRelease(ctx context.Context, p domain.Principal, repo domain.RepoName, params ports.CreateReleaseParams) (domain.Release, error) { ret := _mock.Called(ctx, p, repo, params) if len(ret) == 0 { panic("no return value specified for CreateRelease") } var r0 domain.Release var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, ports.CreateReleaseParams) (domain.Release, error)); ok { return returnFunc(ctx, p, repo, params) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, ports.CreateReleaseParams) domain.Release); ok { r0 = returnFunc(ctx, p, repo, params) } else { r0 = ret.Get(0).(domain.Release) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, ports.CreateReleaseParams) error); ok { r1 = returnFunc(ctx, p, repo, params) } else { r1 = ret.Error(1) } return r0, r1 } // ReleaseService_CreateRelease_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateRelease' type ReleaseService_CreateRelease_Call struct { *mock.Call } // CreateRelease is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - repo domain.RepoName // - params ports.CreateReleaseParams func (_e *ReleaseService_Expecter) CreateRelease(ctx any, p any, repo any, params any) *ReleaseService_CreateRelease_Call { return &ReleaseService_CreateRelease_Call{Call: _e.mock.On("CreateRelease", ctx, p, repo, params)} } func (_c *ReleaseService_CreateRelease_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, params ports.CreateReleaseParams)) *ReleaseService_CreateRelease_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.Principal if args[1] != nil { arg1 = args[1].(domain.Principal) } var arg2 domain.RepoName if args[2] != nil { arg2 = args[2].(domain.RepoName) } var arg3 ports.CreateReleaseParams if args[3] != nil { arg3 = args[3].(ports.CreateReleaseParams) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *ReleaseService_CreateRelease_Call) Return(release domain.Release, err error) *ReleaseService_CreateRelease_Call { _c.Call.Return(release, err) return _c } func (_c *ReleaseService_CreateRelease_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, params ports.CreateReleaseParams) (domain.Release, error)) *ReleaseService_CreateRelease_Call { _c.Call.Return(run) return _c } // DeleteAsset provides a mock function for the type ReleaseService func (_mock *ReleaseService) DeleteAsset(ctx context.Context, p domain.Principal, repo domain.RepoName, assetID int64) error { ret := _mock.Called(ctx, p, repo, assetID) if len(ret) == 0 { panic("no return value specified for DeleteAsset") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64) error); ok { r0 = returnFunc(ctx, p, repo, assetID) } else { r0 = ret.Error(0) } return r0 } // ReleaseService_DeleteAsset_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteAsset' type ReleaseService_DeleteAsset_Call struct { *mock.Call } // DeleteAsset is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - repo domain.RepoName // - assetID int64 func (_e *ReleaseService_Expecter) DeleteAsset(ctx any, p any, repo any, assetID any) *ReleaseService_DeleteAsset_Call { return &ReleaseService_DeleteAsset_Call{Call: _e.mock.On("DeleteAsset", ctx, p, repo, assetID)} } func (_c *ReleaseService_DeleteAsset_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, assetID int64)) *ReleaseService_DeleteAsset_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.Principal if args[1] != nil { arg1 = args[1].(domain.Principal) } var arg2 domain.RepoName if args[2] != nil { arg2 = args[2].(domain.RepoName) } var arg3 int64 if args[3] != nil { arg3 = args[3].(int64) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *ReleaseService_DeleteAsset_Call) Return(err error) *ReleaseService_DeleteAsset_Call { _c.Call.Return(err) return _c } func (_c *ReleaseService_DeleteAsset_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, assetID int64) error) *ReleaseService_DeleteAsset_Call { _c.Call.Return(run) return _c } // DeleteRelease provides a mock function for the type ReleaseService func (_mock *ReleaseService) DeleteRelease(ctx context.Context, p domain.Principal, repo domain.RepoName, id int64) error { ret := _mock.Called(ctx, p, repo, id) if len(ret) == 0 { panic("no return value specified for DeleteRelease") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64) error); ok { r0 = returnFunc(ctx, p, repo, id) } else { r0 = ret.Error(0) } return r0 } // ReleaseService_DeleteRelease_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteRelease' type ReleaseService_DeleteRelease_Call struct { *mock.Call } // DeleteRelease is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - repo domain.RepoName // - id int64 func (_e *ReleaseService_Expecter) DeleteRelease(ctx any, p any, repo any, id any) *ReleaseService_DeleteRelease_Call { return &ReleaseService_DeleteRelease_Call{Call: _e.mock.On("DeleteRelease", ctx, p, repo, id)} } func (_c *ReleaseService_DeleteRelease_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, id int64)) *ReleaseService_DeleteRelease_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.Principal if args[1] != nil { arg1 = args[1].(domain.Principal) } var arg2 domain.RepoName if args[2] != nil { arg2 = args[2].(domain.RepoName) } var arg3 int64 if args[3] != nil { arg3 = args[3].(int64) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *ReleaseService_DeleteRelease_Call) Return(err error) *ReleaseService_DeleteRelease_Call { _c.Call.Return(err) return _c } func (_c *ReleaseService_DeleteRelease_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, id int64) error) *ReleaseService_DeleteRelease_Call { _c.Call.Return(run) return _c } // DownloadAsset provides a mock function for the type ReleaseService func (_mock *ReleaseService) DownloadAsset(ctx context.Context, p domain.Principal, repo domain.RepoName, ref ports.AssetRef, offset int64, length int64, send func(ports.AssetChunk) error) error { ret := _mock.Called(ctx, p, repo, ref, offset, length, send) if len(ret) == 0 { panic("no return value specified for DownloadAsset") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, ports.AssetRef, int64, int64, func(ports.AssetChunk) error) error); ok { r0 = returnFunc(ctx, p, repo, ref, offset, length, send) } else { r0 = ret.Error(0) } return r0 } // ReleaseService_DownloadAsset_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DownloadAsset' type ReleaseService_DownloadAsset_Call struct { *mock.Call } // DownloadAsset is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - repo domain.RepoName // - ref ports.AssetRef // - offset int64 // - length int64 // - send func(ports.AssetChunk) error func (_e *ReleaseService_Expecter) DownloadAsset(ctx any, p any, repo any, ref any, offset any, length any, send any) *ReleaseService_DownloadAsset_Call { return &ReleaseService_DownloadAsset_Call{Call: _e.mock.On("DownloadAsset", ctx, p, repo, ref, offset, length, send)} } func (_c *ReleaseService_DownloadAsset_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, ref ports.AssetRef, offset int64, length int64, send func(ports.AssetChunk) error)) *ReleaseService_DownloadAsset_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.Principal if args[1] != nil { arg1 = args[1].(domain.Principal) } var arg2 domain.RepoName if args[2] != nil { arg2 = args[2].(domain.RepoName) } var arg3 ports.AssetRef if args[3] != nil { arg3 = args[3].(ports.AssetRef) } var arg4 int64 if args[4] != nil { arg4 = args[4].(int64) } var arg5 int64 if args[5] != nil { arg5 = args[5].(int64) } var arg6 func(ports.AssetChunk) error if args[6] != nil { arg6 = args[6].(func(ports.AssetChunk) error) } run( arg0, arg1, arg2, arg3, arg4, arg5, arg6, ) }) return _c } func (_c *ReleaseService_DownloadAsset_Call) Return(err error) *ReleaseService_DownloadAsset_Call { _c.Call.Return(err) return _c } func (_c *ReleaseService_DownloadAsset_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, ref ports.AssetRef, offset int64, length int64, send func(ports.AssetChunk) error) error) *ReleaseService_DownloadAsset_Call { _c.Call.Return(run) return _c } // GetAsset provides a mock function for the type ReleaseService func (_mock *ReleaseService) GetAsset(ctx context.Context, p domain.Principal, repo domain.RepoName, ref ports.AssetRef) (domain.ReleaseAsset, error) { ret := _mock.Called(ctx, p, repo, ref) if len(ret) == 0 { panic("no return value specified for GetAsset") } var r0 domain.ReleaseAsset var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, ports.AssetRef) (domain.ReleaseAsset, error)); ok { return returnFunc(ctx, p, repo, ref) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, ports.AssetRef) domain.ReleaseAsset); ok { r0 = returnFunc(ctx, p, repo, ref) } else { r0 = ret.Get(0).(domain.ReleaseAsset) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, ports.AssetRef) error); ok { r1 = returnFunc(ctx, p, repo, ref) } else { r1 = ret.Error(1) } return r0, r1 } // ReleaseService_GetAsset_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAsset' type ReleaseService_GetAsset_Call struct { *mock.Call } // GetAsset is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - repo domain.RepoName // - ref ports.AssetRef func (_e *ReleaseService_Expecter) GetAsset(ctx any, p any, repo any, ref any) *ReleaseService_GetAsset_Call { return &ReleaseService_GetAsset_Call{Call: _e.mock.On("GetAsset", ctx, p, repo, ref)} } func (_c *ReleaseService_GetAsset_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, ref ports.AssetRef)) *ReleaseService_GetAsset_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.Principal if args[1] != nil { arg1 = args[1].(domain.Principal) } var arg2 domain.RepoName if args[2] != nil { arg2 = args[2].(domain.RepoName) } var arg3 ports.AssetRef if args[3] != nil { arg3 = args[3].(ports.AssetRef) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *ReleaseService_GetAsset_Call) Return(releaseAsset domain.ReleaseAsset, err error) *ReleaseService_GetAsset_Call { _c.Call.Return(releaseAsset, err) return _c } func (_c *ReleaseService_GetAsset_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, ref ports.AssetRef) (domain.ReleaseAsset, error)) *ReleaseService_GetAsset_Call { _c.Call.Return(run) return _c } // GetRelease provides a mock function for the type ReleaseService func (_mock *ReleaseService) GetRelease(ctx context.Context, p domain.Principal, repo domain.RepoName, ref ports.ReleaseRef) (domain.Release, error) { ret := _mock.Called(ctx, p, repo, ref) if len(ret) == 0 { panic("no return value specified for GetRelease") } var r0 domain.Release var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, ports.ReleaseRef) (domain.Release, error)); ok { return returnFunc(ctx, p, repo, ref) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, ports.ReleaseRef) domain.Release); ok { r0 = returnFunc(ctx, p, repo, ref) } else { r0 = ret.Get(0).(domain.Release) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, ports.ReleaseRef) error); ok { r1 = returnFunc(ctx, p, repo, ref) } else { r1 = ret.Error(1) } return r0, r1 } // ReleaseService_GetRelease_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRelease' type ReleaseService_GetRelease_Call struct { *mock.Call } // GetRelease is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - repo domain.RepoName // - ref ports.ReleaseRef func (_e *ReleaseService_Expecter) GetRelease(ctx any, p any, repo any, ref any) *ReleaseService_GetRelease_Call { return &ReleaseService_GetRelease_Call{Call: _e.mock.On("GetRelease", ctx, p, repo, ref)} } func (_c *ReleaseService_GetRelease_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, ref ports.ReleaseRef)) *ReleaseService_GetRelease_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.Principal if args[1] != nil { arg1 = args[1].(domain.Principal) } var arg2 domain.RepoName if args[2] != nil { arg2 = args[2].(domain.RepoName) } var arg3 ports.ReleaseRef if args[3] != nil { arg3 = args[3].(ports.ReleaseRef) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *ReleaseService_GetRelease_Call) Return(release domain.Release, err error) *ReleaseService_GetRelease_Call { _c.Call.Return(release, err) return _c } func (_c *ReleaseService_GetRelease_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, ref ports.ReleaseRef) (domain.Release, error)) *ReleaseService_GetRelease_Call { _c.Call.Return(run) return _c } // ListAssets provides a mock function for the type ReleaseService func (_mock *ReleaseService) ListAssets(ctx context.Context, p domain.Principal, repo domain.RepoName, releaseID int64) ([]domain.ReleaseAsset, error) { ret := _mock.Called(ctx, p, repo, releaseID) if len(ret) == 0 { panic("no return value specified for ListAssets") } var r0 []domain.ReleaseAsset var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64) ([]domain.ReleaseAsset, error)); ok { return returnFunc(ctx, p, repo, releaseID) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64) []domain.ReleaseAsset); ok { r0 = returnFunc(ctx, p, repo, releaseID) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]domain.ReleaseAsset) } } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, int64) error); ok { r1 = returnFunc(ctx, p, repo, releaseID) } else { r1 = ret.Error(1) } return r0, r1 } // ReleaseService_ListAssets_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAssets' type ReleaseService_ListAssets_Call struct { *mock.Call } // ListAssets is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - repo domain.RepoName // - releaseID int64 func (_e *ReleaseService_Expecter) ListAssets(ctx any, p any, repo any, releaseID any) *ReleaseService_ListAssets_Call { return &ReleaseService_ListAssets_Call{Call: _e.mock.On("ListAssets", ctx, p, repo, releaseID)} } func (_c *ReleaseService_ListAssets_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, releaseID int64)) *ReleaseService_ListAssets_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.Principal if args[1] != nil { arg1 = args[1].(domain.Principal) } var arg2 domain.RepoName if args[2] != nil { arg2 = args[2].(domain.RepoName) } var arg3 int64 if args[3] != nil { arg3 = args[3].(int64) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *ReleaseService_ListAssets_Call) Return(releaseAssets []domain.ReleaseAsset, err error) *ReleaseService_ListAssets_Call { _c.Call.Return(releaseAssets, err) return _c } func (_c *ReleaseService_ListAssets_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, releaseID int64) ([]domain.ReleaseAsset, error)) *ReleaseService_ListAssets_Call { _c.Call.Return(run) return _c } // ListReleases provides a mock function for the type ReleaseService func (_mock *ReleaseService) ListReleases(ctx context.Context, p domain.Principal, repo domain.RepoName, pageSize int, pageToken string) (ports.ReleasePage, error) { ret := _mock.Called(ctx, p, repo, pageSize, pageToken) if len(ret) == 0 { panic("no return value specified for ListReleases") } var r0 ports.ReleasePage var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int, string) (ports.ReleasePage, error)); ok { return returnFunc(ctx, p, repo, pageSize, pageToken) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int, string) ports.ReleasePage); ok { r0 = returnFunc(ctx, p, repo, pageSize, pageToken) } else { r0 = ret.Get(0).(ports.ReleasePage) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, int, string) error); ok { r1 = returnFunc(ctx, p, repo, pageSize, pageToken) } else { r1 = ret.Error(1) } return r0, r1 } // ReleaseService_ListReleases_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListReleases' type ReleaseService_ListReleases_Call struct { *mock.Call } // ListReleases is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - repo domain.RepoName // - pageSize int // - pageToken string func (_e *ReleaseService_Expecter) ListReleases(ctx any, p any, repo any, pageSize any, pageToken any) *ReleaseService_ListReleases_Call { return &ReleaseService_ListReleases_Call{Call: _e.mock.On("ListReleases", ctx, p, repo, pageSize, pageToken)} } func (_c *ReleaseService_ListReleases_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, pageSize int, pageToken string)) *ReleaseService_ListReleases_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.Principal if args[1] != nil { arg1 = args[1].(domain.Principal) } var arg2 domain.RepoName if args[2] != nil { arg2 = args[2].(domain.RepoName) } var arg3 int if args[3] != nil { arg3 = args[3].(int) } var arg4 string if args[4] != nil { arg4 = args[4].(string) } run( arg0, arg1, arg2, arg3, arg4, ) }) return _c } func (_c *ReleaseService_ListReleases_Call) Return(releasePage ports.ReleasePage, err error) *ReleaseService_ListReleases_Call { _c.Call.Return(releasePage, err) return _c } func (_c *ReleaseService_ListReleases_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, pageSize int, pageToken string) (ports.ReleasePage, error)) *ReleaseService_ListReleases_Call { _c.Call.Return(run) return _c } // UpdateAsset provides a mock function for the type ReleaseService func (_mock *ReleaseService) UpdateAsset(ctx context.Context, p domain.Principal, repo domain.RepoName, assetID int64, params ports.UpdateAssetParams) (domain.ReleaseAsset, error) { ret := _mock.Called(ctx, p, repo, assetID, params) if len(ret) == 0 { panic("no return value specified for UpdateAsset") } var r0 domain.ReleaseAsset var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, ports.UpdateAssetParams) (domain.ReleaseAsset, error)); ok { return returnFunc(ctx, p, repo, assetID, params) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, ports.UpdateAssetParams) domain.ReleaseAsset); ok { r0 = returnFunc(ctx, p, repo, assetID, params) } else { r0 = ret.Get(0).(domain.ReleaseAsset) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, int64, ports.UpdateAssetParams) error); ok { r1 = returnFunc(ctx, p, repo, assetID, params) } else { r1 = ret.Error(1) } return r0, r1 } // ReleaseService_UpdateAsset_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateAsset' type ReleaseService_UpdateAsset_Call struct { *mock.Call } // UpdateAsset is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - repo domain.RepoName // - assetID int64 // - params ports.UpdateAssetParams func (_e *ReleaseService_Expecter) UpdateAsset(ctx any, p any, repo any, assetID any, params any) *ReleaseService_UpdateAsset_Call { return &ReleaseService_UpdateAsset_Call{Call: _e.mock.On("UpdateAsset", ctx, p, repo, assetID, params)} } func (_c *ReleaseService_UpdateAsset_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, assetID int64, params ports.UpdateAssetParams)) *ReleaseService_UpdateAsset_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.Principal if args[1] != nil { arg1 = args[1].(domain.Principal) } var arg2 domain.RepoName if args[2] != nil { arg2 = args[2].(domain.RepoName) } var arg3 int64 if args[3] != nil { arg3 = args[3].(int64) } var arg4 ports.UpdateAssetParams if args[4] != nil { arg4 = args[4].(ports.UpdateAssetParams) } run( arg0, arg1, arg2, arg3, arg4, ) }) return _c } func (_c *ReleaseService_UpdateAsset_Call) Return(releaseAsset domain.ReleaseAsset, err error) *ReleaseService_UpdateAsset_Call { _c.Call.Return(releaseAsset, err) return _c } func (_c *ReleaseService_UpdateAsset_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, assetID int64, params ports.UpdateAssetParams) (domain.ReleaseAsset, error)) *ReleaseService_UpdateAsset_Call { _c.Call.Return(run) return _c } // UpdateRelease provides a mock function for the type ReleaseService func (_mock *ReleaseService) UpdateRelease(ctx context.Context, p domain.Principal, repo domain.RepoName, id int64, params ports.UpdateReleaseParams) (domain.Release, error) { ret := _mock.Called(ctx, p, repo, id, params) if len(ret) == 0 { panic("no return value specified for UpdateRelease") } var r0 domain.Release var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, ports.UpdateReleaseParams) (domain.Release, error)); ok { return returnFunc(ctx, p, repo, id, params) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, ports.UpdateReleaseParams) domain.Release); ok { r0 = returnFunc(ctx, p, repo, id, params) } else { r0 = ret.Get(0).(domain.Release) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, int64, ports.UpdateReleaseParams) error); ok { r1 = returnFunc(ctx, p, repo, id, params) } else { r1 = ret.Error(1) } return r0, r1 } // ReleaseService_UpdateRelease_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateRelease' type ReleaseService_UpdateRelease_Call struct { *mock.Call } // UpdateRelease is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - repo domain.RepoName // - id int64 // - params ports.UpdateReleaseParams func (_e *ReleaseService_Expecter) UpdateRelease(ctx any, p any, repo any, id any, params any) *ReleaseService_UpdateRelease_Call { return &ReleaseService_UpdateRelease_Call{Call: _e.mock.On("UpdateRelease", ctx, p, repo, id, params)} } func (_c *ReleaseService_UpdateRelease_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, id int64, params ports.UpdateReleaseParams)) *ReleaseService_UpdateRelease_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.Principal if args[1] != nil { arg1 = args[1].(domain.Principal) } var arg2 domain.RepoName if args[2] != nil { arg2 = args[2].(domain.RepoName) } var arg3 int64 if args[3] != nil { arg3 = args[3].(int64) } var arg4 ports.UpdateReleaseParams if args[4] != nil { arg4 = args[4].(ports.UpdateReleaseParams) } run( arg0, arg1, arg2, arg3, arg4, ) }) return _c } func (_c *ReleaseService_UpdateRelease_Call) Return(release domain.Release, err error) *ReleaseService_UpdateRelease_Call { _c.Call.Return(release, err) return _c } func (_c *ReleaseService_UpdateRelease_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, id int64, params ports.UpdateReleaseParams) (domain.Release, error)) *ReleaseService_UpdateRelease_Call { _c.Call.Return(run) return _c } // UploadAsset provides a mock function for the type ReleaseService func (_mock *ReleaseService) UploadAsset(ctx context.Context, p domain.Principal, repo domain.RepoName, params ports.UploadAssetParams, body io.Reader) (domain.ReleaseAsset, error) { ret := _mock.Called(ctx, p, repo, params, body) if len(ret) == 0 { panic("no return value specified for UploadAsset") } var r0 domain.ReleaseAsset var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, ports.UploadAssetParams, io.Reader) (domain.ReleaseAsset, error)); ok { return returnFunc(ctx, p, repo, params, body) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, ports.UploadAssetParams, io.Reader) domain.ReleaseAsset); ok { r0 = returnFunc(ctx, p, repo, params, body) } else { r0 = ret.Get(0).(domain.ReleaseAsset) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, ports.UploadAssetParams, io.Reader) error); ok { r1 = returnFunc(ctx, p, repo, params, body) } else { r1 = ret.Error(1) } return r0, r1 } // ReleaseService_UploadAsset_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UploadAsset' type ReleaseService_UploadAsset_Call struct { *mock.Call } // UploadAsset is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - repo domain.RepoName // - params ports.UploadAssetParams // - body io.Reader func (_e *ReleaseService_Expecter) UploadAsset(ctx any, p any, repo any, params any, body any) *ReleaseService_UploadAsset_Call { return &ReleaseService_UploadAsset_Call{Call: _e.mock.On("UploadAsset", ctx, p, repo, params, body)} } func (_c *ReleaseService_UploadAsset_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, params ports.UploadAssetParams, body io.Reader)) *ReleaseService_UploadAsset_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.Principal if args[1] != nil { arg1 = args[1].(domain.Principal) } var arg2 domain.RepoName if args[2] != nil { arg2 = args[2].(domain.RepoName) } var arg3 ports.UploadAssetParams if args[3] != nil { arg3 = args[3].(ports.UploadAssetParams) } var arg4 io.Reader if args[4] != nil { arg4 = args[4].(io.Reader) } run( arg0, arg1, arg2, arg3, arg4, ) }) return _c } func (_c *ReleaseService_UploadAsset_Call) Return(releaseAsset domain.ReleaseAsset, err error) *ReleaseService_UploadAsset_Call { _c.Call.Return(releaseAsset, err) return _c } func (_c *ReleaseService_UploadAsset_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, params ports.UploadAssetParams, body io.Reader) (domain.ReleaseAsset, error)) *ReleaseService_UploadAsset_Call { _c.Call.Return(run) return _c } // Usage provides a mock function for the type ReleaseService func (_mock *ReleaseService) Usage(ctx context.Context, p domain.Principal, repo domain.RepoName) (ports.ReleaseUsage, error) { ret := _mock.Called(ctx, p, repo) if len(ret) == 0 { panic("no return value specified for Usage") } var r0 ports.ReleaseUsage var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName) (ports.ReleaseUsage, error)); ok { return returnFunc(ctx, p, repo) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName) ports.ReleaseUsage); ok { r0 = returnFunc(ctx, p, repo) } else { r0 = ret.Get(0).(ports.ReleaseUsage) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName) error); ok { r1 = returnFunc(ctx, p, repo) } else { r1 = ret.Error(1) } return r0, r1 } // ReleaseService_Usage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Usage' type ReleaseService_Usage_Call struct { *mock.Call } // Usage is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - repo domain.RepoName func (_e *ReleaseService_Expecter) Usage(ctx any, p any, repo any) *ReleaseService_Usage_Call { return &ReleaseService_Usage_Call{Call: _e.mock.On("Usage", ctx, p, repo)} } func (_c *ReleaseService_Usage_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName)) *ReleaseService_Usage_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.Principal if args[1] != nil { arg1 = args[1].(domain.Principal) } var arg2 domain.RepoName if args[2] != nil { arg2 = args[2].(domain.RepoName) } run( arg0, arg1, arg2, ) }) return _c } func (_c *ReleaseService_Usage_Call) Return(releaseUsage ports.ReleaseUsage, err error) *ReleaseService_Usage_Call { _c.Call.Return(releaseUsage, err) return _c } func (_c *ReleaseService_Usage_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName) (ports.ReleaseUsage, error)) *ReleaseService_Usage_Call { _c.Call.Return(run) return _c }