version

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 21, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

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

func StartCheckUpdate(ctx context.Context)

Types

type UpdateAuthRequest

type UpdateAuthRequest struct {
	AppKey     string `json:"appKey"`
	Timestamp  int64  `json:"timestamp"`
	NonceStr   string `json:"nonce"`
	Sign       string `json:"sign"`
	ClientType string `json:"clientType"`
}

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 UpdateRequest struct {
	Platform string `json:"platform"`
	Arch     string `json:"arch"`
}

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL