ripe

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2016 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package ripe provides ASN and IP information

Index

Constants

View Source
const (
	// RIPEAPI holds RIPE API URL
	RIPEAPI = "https://stat.ripe.net"
	// RIPEPrefixURL holds RIPE prefix path
	RIPEPrefixURL = "/data/prefix-overview/data.json?max_related=50&resource="
	// RIPEASNURL holds RIPE ASN path
	RIPEASNURL = "/data/as-overview/data.json?resource=AS"
	// RIPEGeoURL holds Geo path
	RIPEGeoURL = "/data/geoloc/data.json?resource=AS"
)

Variables

This section is empty.

Functions

func IsASN added in v0.1.7

func IsASN(key string) bool

IsASN checks if the key is a number

func IsIP added in v0.1.9

func IsIP(key string) bool

IsIP return true if key is IPv4/6

func IsPrefix added in v0.1.9

func IsPrefix(key string) bool

IsPrefix evaluates IPv(4/6) CIDR

Types

type ASN

type ASN struct {
	Number  string
	Data    map[string]interface{}
	GeoData map[string]interface{}
}

ASN represents ASN information

func (*ASN) GetData

func (a *ASN) GetData() bool

GetData gets ASN information from RIPE NCC

func (*ASN) GetGeoData added in v0.1.8

func (a *ASN) GetGeoData() bool

GetGeoData gets Geo information from RIPE NCC

func (*ASN) GetOVData added in v0.1.8

func (a *ASN) GetOVData() bool

GetOVData gets ASN overview information from RIPE NCC

func (*ASN) PrettyPrint

func (a *ASN) PrettyPrint()

PrettyPrint print ASN information (holder)

func (*ASN) Set added in v0.1.7

func (a *ASN) Set(r string)

Set ASN

type Prefix added in v0.1.7

type Prefix struct {
	Resource string
	Data     map[string]interface{}
}

Prefix represents prefix information

func (*Prefix) GetData added in v0.1.7

func (p *Prefix) GetData() bool

GetData gets prefix information from RIPE NCC

func (*Prefix) PrettyPrint added in v0.1.7

func (p *Prefix) PrettyPrint()

PrettyPrint print ASN information (holder)

func (*Prefix) Set added in v0.1.7

func (p *Prefix) Set(r string)

Set sets the resource value

Jump to

Keyboard shortcuts

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