up2date

package
v0.0.0-...-804a44b Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2020 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UpdateURL string

UpdateURL : URL for the new binary

Functions

func DoUpdate

func DoUpdate(fileType, filenameBIN string) (err error)

DoUpdate : Update binary

func GetVersion

func GetVersion() (err error)

GetVersion : Information about the latest version

func Init

func Init()

Init : Init

Types

type ClientInfo

type ClientInfo struct {
	Arch   string `json:"arch,required"`
	Branch string `json:"branch,required"`
	CMD    string `json:"cmd,omitempty"`
	Name   string `json:"name,required"`
	OS     string `json:"os,required"`
	URL    string `json:"url,required"`

	Response ServerResponse `json:"response,omitempty"`
}

ClientInfo : Information about the key (NAME OS, ARCH, UUID, KEY)

var Updater ClientInfo

Updater : Client infos

type ServerResponse

type ServerResponse struct {
	Status    bool   `json:"status,omitempty"`
	Reason    string `json:"reason,omitempty"`
	Version   string `json:"version,omitempty"`
	UpdateBIN string `json:"update.url.bin,omitempty"`
	UpdateZIP string `json:"update.url.zip,omitempty"`
	Filename  string `json:"filename.bin,omitempty"`
}

ServerResponse : Response from server after client request

Jump to

Keyboard shortcuts

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