Documentation
¶
Index ¶
Constants ¶
View Source
const Version = `v1.1.1`
Version is the current Version of asnmap
Variables ¶
View Source
var ( PDCPApiKey = env.GetEnvOrDefault("PDCP_API_KEY", "") ErrUnAuthorized = errors.New("unauthorized: 401 (get free api key to configure from https://cloud.projectdiscovery.io/?ref=api_key)") )
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
var DefaultClient *Client
func (Client) GetDataWithCustomInput ¶ added in v1.0.3
type Response ¶
type Response struct {
FirstIp string `json:"first_ip,omitempty"`
LastIp string `json:"last_ip,omitempty"`
Input string `json:"-"` // added by client
ASN int `json:"asn,omitempty"`
Country string `json:"country,omitempty"`
Org string `json:"org,omitempty"`
}
To model http response from server
type Result ¶
type Result struct {
Timestamp string `json:"timestamp,omitempty" csv:"timestamp"`
Input string `json:"input" csv:"input"`
ASN string `json:"as_number" csv:"as_number"`
ASN_org string `json:"as_name" csv:"as_name"`
AS_country string `json:"as_country" csv:"as_country"`
AS_range []string `json:"as_range" csv:"as_range"`
}
func MapToResults ¶ added in v1.1.0
Click to show internal directories.
Click to hide internal directories.