Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultIPKeyMap map[string]string = map[string]string{
"inet6num": "inetnum",
"NetName": "netname",
"route": "route/id",
"route6": "route/id",
"origin": "asn",
"mnt-irt": "mnt_irt",
"irt": "irt/id",
"nic-hdl": "person+role/id",
"person": "name",
"role": "name",
"organization": "org/id",
"org-name": "name",
"mntner": "mntner/id",
"admin-c": "admin",
"tech-c": "tech",
"mnt-by": "mnt_by",
"mnt-lower": "mnt_lower",
"mnt-routes": "mnt_routes",
"abuse-mailbox": "abuse_mailbox",
"e-mail": "email",
"fax-no": "fax",
"irt-nfy": "notified_email",
"notify": "notified_email",
"last-modified": "updated_date",
"NetRange": "inetnum",
"CIDR": "range/cidr",
"OriginAS": "asn",
"Comment": "descr",
"OrgId": "org/id",
"OrgName": "name",
"Updated": "updated_date",
"Address": "address",
"Country": "country",
"Ref": "ref",
"OrgTechHandle": "org-tech/id",
"OrgTechName": "name",
"OrgTechPhone": "phone",
"OrgTechEmail": "email",
"OrgTechRef": "ref",
"OrgAbuseHandle": "org-abuse/id",
"OrgAbuseName": "name",
"OrgAbusePhone": "phone",
"OrgAbuseEmail": "email",
"OrgAbuseRef": "ref",
"OrgDNSHandle": "org-dns/id",
"OrgDNSName": "name",
"OrgDNSPhone": "phone",
"OrgDNSEmail": "email",
"OrgDNSRef": "ref",
"owner": "org",
"aut-num": "asn",
"inetnum-up": "parent",
}
Functions ¶
func WhoisNotFound ¶
WhoisNotFound check keywords in rawtext
Types ¶
type Contact ¶
type Contact struct {
ID string `json:"id,omitempty"` // primary key
Type string `json:"type,omitempty"`
Name string `json:"name,omitempty"`
Address []string `json:"address,omitempty"`
Country string `json:"country,omitempty"`
Phone []string `json:"phone,omitempty"`
Fax []string `json:"fax,omitempty"`
Email []string `json:"email,omitempty"`
Description []string `json:"descr,omitempty"`
Remarks []string `json:"remarks,omitempty"`
ContactAdmin []string `json:"admin,omitempty"` // admin-c, for troubleshooting
ContactTech []string `json:"tech,omitempty"` // tech-c, for troubleshooting
ContactOwner []string `json:"owner,omitempty"` // owner-c
ContactRouting []string `json:"routing,omitempty"` // routing-c
ContactAbuse []string `json:"abuse,omitempty"` // abuse-c
NotifiedEmail []string `json:"notified_email,omitempty"`
AbuseMailbox []string `json:"abuse_mailbox,omitempty"`
MntBy []string `json:"mnt_by,omitempty"`
MntLower string `json:"mnt_lower,omitempty"`
MntRoutes string `json:"mnt_routes,omitempty"`
Ref []string `json:"ref,omitempty"`
Auth []string `json:"auth,omitempty"`
UpdatedDate string `json:"updated_date,omitempty"`
UpdatedDateRaw string `json:"-"`
Source string `json:"source,omitempty"`
}
Contact store from all kinds of contact object, includes
* Person from https://www.apnic.net/manage-ip/using-whois/guide/person/ * Orgnization from https://www.apnic.net/manage-ip/using-whois/guide/organization/ * Irt from https://www.apnic.net/manage-ip/using-whois/guide/irt/ * ...
type IParser ¶
type IParser interface {
Do(string, ...map[string]string) (*ParsedWhois, error)
}
IParser is used to parse whois information when input is ip
type Network ¶
type Network struct {
Inetnum string `json:"inetnum,omitempty"`
Range *Range `json:"range,omitempty"`
Org string `json:"org,omitempty"`
Netname string `json:"netname,omitempty"`
MntIrt string `json:"mnt_irt,omitempty"`
OriginAS string `json:"asn,omitempty"` // Origin As Network
Parent string `json:"parent,omitempty"`
Contact
}
Network records (NETs) define a range of IPv4 or IPv6 addresses and show the organizations and POCs with authority over them. To reposrt networtk abuse, contact mnt-irt
type ParsedWhois ¶
type Range ¶
type Range struct {
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
CIDR []string `json:"cidr,omitempty"`
}
Range parse result from Inetnum
type Whois ¶
type Whois struct {
ParsedWhois *ParsedWhois `json:"parsed_whois"`
WhoisServer string `json:"whois_server,omitempty"` // whois server which response the rawtext, OrgId
RawText string `json:"rawtext,omitempty"`
}
func NewWhois ¶
func NewWhois(parsedWhois *ParsedWhois, rawtext, whoisServer string) *Whois
Click to show internal directories.
Click to hide internal directories.