Versions in this module Expand all Collapse all v0 v0.0.1 Apr 14, 2021 Changes in this version type AppRequest + MachineAlias string v0.0.0 Mar 27, 2018 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 EventRequest struct + ErrorCode int + 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 int + OS *OS + Protocol string + RequestID string + SessionID string + TestSource string + UpdaterVersion string + UserID string + Version string + XMLName xml.Name + func NewRequest() *Request + func ParseRequest(contentType string, body io.Reader) (*Request, error) + func (r *Request) AddApp(id, version string) *AppRequest + func (r *Request) GetApp(id string) *AppRequest + type Response struct + Apps []*AppResponse + DayStart DayStart + Protocol string + Server string + XMLName xml.Name + func NewResponse() *Response + func ParseResponse(contentType string, body io.Reader) (*Response, error) + func (r *Response) AddApp(id string, status AppStatus) *AppResponse + func (r *Response) GetApp(id string) *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 TrivialServer struct + func NewTrivialServer(addr string) (*TrivialServer, error) + func (ts *TrivialServer) AddPackage(file, name string) error + func (ts *TrivialServer) SetVersion(version string) + 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)