-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.go
45 lines (40 loc) · 1.17 KB
/
types.go
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
33
34
35
36
37
38
39
40
41
42
43
44
45
package robtex
// IPQueryResponse ipquery response type.
type IPQueryResponse struct {
Status string `json:"status"`
City string `json:"city"`
Country string `json:"country"`
AS int `json:"as"`
ASName string `json:"asname"`
Whois string `json:"whoisdesc"`
Route string `json:"routedesc"`
BGPRoute string `json:"bgproute"`
ActiveForwardDNS []Item `json:"act"`
ActiveDNSHistory []Item `json:"acth"`
PassiveReverseDNS []Item `json:"pas"`
PassiveDNSHistory []Item `json:"pash"`
}
// Item IP item.
type Item struct {
O string `json:"o"`
Timestamp int `json:"t"`
}
// ASQueryResponse asquery response type.
type ASQueryResponse struct {
Status string `json:"status"`
Nets []Prefix `json:"nets"`
}
// Prefix AS prefix.
type Prefix struct {
N string `json:"n"`
InBGP int `json:"inbgp"`
}
// PassiveDNS pdns response type.
type PassiveDNS struct {
RRName string `json:"rrname"`
RRData string `json:"rrdata"`
RRType string `json:"rrtype"`
TimeFirst int `json:"time_first"`
TimeLast int `json:"time_last"`
Count int `json:"count"`
}