Versions in this module Expand all Collapse all v0 v0.5.1 Nov 23, 2018 Changes in this version + var ErrMultipleAddresses = errors.New("the mirror has more than one IP address") + func ExtractRemoteIP(XForwardedFor string) string + func LookupMirrorIP(host string) (string, error) + func RemoteIPFromAddr(remoteAddr string) string + type ClusterLock struct + func NewClusterLock(redis *database.Redis, key, identifier string) *ClusterLock + func (n *ClusterLock) Get() (<-chan struct{}, error) + func (n *ClusterLock) Release() + type GeoIP struct + func NewGeoIP() *GeoIP + func (g *GeoIP) GetRecord(ip string) (ret GeoIPRecord) + func (g *GeoIP) IsIPv6(ip string) bool + func (g *GeoIP) LoadGeoIP() error + type GeoIPError struct + Errors []error + func (e GeoIPError) Error() string + func (e GeoIPError) IsFatal() bool + type GeoIPRecord struct + ASName string + ASNum uint + City string + ContinentCode string + Country string + CountryCode string + Latitude float32 + Longitude float32 + func (g *GeoIPRecord) IsValid() bool + type Geolocalizer interface + Lookup func(ipAddress net.IP, result interface{}) error