Documentation ¶
Overview ¶
Package response encapsulates structures used to marshal JSON responses to client requests.
Index ¶
- type Ping
- func (ping *Ping) ReadJSONFrom(r io.Reader) (n int64, err error)
- func (ping *Ping) ReadXMLFrom(r io.Reader) (n int64, err error)
- func (ping *Ping) WriteCLITo(w io.Writer) error
- func (ping *Ping) WriteJSONTo(w io.Writer) (n int64, err error)
- func (ping *Ping) WriteXMLTo(w io.Writer) (n int64, err error)
- type ProbeResult
- type ProbeResultsSummary
- type RPCError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ping ¶
type Ping struct { XMLName xml.Name `xml:"ping-results,omitempty" json:"-"` TargetHost string `xml:"target-host,omitempty" json:"target-host,omitempty"` TargetIP string `xml:"target-ip,omitempty" json:"target-ip,omitempty"` PacketSize uint `xml:"packet-size,omitempty" json:"packet-size,omitempty"` ProbeResult []ProbeResult `xml:"probe-result,omitempty" json:"probe-result,omitempty"` ProbeResultsSummary ProbeResultsSummary `xml:"probe-results-summary,omitempty" json:"probe-results-summary,omitempty"` Errors []RPCError `xml:"rpc-error,omitempty" json:"rpc-error,omitempty"` OriginHost string `json:"originhost,omitempty"` OriginIP string `json:"originip,omitempty"` }
Represents the trace route XML structure, and is used to convert it from XML to JSON.
type ProbeResult ¶
type ProbeResult struct { DateDetermined uint `xml:"date-determined,attr,omitempty" json:"date-determined,omitempty"` ProbeIndex uint `xml:"probe-index,omitempty" json:"probe-index,omitempty"` ProbeSuccess *string `xml:"probe-success,omitempty" json:"probe-success,omitempty"` ProbeFailure *string `xml:"probe-failure,omitempty" json:"probe-failure,omitempty"` SequenceNumber uint `xml:"sequence-number,omitempty" json:"sequence-number,omitempty"` IPAddress string `xml:"ip-address,omitempty" json:"ip-address,omitempty"` TimeToLive uint `xml:"time-to-live,omitempty" json:"time-to-live,omitempty"` ResponseSize uint `xml:"response-size,omitempty" json:"response-size,omitempty"` ProbeReached string `xml:"probe-reached,omitempty" json:"probe-reached,omitempty"` RTT uint `xml:"rtt,omitempty" json:"rtt,omitempty"` }
type ProbeResultsSummary ¶
type ProbeResultsSummary struct { ProbesSent uint `xml:"probes-sent,omitempty" json:"probes-sent,omitempty"` ResponsesReceived uint `xml:"responses-received,omitempty" json:"responses-received,omitempty"` PacketLoss uint `xml:"packet-loss,omitempty" json:"packet-loss,omitempty"` RTTMinimum uint `xml:"rtt-minimum,omitempty" json:"rtt-minimum,omitempty"` RTTMaximum uint `xml:"rtt-maximum,omitempty" json:"rtt-maximum,omitempty"` RTTAverage uint `xml:"rtt-average,omitempty" json:"rtt-average,omitempty"` RTTStdDev uint `xml:"rtt-stddev,omitempty" json:"rtt-stddev,omitempty"` }
type RPCError ¶
type RPCError struct { Type string `xml:"error-type" json:"error-type"` Tag string `xml:"error-tag" json:"error-tag"` Severity string `xml:"error-severity" json:"error-severity"` Path string `xml:"error-path" json:"error-path"` Message string `xml:"error-message" json:"error-message"` Info string `xml:",innerxml" json:",string` }
Click to show internal directories.
Click to hide internal directories.