0
0
mirror of https://github.com/thegeeklab/wp-gitea-release.git synced 2024-11-27 12:00:36 +00:00
wp-gitea-release/gitea/api.go

17 lines
687 B
Go
Raw Normal View History

package gitea
import (
"io"
"code.gitea.io/sdk/gitea"
)
//nolint:lll
type APIClient interface {
ListReleases(owner, repo string, opt gitea.ListReleasesOptions) ([]*gitea.Release, *gitea.Response, error)
CreateRelease(owner, repo string, opt gitea.CreateReleaseOption) (*gitea.Release, *gitea.Response, error)
ListReleaseAttachments(user, repo string, release int64, opt gitea.ListReleaseAttachmentsOptions) ([]*gitea.Attachment, *gitea.Response, error)
CreateReleaseAttachment(user, repo string, release int64, file io.Reader, filename string) (*gitea.Attachment, *gitea.Response, error)
DeleteReleaseAttachment(user, repo string, release, id int64) (*gitea.Response, error)
}