You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.7 KiB
48 lines
1.7 KiB
package geoip
|
|
|
|
import (
|
|
"go.dtapp.net/gostring"
|
|
)
|
|
|
|
func (c *Client) GetGeoLite2AsnDownloadUrl() string {
|
|
if c.licenseKey == "" {
|
|
return ""
|
|
}
|
|
return gostring.Replace("https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-ASN&license_key=YOUR_LICENSE_KEY&suffix=tar.gz", "YOUR_LICENSE_KEY", c.licenseKey)
|
|
}
|
|
|
|
//func (c *Client) GetGeoLite2AsnCsvDownloadUrl() string {
|
|
// if c.licenseKey == "" {
|
|
// return ""
|
|
// }
|
|
// return gostring.Replace("https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-ASN-CSV&license_key=YOUR_LICENSE_KEY&suffix=zip", "YOUR_LICENSE_KEY", c.licenseKey)
|
|
//}
|
|
|
|
func (c *Client) GetGeoLite2CityDownloadUrl() string {
|
|
if c.licenseKey == "" {
|
|
return ""
|
|
}
|
|
return gostring.Replace("https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key=YOUR_LICENSE_KEY&suffix=tar.gz", "YOUR_LICENSE_KEY", c.licenseKey)
|
|
}
|
|
|
|
//func (c *Client) GetGeoLite2CityCsvDownloadUrl() string {
|
|
// if c.licenseKey == "" {
|
|
// return ""
|
|
// }
|
|
// return gostring.Replace("https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City-CSV&license_key=YOUR_LICENSE_KEY&suffix=zip", "YOUR_LICENSE_KEY", c.licenseKey)
|
|
//}
|
|
|
|
func (c *Client) GetGeoLite2CountryDownloadUrl() string {
|
|
if c.licenseKey == "" {
|
|
return ""
|
|
}
|
|
return gostring.Replace("https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&license_key=YOUR_LICENSE_KEY&suffix=tar.gz", "YOUR_LICENSE_KEY", c.licenseKey)
|
|
}
|
|
|
|
//func (c *Client) GetGeoLite2CountryCsvDownloadUrl() string {
|
|
// if c.licenseKey == "" {
|
|
// return ""
|
|
// }
|
|
// return gostring.Replace("https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country-CSV&license_key=YOUR_LICENSE_KEY&suffix=zip", "YOUR_LICENSE_KEY", c.licenseKey)
|
|
//}
|