constants.go 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. package xfer
  2. const (
  3. // AppPort is the default port that the app will use for its HTTP server.
  4. // The app publishes the API and user interface, and receives reports from
  5. // probes, on this port.
  6. AppPort = 4040
  7. // ScopeProbeIDHeader is the header we use to carry the probe's unique ID. The
  8. // ID is currently set to the a random string on probe startup.
  9. ScopeProbeIDHeader = "X-Scope-Probe-ID"
  10. // ScopeProbeVersionHeader is the header we use to carry the probe's version.
  11. ScopeProbeVersionHeader = "X-Scope-Probe-Version"
  12. )
  13. // HistoricReportsCapability indicates whether reports older than the
  14. // current time (-app.window) can be retrieved.
  15. const HistoricReportsCapability = "historic_reports"
  16. // Details are some generic details that can be fetched from /api
  17. type Details struct {
  18. ID string `json:"id"`
  19. Version string `json:"version"`
  20. Hostname string `json:"hostname"`
  21. Plugins PluginSpecs `json:"plugins,omitempty"`
  22. Capabilities map[string]bool `json:"capabilities,omitempty"`
  23. NewVersion *NewVersionInfo `json:"newVersion,omitempty"`
  24. }
  25. // NewVersionInfo is the struct exposed in /api when there is a new
  26. // version of Scope available.
  27. type NewVersionInfo struct {
  28. Version string `json:"version"`
  29. DownloadURL string `json:"downloadUrl"`
  30. }