Documentation
¶
Index ¶
- func DeobfuscateULID(obfuscated string) (string, error)
- func DrawPNG(w http.ResponseWriter, r *http.Request)
- func Initialize(c *config.Config)
- func JSONResult(w http.ResponseWriter, r *http.Request)
- func ObfuscateULID(id string) string
- func Record(w http.ResponseWriter, r *http.Request)
- func ResolveID(id string) string
- func Stats(w http.ResponseWriter, r *http.Request)
- type IPInfoResponse
- type JSONResponse
- type Result
- type StatsData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeobfuscateULID ¶
DeobfuscateULID reverses ULID obfuscation
func Initialize ¶
func JSONResult ¶
func JSONResult(w http.ResponseWriter, r *http.Request)
JSONResult handles GET /results/json?id=X and returns test results as JSON
func ObfuscateULID ¶
ObfuscateULID transforms a ULID string to its obfuscated (base64) form
Types ¶
type IPInfoResponse ¶
type IPInfoResponse struct {
IP string `json:"ip"`
Hostname string `json:"hostname"`
City string `json:"city"`
Region string `json:"region"`
Country string `json:"country"`
Location string `json:"loc"`
Organization string `json:"org"`
Postal string `json:"postal"`
Timezone string `json:"timezone"`
Readme string `json:"readme"`
}
type JSONResponse ¶
type JSONResponse struct {
Timestamp string `json:"timestamp"`
Download string `json:"download"`
Upload string `json:"upload"`
Ping string `json:"ping"`
Jitter string `json:"jitter"`
ISPInfo string `json:"ispinfo"`
}
JSONResponse is the structure returned by the JSON results endpoint
type Result ¶
type Result struct {
ProcessedString string `json:"processedString"`
RawISPInfo IPInfoResponse `json:"rawIspInfo"`
}
Click to show internal directories.
Click to hide internal directories.