Documentation
¶
Overview ¶
Package robtex a simple Robtex API client. https://www.robtex.com/api/
Index ¶
- Constants
- type ASQueryResponse
- type Client
- func (c Client) ASQuery(ctx context.Context, number string) (*ASQueryResponse, error)
- func (c Client) IPQuery(ctx context.Context, ip string) (*IPQueryResponse, error)
- func (c Client) PassiveDNSForward(ctx context.Context, domain string) ([]PassiveDNS, error)
- func (c Client) PassiveDNSReverse(ctx context.Context, ip string) ([]PassiveDNS, error)
- type IPQueryResponse
- type Item
- type PassiveDNS
- type Prefix
Constants ¶
const ( FreeAPIBaseURL = "https://freeapi.robtex.com" ProAPIBaseURL = "https://proapi.robtex.com" )
API endpoints.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ASQueryResponse ¶
ASQueryResponse asquery response type.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client a Robtex API client.
func (Client) ASQuery ¶
ASQuery Returns an array of networks related to a specific AS number. Currently, only returns networks actually in global bgp table, but plans are to extend it. ex: https://freeapi.robtex.com/asquery/1234
func (Client) IPQuery ¶
IPQuery This API returns the current forward and reverse of an IP number, together with GEO-location data and network data. The format returned is JSON. Most keys are self-explanatory. ex: https://freeapi.robtex.com/ipquery/199.19.54.1
func (Client) PassiveDNSForward ¶
PassiveDNSForward This API returns ldjson format, that is one JSON object per line. The format used is Passive DNS - Common Output Format (https://tools.ietf.org/html/draft-dulaunoy-dnsop-passive-dns-cof-03). ex: https://freeapi.robtex.com/pdns/forward/a.iana-servers.net
func (Client) PassiveDNSReverse ¶
PassiveDNSReverse This API returns ldjson format, that is one JSON object per line. The format used is Passive DNS - Common Output Format (https://tools.ietf.org/html/draft-dulaunoy-dnsop-passive-dns-cof-03). ex: https://freeapi.robtex.com/pdns/reverse/199.43.132.53
type IPQueryResponse ¶
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"`
}
IPQueryResponse ipquery response type.