-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathservice.go
More file actions
17 lines (14 loc) · 744 Bytes
/
service.go
File metadata and controls
17 lines (14 loc) · 744 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package github
import (
"context"
"io"
"net/http"
"github.com/google/go-github/v35/github"
)
// RepositoryService is a wrapper around *github.RepositoryService.
type RepositoryService interface {
DownloadContents(ctx context.Context, owner, repo, filepath string, opts *github.RepositoryContentGetOptions) (io.ReadCloser, *github.Response, error)
GetLatestRelease(ctx context.Context, owner, repo string) (*github.RepositoryRelease, *github.Response, error)
GetReleaseByTag(ctx context.Context, owner, repo, tag string) (*github.RepositoryRelease, *github.Response, error)
DownloadReleaseAsset(ctx context.Context, owner, repo string, id int64, followRedirectsClient *http.Client) (rc io.ReadCloser, redirectURL string, err error)
}