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 Request ¶
Request describes how to source a follower's sha256: the source method, the producer's release assets, an asset-selecting pattern, and an optional explicit checksums-file 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.