peeringdb

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2016 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// APINetIXLAN holds net ix lan API
	APINetIXLAN = "https://www.peeringdb.com/api/netixlan"
	// APINet holds net API
	APINet = "https://www.peeringdb.com/api/net"
)

Variables

This section is empty.

Functions

func GetNet added in v0.1.9

func GetNet() (interface{}, error)

GetNet fetchs net information from peeringdb

func GetNetIXLAN added in v0.1.9

func GetNetIXLAN() (interface{}, error)

GetNetIXLAN fetchs netixlan data from peeringdb

func IsASN added in v0.1.9

func IsASN(key string) bool

IsASN checks if the key is number

func Search(key string)

Search find a key through the records

Types

type Net added in v0.1.7

type Net struct {
	Name     string `json:"name"`
	ASN      int    `json:"asn"`
	WWW      string `json:"website"`
	Traffic  string `json:"info_traffic"`
	InfoType string `json:"info_type"`
	Note     string `json:"notes"`
}

A Net represents peeringdb net record

type Nets added in v0.1.7

type Nets struct {
	Data []Net `json:"data"`
}

Nets represents network information data

type Peer

type Peer struct {
	Name    string `json:"name"`
	ASN     int    `json:"asn"`
	Status  string `json:"status"`
	Speed   int    `json:"speed"`
	IPAddr4 string `json:"ipaddr4"`
	IPAddr6 string `json:"ipaddr6"`
}

A Peer represents peeringdb record

type Peers

type Peers struct {
	Data []Peer `json:"data"`
}

Peers represents peeringdb records

Jump to

Keyboard shortcuts

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