bgpview

package
v0.0.0-...-f9b4428 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LookupIP

func LookupIP(asn string) ([]string, error)

LookupIP retrieves the IPs associated with the provided ASN

func Search(term string) ([]string, error)

Search retrieves the ASNs associated with the provided search term

Types

type ASNPrefixResults

type ASNPrefixResults struct {
	Data struct {
		IPv4Prefixes []IPv4Prefix `json:"ipv4_prefixes"`
		IPv6Prefixes []IPv6Prefix `json:"ipv6_prefixes"`
	} `json:"data"`
	Status        string `json:"status"`
	StatusMessage string `json:"status_message"`
}

ASNPrefixResults contains prefix search results

type Asn

type Asn struct {
	AbuseContacts []string `json:"abuse_contacts"`
	Asn           int      `json:"asn"`
	CountryCode   string   `json:"country_code"`
	Description   string   `json:"description"`
	EmailContacts []string `json:"email_contacts"`
	Name          string   `json:"name"`
	RirName       string   `json:"rir_name"`
}

type IPv4Prefix

type IPv4Prefix struct {
	AbuseContacts []string `json:"abuse_contacts"`
	Cidr          int      `json:"cidr"`
	CountryCode   string   `json:"country_code"`
	Description   string   `json:"description"`
	EmailContacts []string `json:"email_contacts"`
	IP            string   `json:"ip"`
	Name          string   `json:"name"`
	ParentCidr    int      `json:"parent_cidr"`
	ParentIP      string   `json:"parent_ip"`
	ParentPrefix  string   `json:"parent_prefix"`
	Prefix        string   `json:"prefix"`
	RirName       string   `json:"rir_name"`
}

type IPv6Prefix

type IPv6Prefix struct {
	AbuseContacts []string `json:"abuse_contacts"`
	Cidr          int      `json:"cidr"`
	CountryCode   string   `json:"country_code"`
	Description   string   `json:"description"`
	EmailContacts []string `json:"email_contacts"`
	IP            string   `json:"ip"`
	Name          string   `json:"name"`
	ParentCidr    int      `json:"parent_cidr"`
	ParentIP      string   `json:"parent_ip"`
	ParentPrefix  string   `json:"parent_prefix"`
	Prefix        string   `json:"prefix"`
	RirName       string   `json:"rir_name"`
}

type SearchResults

type SearchResults struct {
	Data struct {
		Asns              []Asn         `json:"asns"`
		InternetExchanges []interface{} `json:"internet_exchanges"`
		Ipv4Prefixes      []IPv4Prefix  `json:"ipv4_prefixes"`
		IPv6Prefixes      []IPv6Prefix  `json:"ipv6_prefixes"`
	} `json:"data"`
	Status        string `json:"status"`
	StatusMessage string `json:"status_message"`
}

SearchResults contains search results

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL