nitter/nitters/gitea/api.go

25 lines
785 B
Go
Raw Permalink Normal View History

package gitea
import "code.gitea.io/sdk/gitea"
type PullReviewManager interface {
CreatePullReview(owner, repo string, index int64, opt gitea.CreatePullReviewOptions) (*gitea.PullReview, *gitea.Response, error)
ListPullReviews(owner, repo string, index int64, opt gitea.ListPullReviewsOptions) ([]*gitea.PullReview, *gitea.Response, error)
DeletePullReview(owner, repo string, index, id int64) (*gitea.Response, error)
}
type PullRequestReader interface {
GetPullRequest(owner, repo string, index int64) (*gitea.PullRequest, *gitea.Response, error)
}
type WhoAmIer interface {
GetMyUserInfo() (*gitea.User, *gitea.Response, error)
}
//go:generate mockery --name Client --filename gitea_client.mock.go
type Client interface {
PullReviewManager
PullRequestReader
WhoAmIer
}