Versions in this module Expand all Collapse all v0 v0.5.0 Apr 19, 2017 Changes in this version type TrivialServer + func (ts *TrivialServer) AddPackage(file, name string) error v0.4.0 Apr 4, 2017 v0.3.2 Mar 2, 2017 v0.3.1 Mar 1, 2017 v0.3.0 Mar 1, 2017 v0.2.1 Sep 29, 2016 v0.2.0 Sep 16, 2016 Changes in this version + type TrivialServer struct + func NewTrivialServer(addr string) (*TrivialServer, error) + func (ts *TrivialServer) SetPackage(path string) error v0.1.5 May 18, 2016 v0.1.4 May 16, 2016 v0.1.3 May 11, 2016 v0.1.2 May 9, 2016 v0.1.1 Apr 27, 2016 v0.1.0 Apr 22, 2016 v0.0.10 Feb 17, 2016 v0.0.9 Feb 2, 2016 Changes in this version + var PackageHashMismatchError = errors.New("package hash is invalid") + var PackageSizeMismatchError = errors.New("package size is invalid") + func LocalArch() string + func LocalPlatform() string + type Action struct + Deadline string + DisablePayloadBackoff bool + DisplayVersion string + Event string + IsDeltaPayload bool + MaxFailureCountPerURL uint + MetadataSignatureRsa string + MetadataSize string + MoreInfo string + NeedsAdmin bool + Prompt bool + Sha256 string + type AppRequest struct + AlephVersion string + Board string + BootId string + Client string + DeltaOK bool + Events []*EventRequest + FromTrack string + Id string + InstallAge string + Lang string + MachineID string + NextVersion string + OEM string + OEMVersion string + Ping *PingRequest + Track string + UpdateCheck *UpdateRequest + Version string + func (a *AppRequest) AddEvent() *EventRequest + func (a *AppRequest) AddPing() *PingRequest + func (a *AppRequest) AddUpdateCheck() *UpdateRequest + type AppResponse struct + Events []*EventResponse + Id string + Ping *PingResponse + Status AppStatus + UpdateCheck *UpdateResponse + func (a *AppResponse) AddEvent() *EventResponse + func (a *AppResponse) AddPing() *PingResponse + func (a *AppResponse) AddUpdateCheck(status UpdateStatus) *UpdateResponse + type AppStatus string + const AppInternalError + const AppInvalidId + const AppInvalidVersion + const AppOK + const AppRestricted + const AppUnknownId + func (a AppStatus) Error() string + type DayStart struct + ElapsedSeconds string + type Event struct + ErrorCode string + PreviousVersion string + Result EventResult + Status string + Type EventType + type EventRequest struct + ErrorCode string + NextVersion string + PreviousVersion string + Result EventResult + Type EventType + type EventResponse struct + Status string + type EventResult int + const EventResultCancelled + const EventResultError + const EventResultErrorInstallerMSI + const EventResultErrorInstallerOther + const EventResultHandoffError + const EventResultInstallerSystem + const EventResultNoUpdate + const EventResultSuccess + const EventResultSuccessReboot + const EventResultSuccessRestartBrowser + const EventResultUpdateDeferred + func (e EventResult) String() string + type EventType int + const EventTypeAppSpecificCommandEnded + const EventTypeAppSpecificCommandStarted + const EventTypeComServerFailure + const EventTypeDownloadComplete + const EventTypeDownloadStarted + const EventTypeInstallComplete + const EventTypeInstallStarted + const EventTypeNewApplicationInstallStarted + const EventTypeOEMInstallFirstCheck + const EventTypeRegisterProductComplete + const EventTypeSetupFailure + const EventTypeSetupFinished + const EventTypeSetupStarted + const EventTypeSetupUpdateBegin + const EventTypeSetupUpdateComplete + const EventTypeSetupUpdateFailure + const EventTypeUninstall + const EventTypeUnknown + const EventTypeUpdateApplicationStarted + const EventTypeUpdateComplete + const EventTypeUpdateDownloadFinished + const EventTypeUpdateDownloadStarted + const EventTypeUpdateInstallerStarted + func (e EventType) String() string + type Manifest struct + Actions []*Action + Packages []*Package + Version string + func (m *Manifest) AddAction(event string) *Action + func (m *Manifest) AddPackage() *Package + func (m *Manifest) AddPackageFromPath(path string) (*Package, error) + type OS struct + Arch string + Platform string + ServicePack string + Version string + type OmahaHandler struct + func (o *OmahaHandler) ServeHTTP(w http.ResponseWriter, httpReq *http.Request) + type Package struct + Name string + Required bool + Sha1 string + Sha256 string + Size uint64 + func (p *Package) FromPath(name string) error + func (p *Package) FromReader(r io.Reader) error + func (p *Package) Verify(dir string) error + func (p *Package) VerifyReader(r io.Reader) error + type PingRequest struct + Active int + LastActiveReportDays int + LastReportDays int + type PingResponse struct + Status string + type Request struct + Apps []*AppRequest + InstallSource string + IsMachine string + OS *OS + Protocol string + RequestId string + SessionId string + TestSource string + UpdaterVersion string + UserId string + Version string + XMLName xml.Name + func NewRequest() *Request + func (r *Request) AddApp(id, version string) *AppRequest + type Response struct + Apps []*AppResponse + DayStart DayStart + Protocol string + Server string + XMLName xml.Name + func NewResponse() *Response + func (r *Response) AddApp(id string, status AppStatus) *AppResponse + type Server struct + Mux *http.ServeMux + func NewServer(addr string, updater Updater) (*Server, error) + func (s *Server) Addr() net.Addr + func (s *Server) Destroy() error + func (s *Server) Serve() error + type URL struct + CodeBase string + type Update struct + Id string + PreviousVersion string + RespectDeltaOK bool + URL URL + XMLName xml.Name + func (u *Update) URLs(prefixes []string) []*URL + type UpdateRequest struct + TargetVersionPrefix string + type UpdateResponse struct + Manifest *Manifest + Status UpdateStatus + URLs []*URL + func (u *UpdateResponse) AddManifest(version string) *Manifest + func (u *UpdateResponse) AddURL(codebase string) *URL + type UpdateStatus string + const NoUpdate + const UpdateHashError + const UpdateInternalError + const UpdateOK + const UpdateOSNotSupported + const UpdatePluginRestrictedHost + const UpdateUnsupportedProtocol + func (u UpdateStatus) Error() string + type Updater interface + CheckApp func(req *Request, app *AppRequest) error + CheckUpdate func(req *Request, app *AppRequest) (*Update, error) + Event func(req *Request, app *AppRequest, event *EventRequest) + Ping func(req *Request, app *AppRequest) + type UpdaterStub struct + func (u UpdaterStub) CheckApp(req *Request, app *AppRequest) error + func (u UpdaterStub) CheckUpdate(req *Request, app *AppRequest) (*Update, error) + func (u UpdaterStub) Event(req *Request, app *AppRequest, event *EventRequest) + func (u UpdaterStub) Ping(req *Request, app *AppRequest)