Documentation ¶
Index ¶
- Constants
- func ConvertAbuseContactsData(data []byte) ([]string, error)
- type ASBlock
- type ASOverview
- type ASOverviewBase
- type AbuseContactFinder
- type AbuseContactFinderBase
- type Client
- type LocatedResource
- type MaxmindGeoLite
- type MaxmindGeoLiteBase
- type MaxmindParameters
- type NetworkInfo
- type NetworkInfoBase
- type ParameterBase
- type ResourceLocation
- type ResponseBase
- type UnknownPercentage
Constants ¶
View Source
const (
DataUrl = "https://stat.ripe.net/data/"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ASOverview ¶
type ASOverview struct { Type string `json:"type"` Resource string `json:"resource"` Block ASBlock `json:"block"` Holder string `json:"holder"` Announced bool `json:"announced"` QueryStartTime string `json:"query_starttime"` QueryEndTime string `json:"query_endtime"` }
func ConvertASOverviewData ¶
func ConvertASOverviewData(data []byte) (ASOverview, error)
type ASOverviewBase ¶
type ASOverviewBase struct { ResponseBase Data ASOverview `json:"data"` }
type AbuseContactFinder ¶
type AbuseContactFinder struct { AbuseContacts []string `json:"abuse_contacts"` AuthoritativeRIR string `json:"authoritative_rir"` LatestTime string `json:"latest_time"` EarliestTime string `json:"earliest_time"` Parameters ParameterBase `json:"parameters"` }
type AbuseContactFinderBase ¶
type AbuseContactFinderBase struct { ResponseBase Data AbuseContactFinder `json:"data"` }
type Client ¶
func NewRipeStatClient ¶
func (*Client) GetASOverview ¶
func (c *Client) GetASOverview(asn string) (ASOverview, error)
func (*Client) GetAbuseContacts ¶
func (*Client) GetGeolocationData ¶
func (c *Client) GetGeolocationData(prefix string) (MaxmindGeoLite, error)
func (*Client) GetNetworkInfo ¶
func (c *Client) GetNetworkInfo(ipAddr string) (NetworkInfo, error)
type LocatedResource ¶
type LocatedResource struct { Resource string `json:"resource"` Locations []ResourceLocation `json:"locations"` }
type MaxmindGeoLite ¶
type MaxmindGeoLite struct { LocatedResources []LocatedResource `json:"located_resources"` UnknownPercentages UnknownPercentage `json:"unknown_percentage"` Parameters MaxmindParameters `json:"parameters"` ResultTime string `json:"result_time"` LatestTime string `json:"latest_time"` EarliestTime string `json:"earliest_time"` }
func ConvertGeolocationData ¶
func ConvertGeolocationData(data []byte) (MaxmindGeoLite, error)
type MaxmindGeoLiteBase ¶
type MaxmindGeoLiteBase struct { ResponseBase Data MaxmindGeoLite }
type MaxmindParameters ¶
type MaxmindParameters struct { ParameterBase Resolution string `json:"resolution"` }
type NetworkInfo ¶
func ConvertNetworkInfoData ¶
func ConvertNetworkInfoData(data []byte) (NetworkInfo, error)
type NetworkInfoBase ¶
type NetworkInfoBase struct { ResponseBase Data NetworkInfo `json:"data"` }
type ParameterBase ¶
type ParameterBase struct {
Resource string `json:"resource"`
}
type ResourceLocation ¶
type ResourceLocation struct { Country string `json:"country"` City string `json:"city"` Resources []string `json:"resources"` // Latitude float64 `json:"latitude"` // XXX: another data type? // Longitude float64 `json:"longitude"` // XXX: another data type? CoveredPercentage float64 `json:"covered_percentage"` UnknownPercentage float64 `json:"unknown_percentage"` }
type ResponseBase ¶
type ResponseBase struct { Messages [][]string `json:"messages"` SeeAlso []string `json:"see_also"` DataCallName string `json:"data_call_name"` DataCallStatus string `json:"data_call_status"` Cached bool `json:"cached"` QueryID string `json:"query_id"` ProcessTime int `json:"process_time"` ServerID string `json:"server_id"` BuildVersion string `json:"build_version"` Status string `json:"status"` StatusCode int `json:"status_code"` Time string `json:"time"` }
type UnknownPercentage ¶
Click to show internal directories.
Click to hide internal directories.