Documentation
¶
Index ¶
- Variables
- func ConstructArchiveName() string
- func GetLatestVersion(source *UpdateSource) (string, error)
- func GetLatestVersionFromDefaultSources() (string, error)
- func IsDevelopmentVersion(version string) bool
- func Update(source *UpdateSource, version string) error
- func UpdateFromDefaultSources(version string) error
- type ListPossibleUpdatesResult
- type UpdateSource
- type UpdateSourceKind
- type UpdateVersion
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultUpdateSources = []*UpdateSource{ NewUpdateSource( UpdateSourceKindAzure, "autobutlerrelease", "releases/autobutler", ), NewUpdateSource( UpdateSourceKindGithub, "autobutler-org", "autobutler.org", ), NewUpdateSource( UpdateSourceKindGithub, "autobutler-org", "autobutler", ), }
Functions ¶
func ConstructArchiveName ¶
func ConstructArchiveName() string
func GetLatestVersion ¶
func GetLatestVersion(source *UpdateSource) (string, error)
func IsDevelopmentVersion ¶
func Update ¶
func Update(source *UpdateSource, version string) error
Update downloads and installs a new version of the application
func UpdateFromDefaultSources ¶
UpdateFromDefaultSources tries to update from all default sources until one succeeds
Types ¶
type ListPossibleUpdatesResult ¶
type ListPossibleUpdatesResult struct {
Versions []*UpdateVersion
}
ListPossibleUpdatesResult contains the result of listing possible updates
func ListPossibleUpdates ¶
func ListPossibleUpdates(source *UpdateSource, allVersions bool) (*ListPossibleUpdatesResult, error)
ListPossibleUpdates retrieves all available releases that are newer than the current version
func ListPossibleUpdatesFromDefaultSources ¶
func ListPossibleUpdatesFromDefaultSources(allVersions bool) (*ListPossibleUpdatesResult, error)
ListPossibleUpdatesFromDefaultSources lists possible updates from all default sources
type UpdateSource ¶
type UpdateSource struct {
Kind UpdateSourceKind `json:"kind"`
Account string `json:"account"`
Path string `json:"path"`
}
func NewUpdateSource ¶
func NewUpdateSource(kind UpdateSourceKind, account string, path string) *UpdateSource
NewUpdateSource creates a new UpdateSource with the specified kind, account, and path
func (*UpdateSource) BaseUrl ¶
func (s *UpdateSource) BaseUrl() string
func (*UpdateSource) BlobPrefix ¶
func (s *UpdateSource) BlobPrefix() *string
func (*UpdateSource) Container ¶
func (s *UpdateSource) Container() string
func (*UpdateSource) UpdateUrl ¶
func (s *UpdateSource) UpdateUrl() string
type UpdateSourceKind ¶
type UpdateSourceKind string
const ( UpdateSourceKindAzure UpdateSourceKind = "azure" UpdateSourceKindGithub UpdateSourceKind = "github" )
type UpdateVersion ¶
Click to show internal directories.
Click to hide internal directories.