Documentation
¶
Overview ¶
Package checksum sources a sha256 for a value=sha256 follower. The source is selectable (digest, checksums file, or download-and-hash) with an auto chain and a verify cross-check; see Resolve.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Fetch ¶
Fetch downloads the checksum file at rawURL (with <version> expanded) and returns the sha256 for the asset matching pat. An empty pat is allowed only when the file holds a single entry.
Types ¶
type DownloadFunc ¶ added in v0.3.10
DownloadFunc streams a release asset's content through the producer provider's authenticated channel, reaching assets a plain GET of the public URL cannot (a private repository).
type Request ¶
type Request struct {
Source string
Assets []model.Asset
Pattern string
URL string
Version string
Download DownloadFunc
}
Request describes how to source a follower's sha256: the source method, the producer's release assets, an asset-selecting pattern, an optional explicit checksums-file URL, and an optional authenticated download (nil falls back to a plain GET of the asset's public URL).
type Resolver ¶ added in v0.1.1
type Resolver struct {
// contains filtered or unexported fields
}
Resolver sources sha256 values with a run-scoped cache of parsed checksum files, so many followers can choose from one downloaded checksum list.
func NewResolver ¶ added in v0.1.1
NewResolver returns a checksum resolver using client for HTTP downloads.