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
|
@ -195,10 +195,16 @@ type Actions struct {
|
|||
type Action struct {
|
||||
XMLName xml.Name `xml:"action" datastore:"-"`
|
||||
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"`
|
||||
}
|
||||
|
||||
func (m *Manifest) AddAction(event string) *Action {
|
||||
|
|
|
@ -61,6 +61,7 @@ func ExampleOmaha_NewResponse() {
|
|||
a.Sha256 = "0VAlQW3RE99SGtSB5R4m08antAHO8XDoBMKDyxQT/Mg="
|
||||
a.NeedsAdmin = false
|
||||
a.IsDelta = true
|
||||
a.DisablePayloadBackoff = true
|
||||
|
||||
if raw, err := xml.MarshalIndent(response, "", " "); err != nil {
|
||||
fmt.Println(err)
|
||||
|
@ -84,7 +85,7 @@ func ExampleOmaha_NewResponse() {
|
|||
// <package hash="+LXvjiaPkeYDLHoNKlf9qbJwvnk=" name="update.gz" size="67546213" required="true"></package>
|
||||
// </packages>
|
||||
// <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>
|
||||
// </manifest>
|
||||
// </updatecheck>
|
||||
|
|
Loading…
Reference in a new issue