Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultAppSecret = "39ee3ba7b2003ee239d700b53da8dfa4c29f09ee5a460b9641a8bc9d89eac99a" DefaultUpdateCheckURLBase = "https://api-aipc-test.dcclouds.com" DefaultUpdateCheckInterval = 60 * 60 * time.Second )
View Source
const ( AOGVersion = "v0.5" SpecVersion = "v0.2" AOGIcon = "" AOGName = "AOG" AOGDescription = "" /* 341-byte string literal not displayed */ )
Variables ¶
View Source
var ( // awawit provide UpdateCheckUrlBase = DefaultUpdateCheckURLBase // UpdateCheckUrlBase = "http://10.3.74.123:3000" UpdateCheckInterval = DefaultUpdateCheckInterval AppKey = constants.AppName AppSecret = DefaultAppSecret )
Functions ¶
func CleanOldVersionFile ¶
func CleanOldVersionFile() error
func DownloadNewVersion ¶
func DownloadNewVersion(ctx context.Context, updateResponse UpdateResponse) error
func StartCheckUpdate ¶
Types ¶
type UpdateAuthRequest ¶
type UpdateAuthResponse ¶
type UpdateAuthResponse struct { Code string `json:"code"` ExpireIn int `json:"expireIn"` IssuedAt int `json:"issuedAt"` TokenType string `json:"tokenType"` }
func UpdaterAuth ¶
func UpdaterAuth() (UpdateAuthResponse, error)
type UpdateRequest ¶
type UpdateResponse ¶
type UpdateResponse struct { UpdateURL string `json:"downloadUrl"` UpdateVersion string `json:"version"` ReleaseNotes string `json:"updateInfo"` }
func IsNewVersionAvailable ¶
func IsNewVersionAvailable(ctx context.Context) (bool, UpdateResponse)
Click to show internal directories.
Click to hide internal directories.