Documentation ¶
Index ¶
- func ActivateVersion(app, version string) error
- func DeleteVersion(app, version string) error
- func DownloadFile(url, filepath string) error
- func DownloadVersion(app, version string, asset *github.ReleaseAsset, d func(ms ...interface{})) (bool, error)
- func FilterAsset(release *github.RepositoryRelease) *github.ReleaseAsset
- func GetActiveVersion(app string) (string, error)
- func GetArch() string
- func GetHomeActiveDir(app string) (string, error)
- func GetHomeDir(app string) (string, error)
- func GetHomeTmpDir(app string) (string, error)
- func GetHomeVersionDir(app, versoin string) (string, error)
- func GetHomeVersionsDir(app string) (string, error)
- func IsActiveVersion(app, version string) (bool, error)
- func IsInstalledVersion(app, version string) (bool, string, error)
- func IsSuitableAsset(assetName, arch, os string) bool
- func PrepareHomeDir(app string) error
- func Unzip(src string, dest string) ([]string, error)
- type InstalledVersion
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActivateVersion ¶
ActivateVersion activates certain version
func DownloadFile ¶
DownloadFile will download a url to a local file. (it will write as it downloads and not load the whole file into memory)
func DownloadVersion ¶
func DownloadVersion(app, version string, asset *github.ReleaseAsset, d func(ms ...interface{})) (bool, error)
DownloadVersion download a version if needed. Returns (false, nil) if version is already downloaded
func FilterAsset ¶
func FilterAsset(release *github.RepositoryRelease) *github.ReleaseAsset
FilterAsset finds an asset which is need to be downloaded
func GetActiveVersion ¶
GetActiveVersion returns active version
func GetHomeActiveDir ¶
GetHomeActiveDir returns home's active dir for app
func GetHomeTmpDir ¶
GetHomeTmpDir returns home's tmp dir for app
func GetHomeVersionDir ¶
GetHomeVersionDir returns home's versions dir for a certain app version
func GetHomeVersionsDir ¶
GetHomeVersionsDir returns home's versions dir for app
func IsActiveVersion ¶
IsActiveVersion returns bool if version is active
func IsInstalledVersion ¶
IsInstalledVersion returns true (first result) if version is installed
func IsSuitableAsset ¶
IsSuitableAsset returns true if asset is suitable for download for current system
Types ¶
type InstalledVersion ¶
InstalledVersion describes installed version
func ListInstalledVersions ¶
func ListInstalledVersions(app string) ([]InstalledVersion, error)
ListInstalledVersions returns a slice of installed versions