query

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: BSD-3-Clause-Clear Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ASNPrefixes

type ASNPrefixes struct {
	IPv4 []string
	IPv6 []string
}

ASNPrefixes is a set of IPv4 & IPv6 post-parsed & sorted addresses.

func GetASNPrefixes

func GetASNPrefixes(asn string) (*ASNPrefixes, error)

GetASNPrefixes gets all announced prefixes of a given ASN.

type AsnDetail

type AsnDetail struct {
	ASN          int64
	Org          string
	Country      string
	LookingGlass string
	Website      string
}

AsnDetail describes details of an ASN.

func GetASNDetail

func GetASNDetail(asn string) (*AsnDetail, error)

GetASNDetail gets the details of an ASN.

type IPDetail

type IPDetail struct {
	RIR    string
	IP     string
	PTR    string
	ASN    int64
	Prefix string
	Org    string
	Name   string
}

IPDetail describes details of an IP address.

func GetIPDetail

func GetIPDetail(ip string) (*IPDetail, error)

GetIPDetail gets details of an IP address.

type PrefixDetail

type PrefixDetail struct {
	Org     string
	Origins []PrefixOrigin
	Name    string
	Prefix  string
	RIR     string
}

PrefixDetail describes details of a prefix.

func GetPrefixDetail

func GetPrefixDetail(pfx string) (*PrefixDetail, error)

GetPrefixDetail gets the details of a prefix.

type PrefixOrigin

type PrefixOrigin struct {
	ASN  int64
	Org  string
	Name string
}

PrefixOrigin describes a prefix origin AS & details.

Jump to

Keyboard shortcuts

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