2021-08-14 20:28:50 +00:00
|
|
|
package updater
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
|
|
|
type Client struct {
|
|
|
|
// GitHub repo with author e.g. "MedzikUser/go-utils"
|
|
|
|
GitHub string
|
2021-08-15 14:01:22 +00:00
|
|
|
// GitHub Token
|
|
|
|
GitHubToken string
|
2021-08-14 20:28:50 +00:00
|
|
|
// Application version e.g. "2.15.43"
|
|
|
|
Version string
|
|
|
|
// Binary name in archive e.g. "utils.out"
|
|
|
|
Binary string
|
|
|
|
// Check latest version every
|
|
|
|
CheckEvery time.Duration
|
|
|
|
/*
|
|
|
|
After update exec function e.g.
|
|
|
|
func() {
|
|
|
|
os.Exit(0)
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
AfterUpdate func()
|
2021-08-15 19:33:53 +00:00
|
|
|
|
|
|
|
// Update Rules
|
|
|
|
|
|
|
|
// X.y.z
|
|
|
|
Major bool
|
2021-08-14 20:28:50 +00:00
|
|
|
}
|