// 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" ) // NewGitHubReleaseAPI creates a new instance of GitHubReleaseAPI. 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 NewGitHubReleaseAPI(t interface { mock.TestingT Cleanup(func()) }) *GitHubReleaseAPI { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &GitHubReleaseAPI{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // GitHubReleaseAPI is an autogenerated mock type for the GitHubReleaseAPI type type GitHubReleaseAPI struct { mock.Mock } type GitHubReleaseAPI_Expecter struct { mock *mock.Mock } func (_m *GitHubReleaseAPI) EXPECT() *GitHubReleaseAPI_Expecter { return &GitHubReleaseAPI_Expecter{mock: &_m.Mock} } // AssetByID provides a mock function for the type GitHubReleaseAPI func (_mock *GitHubReleaseAPI) AssetByID(ctx context.Context, p domain.Principal, owner string, repo string, assetID int64) (domain.ReleaseAsset, error) { ret := _mock.Called(ctx, p, owner, repo, assetID) if len(ret) == 0 { panic("no return value specified for AssetByID") } var r0 domain.ReleaseAsset var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, int64) (domain.ReleaseAsset, error)); ok { return returnFunc(ctx, p, owner, repo, assetID) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, int64) domain.ReleaseAsset); ok { r0 = returnFunc(ctx, p, owner, repo, assetID) } else { r0 = ret.Get(0).(domain.ReleaseAsset) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, string, string, int64) error); ok { r1 = returnFunc(ctx, p, owner, repo, assetID) } else { r1 = ret.Error(1) } return r0, r1 } // GitHubReleaseAPI_AssetByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AssetByID' type GitHubReleaseAPI_AssetByID_Call struct { *mock.Call } // AssetByID is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - owner string // - repo string // - assetID int64 func (_e *GitHubReleaseAPI_Expecter) AssetByID(ctx any, p any, owner any, repo any, assetID any) *GitHubReleaseAPI_AssetByID_Call { return &GitHubReleaseAPI_AssetByID_Call{Call: _e.mock.On("AssetByID", ctx, p, owner, repo, assetID)} } func (_c *GitHubReleaseAPI_AssetByID_Call) Run(run func(ctx context.Context, p domain.Principal, owner string, repo string, assetID int64)) *GitHubReleaseAPI_AssetByID_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 string if args[2] != nil { arg2 = args[2].(string) } var arg3 string if args[3] != nil { arg3 = args[3].(string) } var arg4 int64 if args[4] != nil { arg4 = args[4].(int64) } run( arg0, arg1, arg2, arg3, arg4, ) }) return _c } func (_c *GitHubReleaseAPI_AssetByID_Call) Return(releaseAsset domain.ReleaseAsset, err error) *GitHubReleaseAPI_AssetByID_Call { _c.Call.Return(releaseAsset, err) return _c } func (_c *GitHubReleaseAPI_AssetByID_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, owner string, repo string, assetID int64) (domain.ReleaseAsset, error)) *GitHubReleaseAPI_AssetByID_Call { _c.Call.Return(run) return _c } // CreateRelease provides a mock function for the type GitHubReleaseAPI func (_mock *GitHubReleaseAPI) CreateRelease(ctx context.Context, p domain.Principal, owner string, repo string, body []byte) ([]byte, error) { ret := _mock.Called(ctx, p, owner, repo, body) if len(ret) == 0 { panic("no return value specified for CreateRelease") } var r0 []byte var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, []byte) ([]byte, error)); ok { return returnFunc(ctx, p, owner, repo, body) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, []byte) []byte); ok { r0 = returnFunc(ctx, p, owner, repo, body) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]byte) } } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, string, string, []byte) error); ok { r1 = returnFunc(ctx, p, owner, repo, body) } else { r1 = ret.Error(1) } return r0, r1 } // GitHubReleaseAPI_CreateRelease_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateRelease' type GitHubReleaseAPI_CreateRelease_Call struct { *mock.Call } // CreateRelease is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - owner string // - repo string // - body []byte func (_e *GitHubReleaseAPI_Expecter) CreateRelease(ctx any, p any, owner any, repo any, body any) *GitHubReleaseAPI_CreateRelease_Call { return &GitHubReleaseAPI_CreateRelease_Call{Call: _e.mock.On("CreateRelease", ctx, p, owner, repo, body)} } func (_c *GitHubReleaseAPI_CreateRelease_Call) Run(run func(ctx context.Context, p domain.Principal, owner string, repo string, body []byte)) *GitHubReleaseAPI_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 string if args[2] != nil { arg2 = args[2].(string) } var arg3 string if args[3] != nil { arg3 = args[3].(string) } var arg4 []byte if args[4] != nil { arg4 = args[4].([]byte) } run( arg0, arg1, arg2, arg3, arg4, ) }) return _c } func (_c *GitHubReleaseAPI_CreateRelease_Call) Return(bytes []byte, err error) *GitHubReleaseAPI_CreateRelease_Call { _c.Call.Return(bytes, err) return _c } func (_c *GitHubReleaseAPI_CreateRelease_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, owner string, repo string, body []byte) ([]byte, error)) *GitHubReleaseAPI_CreateRelease_Call { _c.Call.Return(run) return _c } // DeleteAsset provides a mock function for the type GitHubReleaseAPI func (_mock *GitHubReleaseAPI) DeleteAsset(ctx context.Context, p domain.Principal, owner string, repo string, assetID int64) error { ret := _mock.Called(ctx, p, owner, 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, string, string, int64) error); ok { r0 = returnFunc(ctx, p, owner, repo, assetID) } else { r0 = ret.Error(0) } return r0 } // GitHubReleaseAPI_DeleteAsset_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteAsset' type GitHubReleaseAPI_DeleteAsset_Call struct { *mock.Call } // DeleteAsset is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - owner string // - repo string // - assetID int64 func (_e *GitHubReleaseAPI_Expecter) DeleteAsset(ctx any, p any, owner any, repo any, assetID any) *GitHubReleaseAPI_DeleteAsset_Call { return &GitHubReleaseAPI_DeleteAsset_Call{Call: _e.mock.On("DeleteAsset", ctx, p, owner, repo, assetID)} } func (_c *GitHubReleaseAPI_DeleteAsset_Call) Run(run func(ctx context.Context, p domain.Principal, owner string, repo string, assetID int64)) *GitHubReleaseAPI_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 string if args[2] != nil { arg2 = args[2].(string) } var arg3 string if args[3] != nil { arg3 = args[3].(string) } var arg4 int64 if args[4] != nil { arg4 = args[4].(int64) } run( arg0, arg1, arg2, arg3, arg4, ) }) return _c } func (_c *GitHubReleaseAPI_DeleteAsset_Call) Return(err error) *GitHubReleaseAPI_DeleteAsset_Call { _c.Call.Return(err) return _c } func (_c *GitHubReleaseAPI_DeleteAsset_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, owner string, repo string, assetID int64) error) *GitHubReleaseAPI_DeleteAsset_Call { _c.Call.Return(run) return _c } // DeleteRelease provides a mock function for the type GitHubReleaseAPI func (_mock *GitHubReleaseAPI) DeleteRelease(ctx context.Context, p domain.Principal, owner string, repo string, id int64) error { ret := _mock.Called(ctx, p, owner, 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, string, string, int64) error); ok { r0 = returnFunc(ctx, p, owner, repo, id) } else { r0 = ret.Error(0) } return r0 } // GitHubReleaseAPI_DeleteRelease_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteRelease' type GitHubReleaseAPI_DeleteRelease_Call struct { *mock.Call } // DeleteRelease is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - owner string // - repo string // - id int64 func (_e *GitHubReleaseAPI_Expecter) DeleteRelease(ctx any, p any, owner any, repo any, id any) *GitHubReleaseAPI_DeleteRelease_Call { return &GitHubReleaseAPI_DeleteRelease_Call{Call: _e.mock.On("DeleteRelease", ctx, p, owner, repo, id)} } func (_c *GitHubReleaseAPI_DeleteRelease_Call) Run(run func(ctx context.Context, p domain.Principal, owner string, repo string, id int64)) *GitHubReleaseAPI_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 string if args[2] != nil { arg2 = args[2].(string) } var arg3 string if args[3] != nil { arg3 = args[3].(string) } var arg4 int64 if args[4] != nil { arg4 = args[4].(int64) } run( arg0, arg1, arg2, arg3, arg4, ) }) return _c } func (_c *GitHubReleaseAPI_DeleteRelease_Call) Return(err error) *GitHubReleaseAPI_DeleteRelease_Call { _c.Call.Return(err) return _c } func (_c *GitHubReleaseAPI_DeleteRelease_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, owner string, repo string, id int64) error) *GitHubReleaseAPI_DeleteRelease_Call { _c.Call.Return(run) return _c } // GetAsset provides a mock function for the type GitHubReleaseAPI func (_mock *GitHubReleaseAPI) GetAsset(ctx context.Context, p domain.Principal, owner string, repo string, assetID int64) ([]byte, error) { ret := _mock.Called(ctx, p, owner, repo, assetID) if len(ret) == 0 { panic("no return value specified for GetAsset") } var r0 []byte var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, int64) ([]byte, error)); ok { return returnFunc(ctx, p, owner, repo, assetID) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, int64) []byte); ok { r0 = returnFunc(ctx, p, owner, repo, assetID) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]byte) } } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, string, string, int64) error); ok { r1 = returnFunc(ctx, p, owner, repo, assetID) } else { r1 = ret.Error(1) } return r0, r1 } // GitHubReleaseAPI_GetAsset_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAsset' type GitHubReleaseAPI_GetAsset_Call struct { *mock.Call } // GetAsset is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - owner string // - repo string // - assetID int64 func (_e *GitHubReleaseAPI_Expecter) GetAsset(ctx any, p any, owner any, repo any, assetID any) *GitHubReleaseAPI_GetAsset_Call { return &GitHubReleaseAPI_GetAsset_Call{Call: _e.mock.On("GetAsset", ctx, p, owner, repo, assetID)} } func (_c *GitHubReleaseAPI_GetAsset_Call) Run(run func(ctx context.Context, p domain.Principal, owner string, repo string, assetID int64)) *GitHubReleaseAPI_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 string if args[2] != nil { arg2 = args[2].(string) } var arg3 string if args[3] != nil { arg3 = args[3].(string) } var arg4 int64 if args[4] != nil { arg4 = args[4].(int64) } run( arg0, arg1, arg2, arg3, arg4, ) }) return _c } func (_c *GitHubReleaseAPI_GetAsset_Call) Return(bytes []byte, err error) *GitHubReleaseAPI_GetAsset_Call { _c.Call.Return(bytes, err) return _c } func (_c *GitHubReleaseAPI_GetAsset_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, owner string, repo string, assetID int64) ([]byte, error)) *GitHubReleaseAPI_GetAsset_Call { _c.Call.Return(run) return _c } // GetRelease provides a mock function for the type GitHubReleaseAPI func (_mock *GitHubReleaseAPI) GetRelease(ctx context.Context, p domain.Principal, owner string, repo string, ref ports.ReleaseRef) ([]byte, error) { ret := _mock.Called(ctx, p, owner, repo, ref) if len(ret) == 0 { panic("no return value specified for GetRelease") } var r0 []byte var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, ports.ReleaseRef) ([]byte, error)); ok { return returnFunc(ctx, p, owner, repo, ref) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, ports.ReleaseRef) []byte); ok { r0 = returnFunc(ctx, p, owner, repo, ref) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]byte) } } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, string, string, ports.ReleaseRef) error); ok { r1 = returnFunc(ctx, p, owner, repo, ref) } else { r1 = ret.Error(1) } return r0, r1 } // GitHubReleaseAPI_GetRelease_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRelease' type GitHubReleaseAPI_GetRelease_Call struct { *mock.Call } // GetRelease is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - owner string // - repo string // - ref ports.ReleaseRef func (_e *GitHubReleaseAPI_Expecter) GetRelease(ctx any, p any, owner any, repo any, ref any) *GitHubReleaseAPI_GetRelease_Call { return &GitHubReleaseAPI_GetRelease_Call{Call: _e.mock.On("GetRelease", ctx, p, owner, repo, ref)} } func (_c *GitHubReleaseAPI_GetRelease_Call) Run(run func(ctx context.Context, p domain.Principal, owner string, repo string, ref ports.ReleaseRef)) *GitHubReleaseAPI_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 string if args[2] != nil { arg2 = args[2].(string) } var arg3 string if args[3] != nil { arg3 = args[3].(string) } var arg4 ports.ReleaseRef if args[4] != nil { arg4 = args[4].(ports.ReleaseRef) } run( arg0, arg1, arg2, arg3, arg4, ) }) return _c } func (_c *GitHubReleaseAPI_GetRelease_Call) Return(bytes []byte, err error) *GitHubReleaseAPI_GetRelease_Call { _c.Call.Return(bytes, err) return _c } func (_c *GitHubReleaseAPI_GetRelease_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, owner string, repo string, ref ports.ReleaseRef) ([]byte, error)) *GitHubReleaseAPI_GetRelease_Call { _c.Call.Return(run) return _c } // ListAssets provides a mock function for the type GitHubReleaseAPI func (_mock *GitHubReleaseAPI) ListAssets(ctx context.Context, p domain.Principal, owner string, repo string, id int64, page int, perPage int) ([]byte, string, error) { ret := _mock.Called(ctx, p, owner, repo, id, page, perPage) if len(ret) == 0 { panic("no return value specified for ListAssets") } var r0 []byte var r1 string var r2 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, int64, int, int) ([]byte, string, error)); ok { return returnFunc(ctx, p, owner, repo, id, page, perPage) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, int64, int, int) []byte); ok { r0 = returnFunc(ctx, p, owner, repo, id, page, perPage) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]byte) } } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, string, string, int64, int, int) string); ok { r1 = returnFunc(ctx, p, owner, repo, id, page, perPage) } else { r1 = ret.Get(1).(string) } if returnFunc, ok := ret.Get(2).(func(context.Context, domain.Principal, string, string, int64, int, int) error); ok { r2 = returnFunc(ctx, p, owner, repo, id, page, perPage) } else { r2 = ret.Error(2) } return r0, r1, r2 } // GitHubReleaseAPI_ListAssets_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAssets' type GitHubReleaseAPI_ListAssets_Call struct { *mock.Call } // ListAssets is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - owner string // - repo string // - id int64 // - page int // - perPage int func (_e *GitHubReleaseAPI_Expecter) ListAssets(ctx any, p any, owner any, repo any, id any, page any, perPage any) *GitHubReleaseAPI_ListAssets_Call { return &GitHubReleaseAPI_ListAssets_Call{Call: _e.mock.On("ListAssets", ctx, p, owner, repo, id, page, perPage)} } func (_c *GitHubReleaseAPI_ListAssets_Call) Run(run func(ctx context.Context, p domain.Principal, owner string, repo string, id int64, page int, perPage int)) *GitHubReleaseAPI_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 string if args[2] != nil { arg2 = args[2].(string) } var arg3 string if args[3] != nil { arg3 = args[3].(string) } var arg4 int64 if args[4] != nil { arg4 = args[4].(int64) } var arg5 int if args[5] != nil { arg5 = args[5].(int) } var arg6 int if args[6] != nil { arg6 = args[6].(int) } run( arg0, arg1, arg2, arg3, arg4, arg5, arg6, ) }) return _c } func (_c *GitHubReleaseAPI_ListAssets_Call) Return(body []byte, link string, err error) *GitHubReleaseAPI_ListAssets_Call { _c.Call.Return(body, link, err) return _c } func (_c *GitHubReleaseAPI_ListAssets_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, owner string, repo string, id int64, page int, perPage int) ([]byte, string, error)) *GitHubReleaseAPI_ListAssets_Call { _c.Call.Return(run) return _c } // ListReleases provides a mock function for the type GitHubReleaseAPI func (_mock *GitHubReleaseAPI) ListReleases(ctx context.Context, p domain.Principal, owner string, repo string, page int, perPage int) ([]byte, string, error) { ret := _mock.Called(ctx, p, owner, repo, page, perPage) if len(ret) == 0 { panic("no return value specified for ListReleases") } var r0 []byte var r1 string var r2 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, int, int) ([]byte, string, error)); ok { return returnFunc(ctx, p, owner, repo, page, perPage) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, int, int) []byte); ok { r0 = returnFunc(ctx, p, owner, repo, page, perPage) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]byte) } } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, string, string, int, int) string); ok { r1 = returnFunc(ctx, p, owner, repo, page, perPage) } else { r1 = ret.Get(1).(string) } if returnFunc, ok := ret.Get(2).(func(context.Context, domain.Principal, string, string, int, int) error); ok { r2 = returnFunc(ctx, p, owner, repo, page, perPage) } else { r2 = ret.Error(2) } return r0, r1, r2 } // GitHubReleaseAPI_ListReleases_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListReleases' type GitHubReleaseAPI_ListReleases_Call struct { *mock.Call } // ListReleases is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - owner string // - repo string // - page int // - perPage int func (_e *GitHubReleaseAPI_Expecter) ListReleases(ctx any, p any, owner any, repo any, page any, perPage any) *GitHubReleaseAPI_ListReleases_Call { return &GitHubReleaseAPI_ListReleases_Call{Call: _e.mock.On("ListReleases", ctx, p, owner, repo, page, perPage)} } func (_c *GitHubReleaseAPI_ListReleases_Call) Run(run func(ctx context.Context, p domain.Principal, owner string, repo string, page int, perPage int)) *GitHubReleaseAPI_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 string if args[2] != nil { arg2 = args[2].(string) } var arg3 string if args[3] != nil { arg3 = args[3].(string) } var arg4 int if args[4] != nil { arg4 = args[4].(int) } var arg5 int if args[5] != nil { arg5 = args[5].(int) } run( arg0, arg1, arg2, arg3, arg4, arg5, ) }) return _c } func (_c *GitHubReleaseAPI_ListReleases_Call) Return(body []byte, link string, err error) *GitHubReleaseAPI_ListReleases_Call { _c.Call.Return(body, link, err) return _c } func (_c *GitHubReleaseAPI_ListReleases_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, owner string, repo string, page int, perPage int) ([]byte, string, error)) *GitHubReleaseAPI_ListReleases_Call { _c.Call.Return(run) return _c } // UpdateAsset provides a mock function for the type GitHubReleaseAPI func (_mock *GitHubReleaseAPI) UpdateAsset(ctx context.Context, p domain.Principal, owner string, repo string, assetID int64, body []byte) ([]byte, error) { ret := _mock.Called(ctx, p, owner, repo, assetID, body) if len(ret) == 0 { panic("no return value specified for UpdateAsset") } var r0 []byte var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, int64, []byte) ([]byte, error)); ok { return returnFunc(ctx, p, owner, repo, assetID, body) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, int64, []byte) []byte); ok { r0 = returnFunc(ctx, p, owner, repo, assetID, body) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]byte) } } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, string, string, int64, []byte) error); ok { r1 = returnFunc(ctx, p, owner, repo, assetID, body) } else { r1 = ret.Error(1) } return r0, r1 } // GitHubReleaseAPI_UpdateAsset_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateAsset' type GitHubReleaseAPI_UpdateAsset_Call struct { *mock.Call } // UpdateAsset is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - owner string // - repo string // - assetID int64 // - body []byte func (_e *GitHubReleaseAPI_Expecter) UpdateAsset(ctx any, p any, owner any, repo any, assetID any, body any) *GitHubReleaseAPI_UpdateAsset_Call { return &GitHubReleaseAPI_UpdateAsset_Call{Call: _e.mock.On("UpdateAsset", ctx, p, owner, repo, assetID, body)} } func (_c *GitHubReleaseAPI_UpdateAsset_Call) Run(run func(ctx context.Context, p domain.Principal, owner string, repo string, assetID int64, body []byte)) *GitHubReleaseAPI_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 string if args[2] != nil { arg2 = args[2].(string) } var arg3 string if args[3] != nil { arg3 = args[3].(string) } var arg4 int64 if args[4] != nil { arg4 = args[4].(int64) } var arg5 []byte if args[5] != nil { arg5 = args[5].([]byte) } run( arg0, arg1, arg2, arg3, arg4, arg5, ) }) return _c } func (_c *GitHubReleaseAPI_UpdateAsset_Call) Return(bytes []byte, err error) *GitHubReleaseAPI_UpdateAsset_Call { _c.Call.Return(bytes, err) return _c } func (_c *GitHubReleaseAPI_UpdateAsset_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, owner string, repo string, assetID int64, body []byte) ([]byte, error)) *GitHubReleaseAPI_UpdateAsset_Call { _c.Call.Return(run) return _c } // UpdateRelease provides a mock function for the type GitHubReleaseAPI func (_mock *GitHubReleaseAPI) UpdateRelease(ctx context.Context, p domain.Principal, owner string, repo string, id int64, body []byte) ([]byte, error) { ret := _mock.Called(ctx, p, owner, repo, id, body) if len(ret) == 0 { panic("no return value specified for UpdateRelease") } var r0 []byte var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, int64, []byte) ([]byte, error)); ok { return returnFunc(ctx, p, owner, repo, id, body) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, int64, []byte) []byte); ok { r0 = returnFunc(ctx, p, owner, repo, id, body) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]byte) } } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, string, string, int64, []byte) error); ok { r1 = returnFunc(ctx, p, owner, repo, id, body) } else { r1 = ret.Error(1) } return r0, r1 } // GitHubReleaseAPI_UpdateRelease_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateRelease' type GitHubReleaseAPI_UpdateRelease_Call struct { *mock.Call } // UpdateRelease is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - owner string // - repo string // - id int64 // - body []byte func (_e *GitHubReleaseAPI_Expecter) UpdateRelease(ctx any, p any, owner any, repo any, id any, body any) *GitHubReleaseAPI_UpdateRelease_Call { return &GitHubReleaseAPI_UpdateRelease_Call{Call: _e.mock.On("UpdateRelease", ctx, p, owner, repo, id, body)} } func (_c *GitHubReleaseAPI_UpdateRelease_Call) Run(run func(ctx context.Context, p domain.Principal, owner string, repo string, id int64, body []byte)) *GitHubReleaseAPI_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 string if args[2] != nil { arg2 = args[2].(string) } var arg3 string if args[3] != nil { arg3 = args[3].(string) } var arg4 int64 if args[4] != nil { arg4 = args[4].(int64) } var arg5 []byte if args[5] != nil { arg5 = args[5].([]byte) } run( arg0, arg1, arg2, arg3, arg4, arg5, ) }) return _c } func (_c *GitHubReleaseAPI_UpdateRelease_Call) Return(bytes []byte, err error) *GitHubReleaseAPI_UpdateRelease_Call { _c.Call.Return(bytes, err) return _c } func (_c *GitHubReleaseAPI_UpdateRelease_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, owner string, repo string, id int64, body []byte) ([]byte, error)) *GitHubReleaseAPI_UpdateRelease_Call { _c.Call.Return(run) return _c } // UploadAsset provides a mock function for the type GitHubReleaseAPI func (_mock *GitHubReleaseAPI) UploadAsset(ctx context.Context, p domain.Principal, owner string, repo string, id int64, name string, label string, contentType string, size int64, r io.Reader) ([]byte, error) { ret := _mock.Called(ctx, p, owner, repo, id, name, label, contentType, size, r) if len(ret) == 0 { panic("no return value specified for UploadAsset") } var r0 []byte var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, int64, string, string, string, int64, io.Reader) ([]byte, error)); ok { return returnFunc(ctx, p, owner, repo, id, name, label, contentType, size, r) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, string, int64, string, string, string, int64, io.Reader) []byte); ok { r0 = returnFunc(ctx, p, owner, repo, id, name, label, contentType, size, r) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]byte) } } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, string, string, int64, string, string, string, int64, io.Reader) error); ok { r1 = returnFunc(ctx, p, owner, repo, id, name, label, contentType, size, r) } else { r1 = ret.Error(1) } return r0, r1 } // GitHubReleaseAPI_UploadAsset_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UploadAsset' type GitHubReleaseAPI_UploadAsset_Call struct { *mock.Call } // UploadAsset is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - owner string // - repo string // - id int64 // - name string // - label string // - contentType string // - size int64 // - r io.Reader func (_e *GitHubReleaseAPI_Expecter) UploadAsset(ctx any, p any, owner any, repo any, id any, name any, label any, contentType any, size any, r any) *GitHubReleaseAPI_UploadAsset_Call { return &GitHubReleaseAPI_UploadAsset_Call{Call: _e.mock.On("UploadAsset", ctx, p, owner, repo, id, name, label, contentType, size, r)} } func (_c *GitHubReleaseAPI_UploadAsset_Call) Run(run func(ctx context.Context, p domain.Principal, owner string, repo string, id int64, name string, label string, contentType string, size int64, r io.Reader)) *GitHubReleaseAPI_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 string if args[2] != nil { arg2 = args[2].(string) } var arg3 string if args[3] != nil { arg3 = args[3].(string) } var arg4 int64 if args[4] != nil { arg4 = args[4].(int64) } var arg5 string if args[5] != nil { arg5 = args[5].(string) } var arg6 string if args[6] != nil { arg6 = args[6].(string) } var arg7 string if args[7] != nil { arg7 = args[7].(string) } var arg8 int64 if args[8] != nil { arg8 = args[8].(int64) } var arg9 io.Reader if args[9] != nil { arg9 = args[9].(io.Reader) } run( arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, ) }) return _c } func (_c *GitHubReleaseAPI_UploadAsset_Call) Return(bytes []byte, err error) *GitHubReleaseAPI_UploadAsset_Call { _c.Call.Return(bytes, err) return _c } func (_c *GitHubReleaseAPI_UploadAsset_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, owner string, repo string, id int64, name string, label string, contentType string, size int64, r io.Reader) ([]byte, error)) *GitHubReleaseAPI_UploadAsset_Call { _c.Call.Return(run) return _c }