-
Notifications
You must be signed in to change notification settings - Fork 2
/
types.go
63 lines (58 loc) · 2.09 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package bgpview
type Asn struct {
AbuseContacts []string `json:"abuse_contacts"`
Asn int `json:"asn"`
CountryCode string `json:"country_code"`
Description string `json:"description"`
EmailContacts []string `json:"email_contacts"`
Name string `json:"name"`
RirName string `json:"rir_name"`
}
type IPv4Prefix struct {
AbuseContacts []string `json:"abuse_contacts"`
Cidr int `json:"cidr"`
CountryCode string `json:"country_code"`
Description string `json:"description"`
EmailContacts []string `json:"email_contacts"`
IP string `json:"ip"`
Name string `json:"name"`
ParentCidr int `json:"parent_cidr"`
ParentIP string `json:"parent_ip"`
ParentPrefix string `json:"parent_prefix"`
Prefix string `json:"prefix"`
RirName string `json:"rir_name"`
}
type IPv6Prefix struct {
AbuseContacts []string `json:"abuse_contacts"`
Cidr int `json:"cidr"`
CountryCode string `json:"country_code"`
Description string `json:"description"`
EmailContacts []string `json:"email_contacts"`
IP string `json:"ip"`
Name string `json:"name"`
ParentCidr int `json:"parent_cidr"`
ParentIP string `json:"parent_ip"`
ParentPrefix string `json:"parent_prefix"`
Prefix string `json:"prefix"`
RirName string `json:"rir_name"`
}
// SearchResults contains search results
type SearchResults struct {
Data struct {
Asns []Asn `json:"asns"`
InternetExchanges []interface{} `json:"internet_exchanges"`
Ipv4Prefixes []IPv4Prefix `json:"ipv4_prefixes"`
IPv6Prefixes []IPv6Prefix `json:"ipv6_prefixes"`
} `json:"data"`
Status string `json:"status"`
StatusMessage string `json:"status_message"`
}
// ASNPrefixResults contains prefix search results
type ASNPrefixResults struct {
Data struct {
IPv4Prefixes []IPv4Prefix `json:"ipv4_prefixes"`
IPv6Prefixes []IPv6Prefix `json:"ipv6_prefixes"`
} `json:"data"`
Status string `json:"status"`
StatusMessage string `json:"status_message"`
}