Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Asset ¶
type Asset struct {
Name string `json:"name"`
BrowserDownloadURL string `json:"browser_download_url"`
}
Asset represents a GitHub release asset
type Release ¶
type Release struct {
TagName string `json:"tag_name"`
Name string `json:"name"`
Assets []Asset `json:"assets"`
}
Release represents a GitHub release
type UpgradeOptions ¶
type UpgradeOptions struct {
Version string // Target version (e.g., "v0.1.6" or "latest")
DryRun bool // If true, only show what would happen
APIBase string // GitHub API base URL (for testing)
DownloadBase string // GitHub download base URL (for testing)
DisableInstall bool // If true, don't actually install (for testing)
CurrentVersion string // Current version
CurrentExecutable string // Path to current executable
// Supply-chain verification (opt-in)
VerifySignature bool // If true, verify cosign signature
CosignKey string // Path/URL to cosign public key (optional, keyless if empty)
VerifyProvenance bool // If true, verify SLSA provenance
}
UpgradeOptions contains options for upgrade
type UpgradeResult ¶
type UpgradeResult struct {
CurrentVersion string `json:"currentVersion"`
TargetVersion string `json:"targetVersion"`
Updated bool `json:"updated"`
Message string `json:"message"`
AssetName string `json:"assetName,omitempty"`
Checksum string `json:"checksum,omitempty"`
InstallPath string `json:"installPath,omitempty"`
SignatureVerified bool `json:"signatureVerified,omitempty"`
ProvenanceVerified bool `json:"provenanceVerified,omitempty"`
}
UpgradeResult contains the result of an upgrade operation
func Upgrade ¶
func Upgrade(opts *UpgradeOptions) (*UpgradeResult, error)
Upgrade performs the upgrade operation
Click to show internal directories.
Click to hide internal directories.