Documentation
¶
Index ¶
Constants ¶
View Source
const UpdateLockTimeOut = 150
UpdateLockTimeOut 更新锁超时时间
View Source
const VersionBig = 1
VersionBig 版本号大
View Source
const VersionEqual = 0
VersionEqual 版本号相等
View Source
const VersionSmall = 2
VersionSmall 版本号小
Variables ¶
View Source
var UpdateLocalJSONFile = fmt.Sprintf("%s\\binary_version.json", pf.AppBinPath)
UpdateLocalJSONFile 更新文件本地地址
View Source
var UpdateLockFile = fmt.Sprintf("%s\\update.lock", pf.AppBinPath)
UpdateLockFile 更新锁文件地址
View Source
var UpdateNetworkJSONFile = "http://image.68wu.cn/goannie/binary_version.json"
UpdateNetworkJSONFile 更新文件网络地址
Functions ¶
Types ¶
type VersionJSON ¶
type VersionJSON struct {
Annie struct {
Version string `json:"version"`
FileURL string `json:"fileURL"`
} `json:"annie"`
Ffmpeg struct {
Version string `json:"version"`
FileURL string `json:"fileURL"`
} `json:"ffmpeg"`
Aria2 struct {
Version string `json:"version"`
FileURL string `json:"fileURL"`
} `json:"aria2"`
Redis struct {
Version string `json:"version"`
FileURL string `json:"fileURL"`
} `json:"redis"`
RedisConf struct {
Version string `json:"version"`
FileURL string `json:"fileURL"`
} `json:"redisConf"`
}
VersionJSON binary_version.json格式
func GetNetworkJSONFile ¶
func GetNetworkJSONFile() (*VersionJSON, error)
GetNetworkJSONFile 获取网络更新文件内容
func GetVersionJSON ¶
func GetVersionJSON() (*VersionJSON, error)
GetVersionJSON 获取 binary_version.json 内容
func GetVersionJSONFile ¶
func GetVersionJSONFile() (*os.File, *VersionJSON, error)
GetVersionJSONFile 返回文件,以及内容,不存在则创建
Click to show internal directories.
Click to hide internal directories.