Versions in this module Expand all Collapse all v0 v0.9.0 Dec 2, 2018 Changes in this version + const DefaultBaseURL + const DefaultCacheTimeout + type ASNRegistry struct + func NewASNRegistry(json []byte) (*ASNRegistry, error) + func (a *ASNRegistry) File() *File + func (a *ASNRegistry) Lookup(question *Question) (*Answer, error) + type Answer struct + Entry string + Query string + URLs []*url.URL + type Client struct + BaseURL *url.URL + Cache cache.RegistryCache + HTTP *http.Client + Verbose func(text string) + func (c *Client) ASN() *ASNRegistry + func (c *Client) DNS() *DNSRegistry + func (c *Client) Download(registry RegistryType) error + func (c *Client) DownloadWithContext(ctx context.Context, registry RegistryType) error + func (c *Client) IPv4() *NetRegistry + func (c *Client) IPv6() *NetRegistry + func (c *Client) Lookup(question *Question) (*Answer, error) + func (c *Client) ServiceProvider() *ServiceProviderRegistry + type DNSRegistry struct + func NewDNSRegistry(json []byte) (*DNSRegistry, error) + func (d *DNSRegistry) File() *File + func (d *DNSRegistry) Lookup(question *Question) (*Answer, error) + type File struct + Description string + Entries map[string][]*url.URL + JSON []byte + Publication string + Version string + func NewFile(jsonDocument []byte) (*File, error) + type NetRegistry struct + func NewNetRegistry(json []byte, ipVersion int) (*NetRegistry, error) + func (n *NetRegistry) File() *File + func (n *NetRegistry) Lookup(question *Question) (*Answer, error) + type Question struct + Query string + func (q *Question) Context() context.Context + func (q *Question) WithContext(ctx context.Context) *Question + type Registry interface + File func() *File + Lookup func(question *Question) (*Answer, error) + type RegistryType int + const ASN + const DNS + const IPv4 + const IPv6 + const ServiceProvider + func (r RegistryType) Filename() string + func (r RegistryType) String() string + type ServiceProviderRegistry struct + func NewServiceProviderRegistry(json []byte) (*ServiceProviderRegistry, error) + func (s *ServiceProviderRegistry) File() *File + func (s *ServiceProviderRegistry) Lookup(question *Question) (*Answer, error)