Merge pull request #4 from philips/update-engine-extensions
Update engine extensions
This commit is contained in:
commit
37c9cc50fb
2 changed files with 14 additions and 7 deletions
|
@ -193,12 +193,18 @@ type Actions struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type Action struct {
|
type Action struct {
|
||||||
XMLName xml.Name `xml:"action" datastore:"-"`
|
XMLName xml.Name `xml:"action" datastore:"-"`
|
||||||
Event string `xml:"event,attr"`
|
Event string `xml:"event,attr"`
|
||||||
ChromeOSVersion string `xml:"ChromeOSVersion,attr"`
|
|
||||||
Sha256 string `xml:"sha256,attr"`
|
// Extensions added by update_engine
|
||||||
NeedsAdmin bool `xml:"needsadmin,attr"`
|
ChromeOSVersion string `xml:"ChromeOSVersion,attr"`
|
||||||
IsDelta bool `xml:"IsDelta,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"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Manifest) AddAction(event string) *Action {
|
func (m *Manifest) AddAction(event string) *Action {
|
||||||
|
|
|
@ -61,6 +61,7 @@ func ExampleOmaha_NewResponse() {
|
||||||
a.Sha256 = "0VAlQW3RE99SGtSB5R4m08antAHO8XDoBMKDyxQT/Mg="
|
a.Sha256 = "0VAlQW3RE99SGtSB5R4m08antAHO8XDoBMKDyxQT/Mg="
|
||||||
a.NeedsAdmin = false
|
a.NeedsAdmin = false
|
||||||
a.IsDelta = true
|
a.IsDelta = true
|
||||||
|
a.DisablePayloadBackoff = true
|
||||||
|
|
||||||
if raw, err := xml.MarshalIndent(response, "", " "); err != nil {
|
if raw, err := xml.MarshalIndent(response, "", " "); err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
|
@ -84,7 +85,7 @@ func ExampleOmaha_NewResponse() {
|
||||||
// <package hash="+LXvjiaPkeYDLHoNKlf9qbJwvnk=" name="update.gz" size="67546213" required="true"></package>
|
// <package hash="+LXvjiaPkeYDLHoNKlf9qbJwvnk=" name="update.gz" size="67546213" required="true"></package>
|
||||||
// </packages>
|
// </packages>
|
||||||
// <actions>
|
// <actions>
|
||||||
// <action event="postinstall" ChromeOSVersion="9999.0.0" sha256="0VAlQW3RE99SGtSB5R4m08antAHO8XDoBMKDyxQT/Mg=" needsadmin="false" IsDelta="true"></action>
|
// <action event="postinstall" ChromeOSVersion="9999.0.0" sha256="0VAlQW3RE99SGtSB5R4m08antAHO8XDoBMKDyxQT/Mg=" needsadmin="false" IsDelta="true" DisablePayloadBackoff="true"></action>
|
||||||
// </actions>
|
// </actions>
|
||||||
// </manifest>
|
// </manifest>
|
||||||
// </updatecheck>
|
// </updatecheck>
|
||||||
|
|
Loading…
Reference in a new issue