1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
package report
import (
"time"
"github.com/librespeed/speedtest-cli/defs"
)
// JSONReport represents the output data fields in a JSON file
type JSONReport struct {
Timestamp time.Time `json:"timestamp"`
Server Server `json:"server"`
Client Client `json:"client"`
BytesSent uint64 `json:"bytes_sent"`
BytesReceived uint64 `json:"bytes_received"`
Ping float64 `json:"ping"`
Jitter float64 `json:"jitter"`
Upload float64 `json:"upload"`
Download float64 `json:"download"`
Share string `json:"share"`
}
// Server represents the speed test server's information
type Server struct {
Name string `json:"name"`
URL string `json:"url"`
}
// Client represents the speed test client's information
type Client struct {
defs.IPInfoResponse
}
|