Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UpdateStatus ¶ added in v1.5.0
type UpdateStatus int
UpdateStatus represents the status after Updater{}.Update() was called
const ( // Unknown update status (something went wrong) Unknown UpdateStatus = iota // UpToDate means the software is already up to date UpToDate // Updated means the software have been updated Updated )
type Updater ¶
type Updater struct {
Provider provider.Provider
ExecutableName string
Version string
OverrideExecutable string // (optionnal) Overrides the path of the executable
// contains filtered or unexported fields
}
Updater struct
func (*Updater) GetExecutable ¶ added in v1.5.0
GetExecutable gets the executable path that will be used to for the update process same as fileio.GetExecutable() but this one takes into account the variable OverrideExecutablePath
func (*Updater) GetLatestVersion ¶ added in v1.5.0
GetLatestVersion gets the latest version (same as provider.GetLatestVersion but keeps the version in cache)
func (*Updater) Rollback ¶ added in v1.5.0
Rollback rollbacks to the previous version Use this if you know what you are doing
func (*Updater) Update ¶ added in v1.0.0
func (u *Updater) Update() (status UpdateStatus, err error)
Update runs the updater It will update the current application if an update is found
Click to show internal directories.
Click to hide internal directories.