Documentation
¶
Overview ¶
Package release checks GitHub for new atvloadly releases, keeps the latest result for the web UI and notifies once per new version.
Index ¶
Constants ¶
const Repo = "bitxeno/atvloadly"
Repo is the GitHub repository that publishes atvloadly releases.
Variables ¶
This section is empty.
Functions ¶
func Check ¶
func Check() error
Check fetches the latest release, stores it and sends a notification the first time a newer version is seen.
func OnCheck ¶
func OnCheck(fn func(Info))
OnCheck registers fn to be called with the result of every successful check. The desktop app uses it to show the release in its tray menu.
func OnNewRelease ¶
func OnNewRelease(fn func(Info))
OnNewRelease registers fn to be called once per newer release, together with the configured notification. The desktop app uses it to show a native notification.
Types ¶
type Info ¶
type Info struct {
Current string `json:"current"`
Latest string `json:"latest"`
URL string `json:"url"`
PublishedAt time.Time `json:"published_at"`
// Available reports whether Latest is newer than Current. It is false for
// development and nightly builds, whose version is not a release tag.
Available bool `json:"available"`
}
Info describes the running version and the latest published release.