Documentation
¶
Overview ¶
Package updater is a desktop auto-update client. A publisher signs a release manifest with an ed25519 private key; the app embeds the matching public key and verifies the manifest before trusting any release info or downloading an artifact. This signature scheme is independent of OS code-signing — it authenticates the *update metadata* so a tampered or spoofed manifest is rejected. Pure Go; the security-critical parts (verify, version compare) are unit-tested. Self-replacement/relaunch is desktop-only.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyAndRelaunch ¶
ApplyAndRelaunch replaces the running executable with the downloaded artifact and relaunches it. Desktop-only. On Windows a running .exe cannot be overwritten in place, so the current binary is moved aside first.
NOTE: self-replacement is OS-specific and must be validated by running a real packaged app; the verify/download path above is the security-critical, unit-tested part.
func SignManifest ¶
func SignManifest(m *Manifest, priv ed25519.PrivateKey) ([]byte, error)
SignManifest produces a signed-manifest document: the manifest JSON plus a base64 ed25519 signature over exactly those bytes. It is the counterpart to VerifyManifest and is used by the publisher (goleo build --publish).
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client checks for and downloads updates.
type Config ¶
type Config struct {
ManifestURL string // URL of the signed manifest JSON
PublicKey string // base64-encoded ed25519 public key
CurrentVersion string // the running app's version
}
Config configures the update client.