Documentation ¶
Index ¶
- Variables
- 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) RemoveOldVersions() error
- func (v *Versioner) RemoveOtherVersions(versionToKeep *semver.Version) error
- type Versions
Constants ¶
This section is empty.
Variables ¶
var ( ErrNoVersions = errors.New("no available versions") ErrNoExecutable = errors.New("no executable found") )
Functions ¶
This section is empty.
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) RemoveOldVersions ¶
RemoveOldVersions removes all but the latest app version.
func (*Versioner) RemoveOtherVersions ¶
RemoveOtherVersions removes all but the specific provided app version.