Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type API ¶ added in v0.13.0
type API struct {
// contains filtered or unexported fields
}
func NewGitHubAPI ¶ added in v0.13.0
func NewGitHubAPI(repo Repository) *API
func (*API) CompareDiff ¶ added in v0.13.0
func (*API) GetFileContent ¶ added in v0.13.0
type Asset ¶
type Asset struct { Name string `json:"name"` BrowserDownloadURL string `json:"browser_download_url"` }
Asset defines github release asset
type Client ¶
type Client struct{}
Client defines github client
func (*Client) DownloadAsset ¶
DownloadAsset downloads github asset based on the asset api path. Currently, it can only download asset from publicly available repository. `apiPath` follows prefix [https://api.github.com/repos], which can be generated by this provider parser. For more information, check [this](https://docs.github.com/en/rest/releases/releases) documentation.
func (*Client) DownloadRelease ¶
func (*Client) DownloadRelease(ctx context.Context, apiPath string) (*model.RepositoryRelease, error)
DownloadRelease downloads a release based on the API path
type Release ¶
type Release struct { TagName string `json:"tag_name"` Draft bool `json:"draft"` Prerelease bool `json:"prerelease"` Assets []*Asset `json:"assets"` }
Release defines github repository release
type Repository ¶ added in v0.13.0
type Repository interface { CompareCommits(ctx context.Context, owner, repo, base, head string, opts *github.ListOptions) (*github.CommitsComparison, *github.Response, error) GetContents(ctx context.Context, owner, repo, path string, opts *github.RepositoryContentGetOptions) (fileContent *github.RepositoryContent, directoryContent []*github.RepositoryContent, resp *github.Response, err error) }
Click to show internal directories.
Click to hide internal directories.