defines

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: May 8, 2019 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AbiOverride = ""
View Source
var BEBIN = "beadm"

Boot-Environment defaults ----------------------------------------------------

View Source
var BESTAGE = "updatego-stage"
View Source
var BeNameFlag string

Setup our CLI Flags ----------------------------------------------------

View Source
var BootloaderFlag bool
View Source
var Bootstrap = false

Set our default bootstrap options

View Source
var BootstrapFatal = false
View Source
var CacheDir = SysUpDb + "/cache"
View Source
var CacheDirFlag string
View Source
var ChangeTrainFlag string
View Source
var CheckFlag bool
View Source
var ConfigJson = "/usr/local/etc/" + toolname + ".json"

Configuration file location

View Source
var DisableBsFlag bool
View Source
var FetchOnlyFlag bool
View Source
var FullUpdateFlag bool
View Source
var ImgMnt = SysUpDb + "/mnt"
View Source
var ListTrainFlag bool
View Source
var LogFile = "/var/log/" + toolname + ".log"

Where to log by default

View Source
var MdDev = ""
View Source
var PKGBIN = "pkg-static"

Package defaults ----------------------------------------------------

View Source
var PkgConf = SysUpDb + "/pkg.conf"
View Source
var PkgDb = SysUpDb + "/pkgdb"
View Source
var STAGEDIR = "/.updatestage"
View Source
var SysUpDb = "/var/db/" + toolname
View Source
var TrainPubKey = "/usr/local/share/" + toolname + "/trains.pub"

Default pubkey used for trains

View Source
var TrainsUrl string

Global trains URL

View Source
var UpdateFileFlag string
View Source
var UpdateFlag bool
View Source
var UpdateKeyFlag string
View Source
var Updater = websocket.Upgrader{} // use default options
View Source
var WSClient *websocket.Conn
View Source
var WSServer *websocket.Conn

Start our client connection to the WS server

View Source
var WebsocketAddr string
View Source
var WebsocketFlag bool
View Source
var WebsocketIP string
View Source
var WebsocketPort int

Functions

func LoadConfig

func LoadConfig() bool

func SetLocs

func SetLocs()

Types

type Check

type Check struct {
	Updates bool
	Details UpdateInfo
}

Return API of check request

type ConfigFile

type ConfigFile struct {
	Bootstrap        bool   `json:"bootstrap"`
	BootstrapFatal   bool   `json:"bootstrapfatal"`
	CacheDir         string `json:"cachedir"`
	OfflineUpdateKey string `json:"offlineupdatekey"`
	TrainsURL        string `json:"trainsurl"`
	TrainsPubKey     string `json:"trainspubkey"`
}

Local configuration file

type DelPkg

type DelPkg struct {
	Name    string `json:"name"`
	Version string `json:"Version"`
}

type Envelope

type Envelope struct {
	Method string
}

type InfoMsg

type InfoMsg struct {
	Info string
}

Return informational message

type NewPkg

type NewPkg struct {
	Name    string `json:"name"`
	Version string `json:"Version"`
}

Define all our JSON structures ----------------------------------------------------

type RiPkg

type RiPkg struct {
	Name   string `json:"name"`
	Reason string `json:"Reason"`
}

type SendReq

type SendReq struct {
	Method     string `json:"method"`
	Bename     string `json:"bename"`
	Disablebs  bool   `json:"disablebs"`
	Fullupdate bool   `json:"fullupdate"`
	Cachedir   string `json:"cachedir"`
	Train      string `json:"train"`
	Updatefile string `json:"updatefile"`
	Updatekey  string `json:"updatekey"`
	Fetchonly  bool   `json:"fetchonly"`
}

Generic API request to handle check/update/list-trains/set-train via the Method property

type TrainDef

type TrainDef struct {
	Description string   `json:"description"`
	Deprecated  bool     `json:"deprecated"`
	Name        string   `json:"name"`
	NewTrain    string   `json:"newtrain"`
	PkgURL      string   `json:"pkgurl"`
	PkgKey      []string `json:"pkgkey"`
	Tags        []string `json:"tags"`
	Version     int      `json:"version"`
	Current     bool     `json:"current"`
}

Train Def

type TrainsDef

type TrainsDef struct {
	Trains  []TrainDef `json:"trains"`
	Default string     `json:"default"`
}

Trains Top Level

type UpPkg

type UpPkg struct {
	Name       string `json:"name"`
	OldVersion string `json:"OldVersion"`
	NewVersion string `json:"NewVersion"`
}

type UpdateInfo

type UpdateInfo struct {
	New       []NewPkg `json:"new"`
	Up        []UpPkg  `json:"update"`
	Ri        []RiPkg  `json:"reinstall"`
	Del       []DelPkg `json:"delete"`
	KernelUp  bool     `json:"kernelup"`
	KernelPkg string   `json:"kernelpkg"`
	SysUp     bool     `json:"sysup"`
	SysUpPkg  string   `json:"sysuppkg"`
}

Update information we return to API requests

Jump to

Keyboard shortcuts

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