Documentation ¶
Index ¶
- Variables
- func VerifyUpdateFolder(kr *crypto.KeyRing, path string) error
- type Version
- type Versioner
- func (v *Versioner) GetExecutableInDirectory(name, directory string) (string, error)
- func (v *Versioner) InstallNewVersion(version *semver.Version, r io.Reader) error
- func (v *Versioner) ListVersions() (Versions, error)
- func (v *Versioner) RemoveCurrentVersion() error
- func (v *Versioner) RemoveOldVersions() error
- func (v *Versioner) RemoveOtherVersions(versionToKeep *semver.Version) error
- type Versions
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type Version ¶
type Version struct {
// contains filtered or unexported fields
}
func (*Version) GetExecutable ¶
GetExecutable returns the full path to the executable of the given version. It returns an error if the executable is missing or does not have executable permissions set.
type Versioner ¶
type Versioner struct {
// contains filtered or unexported fields
}
Versioner manages a directory of versioned app directories.
func (*Versioner) GetExecutableInDirectory ¶
GetExecutableInDirectory returns the full path to the executable in the given directory, if present. It returns an error if the executable is missing or does not have executable permissions set.
func (*Versioner) InstallNewVersion ¶
InstallNewVersion installs a tgz update package of the given version.
func (*Versioner) ListVersions ¶
ListVersions returns a collection of all available version numbers, sorted from newest to oldest.
func (*Versioner) RemoveCurrentVersion ¶
func (*Versioner) RemoveOldVersions ¶
RemoveOldVersions removes all but the latest app version.
func (*Versioner) RemoveOtherVersions ¶
RemoveOtherVersions removes all but the specific provided app version.