Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Coordinates ¶ added in v0.7.1
type Location ¶
type Location struct {
Continent struct {
Code string `maxminddb:"code"`
} `maxminddb:"continent"`
Country struct {
ISOCode string `maxminddb:"iso_code"`
} `maxminddb:"country"`
Coordinates Coordinates `maxminddb:"location"`
AutonomousSystemNumber uint `maxminddb:"autonomous_system_number"`
AutonomousSystemOrganization string `maxminddb:"autonomous_system_organization"`
}
Location holds information regarding the geographical and network location of an IP address.
func GetLocation ¶
GetLocation returns Location data of an IP address.
func (*Location) EstimateNetworkProximity ¶
EstimateNetworkProximity aims to calculate the distance between two network locations. Returns a proximity value between 0 (far away) and 100 (nearby).
func (*Location) FillMissingInfo ¶ added in v0.7.1
func (l *Location) FillMissingInfo()
FillMissingInfo tries to fill missing location information based on the available existing information.