version

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const AOGVersion = "v0.3"

Variables

View Source
var (
	// awawit provide
	UpdateCheckUrlBase = "https://api-aipc-test.dcclouds.com"
	//UpdateCheckUrlBase  = "http://10.3.74.123:3000"
	UpdateCheckInterval = 60 * 60 * time.Second

	AppKey    = "aog"
	AppSecret = "39ee3ba7b2003ee239d700b53da8dfa4c29f09ee5a460b9641a8bc9d89eac99a"
)

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