Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Asset ¶
type Asset struct { // Name is the name of the asset. Name string `json:"name"` // URL is the URL to download the asset. URL string `json:"url"` // Sha256 is the sha256 checksum of the asset. Sha256 string `json:"sha256"` // ContentType is the content type of the asset. ContentType string `json:"content_type"` // Size is the size of the asset in bytes. Size int `json:"size"` }
Asset represents a GitHub release asset.
type DownloadAssetOptions ¶
type DownloadAssetsResult ¶
type DownloadAssetsResult struct {
TargetDir string
}
func DownloadAndExtractAsset ¶
func DownloadAndExtractAsset(asset Asset, opts DownloadAssetOptions) (DownloadAssetsResult, error)
DownloadAndExtractAsset downloads and extracts the given asset to the given directory. If the SHA256 checksum of the downloaded file does not match the one stored in the asset, an error is returned.
type Release ¶
type Release struct { TagName string `json:"tag_name"` TargetCommitish string `json:"target_commitish"` Name string `json:"name"` Draft bool `json:"draft"` Prerelease bool `json:"prerelease"` CreatedAt time.Time `json:"created_at"` PublishedAt time.Time `json:"published_at"` Assets Assets `json:"assets"` }
Release represents a GitHub release.
Click to show internal directories.
Click to hide internal directories.