Documentation ¶
Index ¶
Constants ¶
View Source
const DEBUG = false
DEBUG flag
View Source
const Version = "0.6.0"
Version export
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GitHubAsset ¶
type GitHubAsset struct { ID int `json:"id"` Name string `json:"name"` Download string `json:"browser_download_url"` }
GitHubAsset export
type GitHubRelease ¶
type GitHubRelease struct { Version string `json:"tag_name"` Assets []GitHubAsset `json:"assets"` Prerelease bool `json:"prerelease"` SemanticVersion SemanticVersion }
GitHubRelease export
type SemanticVersion ¶
SemanticVersion export
func NewSemanticVersion ¶
func NewSemanticVersion(version string) *SemanticVersion
NewSemanticVersion export
func (*SemanticVersion) IsMoreRecentThan ¶
func (id *SemanticVersion) IsMoreRecentThan(version *SemanticVersion) bool
IsMoreRecentThan export
func (*SemanticVersion) PlatformArchiveName ¶
func (id *SemanticVersion) PlatformArchiveName() string
PlatformArchiveName export
func (*SemanticVersion) SymlinkPath ¶
func (id *SemanticVersion) SymlinkPath() string
SymlinkPath export
type Update ¶
type Update struct {
// contains filtered or unexported fields
}
Update export
func NewGitHubEnterpriseUpdate ¶
func NewGitHubEnterpriseUpdate(host string, owner string, project string, token string, prerelease bool) *Update
NewGitHubEnterpriseUpdate export
func NewGitHubUpdate ¶
NewGitHubUpdate export
func (*Update) AutoUpdate ¶
func (id *Update) AutoUpdate(current *SemanticVersion, interval time.Duration, restartFunc func(release *SemanticVersion))
AutoUpdate export
func (*Update) Check ¶
func (id *Update) Check(currentVer *SemanticVersion) *GitHubRelease
Check obtains the latest release version from GitHub
func (*Update) RemoveVersion ¶
func (id *Update) RemoveVersion(version *SemanticVersion)
RemoveVersion export
func (*Update) Update ¶
func (id *Update) Update(current *SemanticVersion, release *GitHubRelease) bool
Update obtains the latest release binary from GitHub and writes it to disk
Click to show internal directories.
Click to hide internal directories.