Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BGPRoute ¶
type BGPRoute struct { // Prefix is used to define the prefix of the BGP route. Prefix *string `json:"prefix"` // AsPath is set when the route has an AS path. AsPath []int `json:"as_path"` // LocalPref is set when the route has a local preference. LocalPref *int `json:"local_pref"` // NextHop is set when the route has a next hop. NextHop *string `json:"next_hop"` // Community is used to define a BGP community. Community []string `json:"community"` // LargeCommunity is used to define a large BGP community. LargeCommunity []string `json:"large_community"` }
BGPRoute is used to define a route in BGP.
type BGPRouteSlice ¶
type BGPRouteSlice []*BGPRoute
BGPRouteSlice is used to define a slice of BGP routes that implements sort.Interface.
func (BGPRouteSlice) Less ¶
func (v BGPRouteSlice) Less(i, j int) bool
Less implements sort.Interface.
type PingErrorMessage ¶
type PingErrorMessage struct { // IsTimeout is used to define if the error is a timeout. IsTimeout bool `json:"is_timeout"` // Message is used to define the error message. Message string `json:"message"` }
PingErrorMessage is used to define the error message.
type PingResponse ¶
type PingResponse struct { // Error is not nil if there was an error. Error *PingErrorMessage `json:"error,omitempty"` // IPAddress is used to define the IP address of the host. IPAddress string `json:"ip_address"` // Hostname is used to define the hostname. If it is nil, it means the rDNS lookup is not available. Hostname *string `json:"hostname"` // Latency is the time the round-trip in milliseconds. Latency *float64 `json:"latency,omitempty"` }
PingResponse is used to define an item in the ping response.
type TraceItem ¶
type TraceItem struct { // Pings is used to define the latency of all pings sent. Pings [3]*float64 `json:"pings"` // RDNS is used to define the RDNS of the host if valid. RDNS *string `json:"rdns"` // IPAddress is used to define the IP address of the host. IPAddress string `json:"ip_address"` }
TraceItem is used to define an item within the traceroute slice.
type TraceResponse ¶
type TraceResponse struct { // Traceroute is used to define the traceroute slice. Traceroute []*TraceItem `json:"traceroute"` // DestinationIP is used to define the destination IP address. DestinationIP string `json:"destination_ip"` }
TraceResponse is used to define the response of the traceroute API.
Click to show internal directories.
Click to hide internal directories.