speedtest

package
v0.16.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2023 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface struct {
	InternalIP string `json:"internalIp"`
	Name       string `json:"name"`
	MACAddr    string `json:"macAddr"`
	IsVPN      bool   `json:"isVpn"`
	ExternalIP string `json:"externalIp"`
}

type Load

type Load struct {
	Bandwidth uint64 `json:"bandwidth"`
	Bytes     uint64 `json:"bytes"`
	Elapsed   uint64 `json:"elapsed"`
	Latency   Ping   `json:"latency"`
}

type Ping

type Ping struct {
	Iqm     *float64 `json:"iqm,omitempty"`
	Low     float64  `json:"low"`
	High    float64  `json:"high"`
	Jitter  float64  `json:"jitter"`
	Latency *float64 `json:"latency,omitempty"`
}

type Result

type Result struct {
	Type       string      `json:"type"`
	Timestamp  string      `json:"timestamp"`
	Ping       Ping        `json:"ping"`
	Download   Load        `json:"download"`
	Upload     Load        `json:"upload"`
	PacketLoss uint64      `json:"packetLoss"`
	ISP        string      `json:"isp"`
	Interface  Interface   `json:"interface"`
	Server     Server      `json:"server"`
	Result     ResultClass `json:"result"`
}

func UnmarshalResult

func UnmarshalResult(data []byte) (Result, error)

func (*Result) Marshal

func (r *Result) Marshal() ([]byte, error)

type ResultClass

type ResultClass struct {
	ID        string `json:"id"`
	URL       string `json:"url"`
	Persisted bool   `json:"persisted"`
}

type Server

type Server struct {
	ID       uint64 `json:"id"`
	Host     string `json:"host"`
	Port     uint64 `json:"port"`
	Name     string `json:"name"`
	Location string `json:"location"`
	Country  string `json:"country"`
	IP       string `json:"ip"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL