Documentation
¶
Overview ¶
Implements the Google omaha protocol.
Omaha is a request/response protocol using XML. Requests are made by clients and responses are given by the Omaha server. http://code.google.com/p/omaha/wiki/ServerProtocol
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EventResults = map[int]string{
0: "error",
1: "success",
2: "success reboot",
3: "success restart browser",
4: "cancelled",
5: "error installer MSI",
6: "error installer other",
7: "noupdate",
8: "error installer system",
9: "update deferred",
10: "handoff error",
}
View Source
var EventTypes = map[int]string{
0: "unknown",
1: "download complete",
2: "install complete",
3: "update complete",
4: "uninstall",
5: "download started",
6: "install started",
9: "new application install started",
10: "setup started",
11: "setup finished",
12: "update application started",
13: "update download started",
14: "update download finished",
15: "update installer started",
16: "setup update begin",
17: "setup update complete",
20: "register product complete",
30: "OEM install first check",
40: "app-specific command started",
41: "app-specific command ended",
100: "setup failure",
102: "COM server failure",
103: "setup update failure",
800: "ping",
}
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct {
XMLName xml.Name `xml:"action" datastore:"-" json:"-"`
Event string `xml:"event,attr"`
// Extensions added by update_engine
ChromeOSVersion string `xml:"ChromeOSVersion,attr"`
Sha256 string `xml:"sha256,attr"`
NeedsAdmin bool `xml:"needsadmin,attr"`
IsDelta bool `xml:"IsDelta,attr"`
DisablePayloadBackoff bool `xml:"DisablePayloadBackoff,attr,omitempty"`
MetadataSignatureRsa string `xml:"MetadataSignatureRsa,attr,omitempty"`
MetadataSize string `xml:"MetadataSize,attr,omitempty"`
Deadline string `xml:"deadline,attr,omitempty"`
}
type App ¶
type App struct {
XMLName xml.Name `xml:"app" datastore"-" json:"-"`
Ping *Ping `xml:"ping"`
UpdateCheck *UpdateCheck `xml:"updatecheck"`
Events []*Event `xml:"event" json:",omitempty"`
Id string `xml:"appid,attr,omitempty"`
Version string `xml:"version,attr,omitempty"`
NextVersion string `xml:"nextversion,attr,omitempty"`
Lang string `xml:"lang,attr,omitempty"`
Client string `xml:"client,attr,omitempty"`
InstallAge string `xml:"installage,attr,omitempty"`
Status string `xml:"status,attr,omitempty"`
// update engine extensions
Track string `xml:"track,attr,omitempty"`
FromTrack string `xml:"from_track,attr,omitempty"`
// coreos update engine extensions
BootId string `xml:"bootid,attr,omitempty"`
MachineID string `xml:"machineid,attr,omitempty"`
OEM string `xml:"oem,attr,omitempty"`
}
func (*App) AddUpdateCheck ¶
func (a *App) AddUpdateCheck() *UpdateCheck
type Manifest ¶
type Os ¶
type Request ¶
type Request struct {
XMLName xml.Name `xml:"request" datastore:"-"`
Os Os `xml:"os"`
Apps []*App `xml:"app"`
Protocol string `xml:"protocol,attr"`
Version string `xml:"version,attr,omitempty"`
IsMachine string `xml:"ismachine,attr,omitempty"`
SessionId string `xml:"sessionid,attr,omitempty"`
UserId string `xml:"userid,attr,omitempty"`
InstallSource string `xml:"installsource,attr,omitempty"`
TestSource string `xml:"testsource,attr,omitempty"`
RequestId string `xml:"requestid,attr,omitempty"`
UpdaterVersion string `xml:"updaterversion,attr,omitempty"`
}
type Response ¶
type Response struct {
XMLName xml.Name `xml:"response" datastore:"-" json:"-"`
DayStart DayStart `xml:"daystart"`
Apps []*App `xml:"app"`
Protocol string `xml:"protocol,attr"`
Server string `xml:"server,attr"`
}
Response
func NewResponse ¶
type UpdateCheck ¶
type UpdateCheck struct {
XMLName xml.Name `xml:"updatecheck" datastore:"-" json:"-"`
Urls *Urls `xml:"urls"`
Manifest *Manifest `xml:"manifest"`
TargetVersionPrefix string `xml:"targetversionprefix,attr,omitempty"`
Status string `xml:"status,attr,omitempty"`
}
func (*UpdateCheck) AddManifest ¶
func (u *UpdateCheck) AddManifest(version string) *Manifest
func (*UpdateCheck) AddUrl ¶
func (u *UpdateCheck) AddUrl(codebase string) *Url
Click to show internal directories.
Click to hide internal directories.