Versions in this module Expand all Collapse all v1 v1.6.1 Sep 9, 2024 Changes in this version + type ASN struct + Number int + Organization string + type CountryCode string + func (cc CountryCode) String() string + type IPInfo struct + ASN ASN + CountryCode CountryCode + func GetIPInfoFromAddr(ip2info IPInfoMap, addr net.Addr) (IPInfo, error) + func GetIPInfoFromIP(ip2info IPInfoMap, ip net.IP) (IPInfo, error) + type IPInfoMap interface + GetIPInfo func(net.IP) (IPInfo, error) + type MMDBIPInfoMap struct + func NewMMDBIPInfoMap(countryDBPath string, asnDBPath string) (*MMDBIPInfoMap, error) + func (ip2info *MMDBIPInfoMap) Close() error + func (ip2info *MMDBIPInfoMap) GetIPInfo(ip net.IP) (IPInfo, error)