Documentation ¶
Overview ¶
Package response encapsulates structures used to marshal JSON responses to client requests.
Index ¶
- type Hop
- type ICMPCode
- type ICMPType
- type ProbeResult
- type RPCError
- type TraceRoute
- func (traceRoute *TraceRoute) ReadJSONFrom(r io.Reader) (n int64, err error)
- func (traceRoute *TraceRoute) ReadXMLFrom(r io.Reader) (n int64, err error)
- func (traceRoute *TraceRoute) WriteCLITo(w io.Writer) error
- func (traceRoute *TraceRoute) WriteJSONTo(w io.Writer) (n int64, err error)
- func (traceRoute *TraceRoute) WriteXMLTo(w io.Writer) (n int64, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hop ¶
type Hop struct { TTLValue uint `xml:"ttl-value,omitempty" json:"ttl-value,omitempty"` LastIPAddr string `xml:"last-ip-address,omitempty" json:"last-ip-address,omitempty"` LastHostName string `xml:"last-host-name,omitempty" json:"last-host-name,omitempty"` ProbeResult []ProbeResult `xml:"probe-result,omitempty" json:"probe-result,omitempty"` }
func (*Hop) TrimmedLastHostName ¶
type ICMPCode ¶
type ICMPCode struct { IntegerCodeValue uint `xml:"integer-code-value,omitempty" json:"integer-code-value,omitempty"` ICMPTimxceed string `xml:"icmp-timxceed-intrans,omitempty" json:"icmp-timxceed-intrans,omitempty"` ICMPUnreachPort string `xml:"icmp-unreach-port,omitempty" json:"icmp-unreach-port,omitempty"` }
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"` IPAddress string `xml:"ip-address,omitempty" json:"ip-address,omitempty"` HostName string `xml:"host-name,omitempty" json:"host-name,omitempty"` ProbeSuccess *string `xml:"probe-success,omitempty" json:"probe-success,omitempty"` ProbeFailure *string `xml:"probe-failure,omitempty" json:"probe-failure,omitempty"` ProbeReached string `xml:"probe-reached,omitempty" json:"probe-reached,omitempty"` RTT uint `xml:"rtt,omitempty" json:"rtt,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` }
type TraceRoute ¶
type TraceRoute struct { XMLName xml.Name `xml:"traceroute-results,omitempty" json:"-"` TargetHost string `xml:"target-host,omitempty" json:"target-host,omitempty"` TargetIP string `xml:"target-ip,omitempty" json:"target-ip,omitempty"` MaxHopIndex uint `xml:"max-hop-index,omitempty" json:"max-hop-index,omitempty"` PacketSize uint `xml:"packet-size,omitempty" json:"packet-size,omitempty"` Hops []Hop `xml:"hop,omitempty" json:"hop,omitempty"` Errors []RPCError `xml:"rpc-error,omitempty" json:"rpc-error,omitempty"` TraceRouteFailure string `xml:"traceroute-failure,omitempty" json:"traceroute-failure,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.
func (*TraceRoute) ReadJSONFrom ¶
func (traceRoute *TraceRoute) ReadJSONFrom(r io.Reader) (n int64, err error)
func (*TraceRoute) ReadXMLFrom ¶
func (traceRoute *TraceRoute) ReadXMLFrom(r io.Reader) (n int64, err error)
func (*TraceRoute) WriteCLITo ¶
func (traceRoute *TraceRoute) WriteCLITo(w io.Writer) error
func (*TraceRoute) WriteJSONTo ¶
func (traceRoute *TraceRoute) WriteJSONTo(w io.Writer) (n int64, err error)
func (*TraceRoute) WriteXMLTo ¶
func (traceRoute *TraceRoute) WriteXMLTo(w io.Writer) (n int64, err error)
Click to show internal directories.
Click to hide internal directories.