Documentation ¶
Overview ¶
Package ipisp provides a wrapper to team-cymru.com's IP to ASN service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUnexpectedTokens = errors.New("Unexpected tokens while reading Cymru response.")
)
Common errors
View Source
var Timeout = time.Second * 10
Timeout is the TCP connection timeout
Functions ¶
This section is empty.
Types ¶
type ASN ¶
type ASN int
ASN represents an Autonomous Systems Number. See https://en.wikipedia.org/wiki/Autonomous_system_(Internet).
type Client ¶
type Client interface { // LookupIPs looks up IPs and returns a slice of responses the same size as the input slice of IPs // in the same order. LookupIPs([]net.IP) ([]Response, error) LookupIP(net.IP) (*Response, error) LookupASNs([]ASN) ([]Response, error) LookupASN(ASN) (*Response, error) Close() error }
Client represents an IP or ASN lookup client.
func NewDNSClient ¶
NewDNSClient returns a DNS lookup client. It is recommended to use this client for many individual lookups.
func NewWhoisClient ¶
NewWhoisClient returns a connected WHOIS client. This client should be used for bulk lookups.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.