Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EmbedMode ¶
type EmbedMode string
EmbedMode represents the checksum acquisition mode
const ( // EmbedModeDownload downloads checksum files from GitHub releases EmbedModeDownload EmbedMode = "download" // EmbedModeChecksumFile uses a local checksum file EmbedModeChecksumFile EmbedMode = "checksum-file" // EmbedModeCalculate downloads assets and calculates checksums EmbedModeCalculate EmbedMode = "calculate" )
type Embedder ¶
type Embedder struct {
Mode EmbedMode
Version string
Spec *spec.InstallSpec
SpecAST *ast.File
ChecksumFile string
}
Embedder manages the process of embedding checksums
type GitHubReleaseAsset ¶ added in v0.3.1
type GitHubReleaseAsset struct {
Name string `json:"name"`
BrowserDownloadURL string `json:"browser_download_url"`
// GitHub API sometimes includes digest information
Digest string `json:"digest,omitempty"`
}
GitHubReleaseAsset represents a GitHub release asset
type GitHubReleaseResponse ¶ added in v0.3.1
type GitHubReleaseResponse struct {
TagName string `json:"tag_name"`
Assets []GitHubReleaseAsset `json:"assets"`
}
GitHubReleaseResponse represents a GitHub release API response
type Verifier ¶ added in v0.9.2
type Verifier struct {
Spec *spec.InstallSpec
Version string
}
Verifier handles checksum verification for downloaded assets
func NewVerifier ¶ added in v0.9.2
func NewVerifier(spec *spec.InstallSpec, version string) *Verifier
NewVerifier creates a new checksum verifier
func (*Verifier) GetChecksum ¶ added in v0.9.2
GetChecksum retrieves the checksum for a given filename It first checks embedded checksums, then tries to download checksum file
Click to show internal directories.
Click to hide internal directories.