Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultPublicKey = `` /* 9373-byte string literal not displayed */
DefaultPublicKey is the public key used to sign builds.
View Source
const Host = "https://proton.me/download"
Variables ¶
View Source
var ( ErrDownloadVerify = errors.New("failed to download or verify the update") ErrInstall = errors.New("failed to install the update") ErrUpdateAlreadyInstalled = errors.New("update is already installed") )
View Source
var DefaultUpdateChannel = StableChannel //nolint:gochecknoglobals
DefaultUpdateChannel is the default update channel to subscribe to. It is set to the stable channel by default, unless overridden at build time.
Functions ¶
func GetDefaultKeyring ¶ added in v3.2.0
Types ¶
type Downloader ¶
type InstallerDefault ¶
type InstallerDefault struct {
// contains filtered or unexported fields
}
func NewInstaller ¶
func NewInstaller(versioner *versioner.Versioner) *InstallerDefault
func (*InstallerDefault) InstallUpdate ¶
func (i *InstallerDefault) InstallUpdate(version *semver.Version, r io.Reader) error
func (*InstallerDefault) IsAlreadyInstalled ¶
func (i *InstallerDefault) IsAlreadyInstalled(version *semver.Version) bool
type Updater ¶
type Updater struct {
// contains filtered or unexported fields
}
func NewUpdater ¶
func (*Updater) GetVersionInfo ¶
func (u *Updater) GetVersionInfo(ctx context.Context, downloader Downloader, channel Channel) (VersionInfo, error)
func (*Updater) InstallUpdate ¶
func (u *Updater) InstallUpdate(ctx context.Context, downloader Downloader, update VersionInfo) error
func (*Updater) RemoveOldUpdates ¶ added in v3.7.0
type VersionInfo ¶
type VersionInfo struct { // Version is the semantic version of the release. Version *semver.Version // MinAuto is the earliest version that is able to autoupdate to this version. // Apps older than this version must run the manual installer and cannot autoupdate. MinAuto *semver.Version // Package is the location of the update package. Package string // Installers are the locations of installer files (for manual installation). Installers []string // LandingPage is the address of the app landing page on proton.me LandingPage string // ReleaseNotesPage is the address of the page containing the release notes. ReleaseNotesPage string // RolloutProportion indicates the proportion (0,1] of users that should update to this version. RolloutProportion float64 }
VersionInfo is information about one version of the app.
type VersionMap ¶
type VersionMap map[Channel]VersionInfo
Source Files ¶
Click to show internal directories.
Click to hide internal directories.