Documentation
¶
Overview ¶
Package updatecheck selects update notices from Hikyo's release channel.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDownloadHTTPClient ¶
NewDownloadHTTPClient creates a public-address-only client that follows only GitHub's fixed release-asset redirect hosts.
Types ¶
type Asset ¶
type Asset struct {
Name string `json:"name"`
URL string `json:"url"`
Digest string `json:"digest,omitempty"`
Size int64 `json:"size"`
}
Asset is one immutable GitHub release download.
type CachedSource ¶
type CachedSource struct {
// contains filtered or unexported fields
}
CachedSource bounds release-source requests across all callers in a process.
func NewCachedSource ¶
NewCachedSource validates the cache seam before first use.
func (*CachedSource) Releases ¶
func (c *CachedSource) Releases(ctx context.Context) ([]Release, error)
Releases refreshes at most once per TTL. Refresh failures are returned loudly and do not advance freshness; callers may retain their last rendered state, but they cannot mistake stale release data for a successful check.
type Channel ¶
type Channel string
Channel is one installation's release track.
func ParseChannel ¶
ParseChannel validates a configured release track.
type GitHubSource ¶
type GitHubSource struct {
// contains filtered or unexported fields
}
GitHubSource reads Hikyo's public GitHub Releases feed.
func NewGitHubSource ¶
func NewGitHubSource(client *http.Client) *GitHubSource
NewGitHubSource binds the pinned Hikyo release URL to an HTTP client.
func (*GitHubSource) ReleaseByVersion ¶
ReleaseByVersion resolves an exact authenticated graph reference even after that release has left the first discovery page. The returned record is still discovery only; the caller must verify its signed identity and full inventory.
type Release ¶
type Release struct {
Version string `json:"version"`
URL string `json:"url"`
Prerelease bool `json:"prerelease"`
Immutable bool `json:"immutable"`
PublishedAt time.Time `json:"published_at"`
Assets []Asset `json:"assets,omitempty"`
}
Release is one published release-source record.
type Status ¶
type Status struct {
Channel Channel `json:"channel"`
CurrentVersion string `json:"current_version"`
LatestVersion string `json:"latest_version,omitempty"`
URL string `json:"url,omitempty"`
Available bool `json:"available"`
Prerelease bool `json:"prerelease"`
Immutable bool `json:"immutable"`
PublishedAt time.Time `json:"published_at,omitempty"`
ApplySupported bool `json:"apply_supported"`
ApplyBackend string `json:"apply_backend,omitempty"`
ApplyError string `json:"apply_error,omitempty"`
Assets []Asset `json:"-"`
}
Status is the complete notification decision for one installed version.