Documentation
¶
Index ¶
- type MockAPIClient
- func (_m *MockAPIClient) CreateRelease(owner string, repo string, opt gitea.CreateReleaseOption) (*gitea.Release, *gitea.Response, error)
- func (_m *MockAPIClient) CreateReleaseAttachment(user string, repo string, release int64, file io.Reader, filename string) (*gitea.Attachment, *gitea.Response, error)
- func (_m *MockAPIClient) DeleteReleaseAttachment(user string, repo string, release int64, id int64) (*gitea.Response, error)
- func (_m *MockAPIClient) EXPECT() *MockAPIClient_Expecter
- func (_m *MockAPIClient) ListReleaseAttachments(user string, repo string, release int64, ...) ([]*gitea.Attachment, *gitea.Response, error)
- func (_m *MockAPIClient) ListReleases(owner string, repo string, opt gitea.ListReleasesOptions) ([]*gitea.Release, *gitea.Response, error)
- type MockAPIClient_CreateReleaseAttachment_Call
- func (_c *MockAPIClient_CreateReleaseAttachment_Call) Return(_a0 *gitea.Attachment, _a1 *gitea.Response, _a2 error) *MockAPIClient_CreateReleaseAttachment_Call
- func (_c *MockAPIClient_CreateReleaseAttachment_Call) Run(...) *MockAPIClient_CreateReleaseAttachment_Call
- func (_c *MockAPIClient_CreateReleaseAttachment_Call) RunAndReturn(...) *MockAPIClient_CreateReleaseAttachment_Call
- type MockAPIClient_CreateRelease_Call
- func (_c *MockAPIClient_CreateRelease_Call) Return(_a0 *gitea.Release, _a1 *gitea.Response, _a2 error) *MockAPIClient_CreateRelease_Call
- func (_c *MockAPIClient_CreateRelease_Call) Run(run func(owner string, repo string, opt gitea.CreateReleaseOption)) *MockAPIClient_CreateRelease_Call
- func (_c *MockAPIClient_CreateRelease_Call) RunAndReturn(...) *MockAPIClient_CreateRelease_Call
- type MockAPIClient_DeleteReleaseAttachment_Call
- func (_c *MockAPIClient_DeleteReleaseAttachment_Call) Return(_a0 *gitea.Response, _a1 error) *MockAPIClient_DeleteReleaseAttachment_Call
- func (_c *MockAPIClient_DeleteReleaseAttachment_Call) Run(run func(user string, repo string, release int64, id int64)) *MockAPIClient_DeleteReleaseAttachment_Call
- func (_c *MockAPIClient_DeleteReleaseAttachment_Call) RunAndReturn(run func(string, string, int64, int64) (*gitea.Response, error)) *MockAPIClient_DeleteReleaseAttachment_Call
- type MockAPIClient_Expecter
- func (_e *MockAPIClient_Expecter) CreateRelease(owner interface{}, repo interface{}, opt interface{}) *MockAPIClient_CreateRelease_Call
- func (_e *MockAPIClient_Expecter) CreateReleaseAttachment(user interface{}, repo interface{}, release interface{}, file interface{}, ...) *MockAPIClient_CreateReleaseAttachment_Call
- func (_e *MockAPIClient_Expecter) DeleteReleaseAttachment(user interface{}, repo interface{}, release interface{}, id interface{}) *MockAPIClient_DeleteReleaseAttachment_Call
- func (_e *MockAPIClient_Expecter) ListReleaseAttachments(user interface{}, repo interface{}, release interface{}, opt interface{}) *MockAPIClient_ListReleaseAttachments_Call
- func (_e *MockAPIClient_Expecter) ListReleases(owner interface{}, repo interface{}, opt interface{}) *MockAPIClient_ListReleases_Call
- type MockAPIClient_ListReleaseAttachments_Call
- func (_c *MockAPIClient_ListReleaseAttachments_Call) Return(_a0 []*gitea.Attachment, _a1 *gitea.Response, _a2 error) *MockAPIClient_ListReleaseAttachments_Call
- func (_c *MockAPIClient_ListReleaseAttachments_Call) Run(run func(user string, repo string, release int64, ...)) *MockAPIClient_ListReleaseAttachments_Call
- func (_c *MockAPIClient_ListReleaseAttachments_Call) RunAndReturn(...) *MockAPIClient_ListReleaseAttachments_Call
- type MockAPIClient_ListReleases_Call
- func (_c *MockAPIClient_ListReleases_Call) Return(_a0 []*gitea.Release, _a1 *gitea.Response, _a2 error) *MockAPIClient_ListReleases_Call
- func (_c *MockAPIClient_ListReleases_Call) Run(run func(owner string, repo string, opt gitea.ListReleasesOptions)) *MockAPIClient_ListReleases_Call
- func (_c *MockAPIClient_ListReleases_Call) RunAndReturn(...) *MockAPIClient_ListReleases_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockAPIClient ¶
MockAPIClient is an autogenerated mock type for the APIClient type
func NewMockAPIClient ¶
func NewMockAPIClient(t interface {
mock.TestingT
Cleanup(func())
}) *MockAPIClient
NewMockAPIClient creates a new instance of MockAPIClient. 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 (*MockAPIClient) CreateRelease ¶
func (_m *MockAPIClient) CreateRelease(owner string, repo string, opt gitea.CreateReleaseOption) (*gitea.Release, *gitea.Response, error)
CreateRelease provides a mock function with given fields: owner, repo, opt
func (*MockAPIClient) CreateReleaseAttachment ¶
func (_m *MockAPIClient) CreateReleaseAttachment(user string, repo string, release int64, file io.Reader, filename string) (*gitea.Attachment, *gitea.Response, error)
CreateReleaseAttachment provides a mock function with given fields: user, repo, release, file, filename
func (*MockAPIClient) DeleteReleaseAttachment ¶
func (_m *MockAPIClient) DeleteReleaseAttachment(user string, repo string, release int64, id int64) (*gitea.Response, error)
DeleteReleaseAttachment provides a mock function with given fields: user, repo, release, id
func (*MockAPIClient) EXPECT ¶
func (_m *MockAPIClient) EXPECT() *MockAPIClient_Expecter
func (*MockAPIClient) ListReleaseAttachments ¶
func (_m *MockAPIClient) ListReleaseAttachments(user string, repo string, release int64, opt gitea.ListReleaseAttachmentsOptions) ([]*gitea.Attachment, *gitea.Response, error)
ListReleaseAttachments provides a mock function with given fields: user, repo, release, opt
func (*MockAPIClient) ListReleases ¶
func (_m *MockAPIClient) ListReleases(owner string, repo string, opt gitea.ListReleasesOptions) ([]*gitea.Release, *gitea.Response, error)
ListReleases provides a mock function with given fields: owner, repo, opt
type MockAPIClient_CreateReleaseAttachment_Call ¶
MockAPIClient_CreateReleaseAttachment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateReleaseAttachment'
func (*MockAPIClient_CreateReleaseAttachment_Call) Return ¶
func (_c *MockAPIClient_CreateReleaseAttachment_Call) Return(_a0 *gitea.Attachment, _a1 *gitea.Response, _a2 error) *MockAPIClient_CreateReleaseAttachment_Call
func (*MockAPIClient_CreateReleaseAttachment_Call) Run ¶
func (_c *MockAPIClient_CreateReleaseAttachment_Call) Run(run func(user string, repo string, release int64, file io.Reader, filename string)) *MockAPIClient_CreateReleaseAttachment_Call
func (*MockAPIClient_CreateReleaseAttachment_Call) RunAndReturn ¶
func (_c *MockAPIClient_CreateReleaseAttachment_Call) RunAndReturn(run func(string, string, int64, io.Reader, string) (*gitea.Attachment, *gitea.Response, error)) *MockAPIClient_CreateReleaseAttachment_Call
type MockAPIClient_CreateRelease_Call ¶
MockAPIClient_CreateRelease_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateRelease'
func (*MockAPIClient_CreateRelease_Call) Return ¶
func (_c *MockAPIClient_CreateRelease_Call) Return(_a0 *gitea.Release, _a1 *gitea.Response, _a2 error) *MockAPIClient_CreateRelease_Call
func (*MockAPIClient_CreateRelease_Call) Run ¶
func (_c *MockAPIClient_CreateRelease_Call) Run(run func(owner string, repo string, opt gitea.CreateReleaseOption)) *MockAPIClient_CreateRelease_Call
func (*MockAPIClient_CreateRelease_Call) RunAndReturn ¶
func (_c *MockAPIClient_CreateRelease_Call) RunAndReturn(run func(string, string, gitea.CreateReleaseOption) (*gitea.Release, *gitea.Response, error)) *MockAPIClient_CreateRelease_Call
type MockAPIClient_DeleteReleaseAttachment_Call ¶
MockAPIClient_DeleteReleaseAttachment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteReleaseAttachment'
func (*MockAPIClient_DeleteReleaseAttachment_Call) Return ¶
func (_c *MockAPIClient_DeleteReleaseAttachment_Call) Return(_a0 *gitea.Response, _a1 error) *MockAPIClient_DeleteReleaseAttachment_Call
func (*MockAPIClient_DeleteReleaseAttachment_Call) Run ¶
func (_c *MockAPIClient_DeleteReleaseAttachment_Call) Run(run func(user string, repo string, release int64, id int64)) *MockAPIClient_DeleteReleaseAttachment_Call
func (*MockAPIClient_DeleteReleaseAttachment_Call) RunAndReturn ¶
func (_c *MockAPIClient_DeleteReleaseAttachment_Call) RunAndReturn(run func(string, string, int64, int64) (*gitea.Response, error)) *MockAPIClient_DeleteReleaseAttachment_Call
type MockAPIClient_Expecter ¶
type MockAPIClient_Expecter struct {
// contains filtered or unexported fields
}
func (*MockAPIClient_Expecter) CreateRelease ¶
func (_e *MockAPIClient_Expecter) CreateRelease(owner interface{}, repo interface{}, opt interface{}) *MockAPIClient_CreateRelease_Call
CreateRelease is a helper method to define mock.On call
- owner string
- repo string
- opt gitea.CreateReleaseOption
func (*MockAPIClient_Expecter) CreateReleaseAttachment ¶
func (_e *MockAPIClient_Expecter) CreateReleaseAttachment(user interface{}, repo interface{}, release interface{}, file interface{}, filename interface{}) *MockAPIClient_CreateReleaseAttachment_Call
CreateReleaseAttachment is a helper method to define mock.On call
- user string
- repo string
- release int64
- file io.Reader
- filename string
func (*MockAPIClient_Expecter) DeleteReleaseAttachment ¶
func (_e *MockAPIClient_Expecter) DeleteReleaseAttachment(user interface{}, repo interface{}, release interface{}, id interface{}) *MockAPIClient_DeleteReleaseAttachment_Call
DeleteReleaseAttachment is a helper method to define mock.On call
- user string
- repo string
- release int64
- id int64
func (*MockAPIClient_Expecter) ListReleaseAttachments ¶
func (_e *MockAPIClient_Expecter) ListReleaseAttachments(user interface{}, repo interface{}, release interface{}, opt interface{}) *MockAPIClient_ListReleaseAttachments_Call
ListReleaseAttachments is a helper method to define mock.On call
- user string
- repo string
- release int64
- opt gitea.ListReleaseAttachmentsOptions
func (*MockAPIClient_Expecter) ListReleases ¶
func (_e *MockAPIClient_Expecter) ListReleases(owner interface{}, repo interface{}, opt interface{}) *MockAPIClient_ListReleases_Call
ListReleases is a helper method to define mock.On call
- owner string
- repo string
- opt gitea.ListReleasesOptions
type MockAPIClient_ListReleaseAttachments_Call ¶
MockAPIClient_ListReleaseAttachments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListReleaseAttachments'
func (*MockAPIClient_ListReleaseAttachments_Call) Return ¶
func (_c *MockAPIClient_ListReleaseAttachments_Call) Return(_a0 []*gitea.Attachment, _a1 *gitea.Response, _a2 error) *MockAPIClient_ListReleaseAttachments_Call
func (*MockAPIClient_ListReleaseAttachments_Call) Run ¶
func (_c *MockAPIClient_ListReleaseAttachments_Call) Run(run func(user string, repo string, release int64, opt gitea.ListReleaseAttachmentsOptions)) *MockAPIClient_ListReleaseAttachments_Call
func (*MockAPIClient_ListReleaseAttachments_Call) RunAndReturn ¶
func (_c *MockAPIClient_ListReleaseAttachments_Call) RunAndReturn(run func(string, string, int64, gitea.ListReleaseAttachmentsOptions) ([]*gitea.Attachment, *gitea.Response, error)) *MockAPIClient_ListReleaseAttachments_Call
type MockAPIClient_ListReleases_Call ¶
MockAPIClient_ListReleases_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListReleases'
func (*MockAPIClient_ListReleases_Call) Return ¶
func (_c *MockAPIClient_ListReleases_Call) Return(_a0 []*gitea.Release, _a1 *gitea.Response, _a2 error) *MockAPIClient_ListReleases_Call
func (*MockAPIClient_ListReleases_Call) Run ¶
func (_c *MockAPIClient_ListReleases_Call) Run(run func(owner string, repo string, opt gitea.ListReleasesOptions)) *MockAPIClient_ListReleases_Call
func (*MockAPIClient_ListReleases_Call) RunAndReturn ¶
func (_c *MockAPIClient_ListReleases_Call) RunAndReturn(run func(string, string, gitea.ListReleasesOptions) ([]*gitea.Release, *gitea.Response, error)) *MockAPIClient_ListReleases_Call