package
2.12.0+incompatible
Repository: https://github.com/adguardteam/adguarddns.git
Documentation: pkg.go.dev

# Functions

NewContinent converts s into a Continent while also validating it.
NewCountry converts s into a Country while also validating it.
NewFile returns a new GeoIP database that reads information from a file.

# Constants

ContinentAF is Africa.
ContinentAN is Antarctica.
ContinentAS is Asia.
ContinentEU is Europe.
ContinentNA is North America.
ContinentNone is an unknown continent code.
ContinentOC is Oceania.
ContinentSA is South America.
CountryAD is the ISO 3166-1 alpha-2 code for Andorra.
CountryAE is the ISO 3166-1 alpha-2 code for United Arab Emirates.
CountryAF is the ISO 3166-1 alpha-2 code for Afghanistan.
CountryAG is the ISO 3166-1 alpha-2 code for Antigua and Barbuda.
CountryAI is the ISO 3166-1 alpha-2 code for Anguilla.
CountryAL is the ISO 3166-1 alpha-2 code for Albania.
CountryAM is the ISO 3166-1 alpha-2 code for Armenia.
CountryAO is the ISO 3166-1 alpha-2 code for Angola.
CountryAQ is the ISO 3166-1 alpha-2 code for Antarctica.
CountryAR is the ISO 3166-1 alpha-2 code for Argentina.
CountryAS is the ISO 3166-1 alpha-2 code for American Samoa.
CountryAT is the ISO 3166-1 alpha-2 code for Austria.
CountryAU is the ISO 3166-1 alpha-2 code for Australia.
CountryAW is the ISO 3166-1 alpha-2 code for Aruba.
CountryAX is the ISO 3166-1 alpha-2 code for Åland Islands.
CountryAZ is the ISO 3166-1 alpha-2 code for Azerbaijan.
CountryBA is the ISO 3166-1 alpha-2 code for Bosnia and Herzegovina.
CountryBB is the ISO 3166-1 alpha-2 code for Barbados.
CountryBD is the ISO 3166-1 alpha-2 code for Bangladesh.
CountryBE is the ISO 3166-1 alpha-2 code for Belgium.
CountryBF is the ISO 3166-1 alpha-2 code for Burkina Faso.
CountryBG is the ISO 3166-1 alpha-2 code for Bulgaria.
CountryBH is the ISO 3166-1 alpha-2 code for Bahrain.
CountryBI is the ISO 3166-1 alpha-2 code for Burundi.
CountryBJ is the ISO 3166-1 alpha-2 code for Benin.
CountryBL is the ISO 3166-1 alpha-2 code for Saint Barthélemy.
CountryBM is the ISO 3166-1 alpha-2 code for Bermuda.
CountryBN is the ISO 3166-1 alpha-2 code for Brunei Darussalam.
CountryBO is the ISO 3166-1 alpha-2 code for Bolivia, Plurinational State of.
CountryBQ is the ISO 3166-1 alpha-2 code for Bonaire, Sint Eustatius and Saba.
CountryBR is the ISO 3166-1 alpha-2 code for Brazil.
CountryBS is the ISO 3166-1 alpha-2 code for Bahamas.
CountryBT is the ISO 3166-1 alpha-2 code for Bhutan.
CountryBV is the ISO 3166-1 alpha-2 code for Bouvet Island.
CountryBW is the ISO 3166-1 alpha-2 code for Botswana.
CountryBY is the ISO 3166-1 alpha-2 code for Belarus.
CountryBZ is the ISO 3166-1 alpha-2 code for Belize.
CountryCA is the ISO 3166-1 alpha-2 code for Canada.
CountryCC is the ISO 3166-1 alpha-2 code for Cocos (Keeling) Islands.
CountryCD is the ISO 3166-1 alpha-2 code for Congo, Democratic Republic of the.
CountryCF is the ISO 3166-1 alpha-2 code for Central African Republic.
CountryCG is the ISO 3166-1 alpha-2 code for Congo.
CountryCH is the ISO 3166-1 alpha-2 code for Switzerland.
CountryCI is the ISO 3166-1 alpha-2 code for Côte d'Ivoire.
CountryCK is the ISO 3166-1 alpha-2 code for Cook Islands.
CountryCL is the ISO 3166-1 alpha-2 code for Chile.
CountryCM is the ISO 3166-1 alpha-2 code for Cameroon.
CountryCN is the ISO 3166-1 alpha-2 code for China.
CountryCO is the ISO 3166-1 alpha-2 code for Colombia.
CountryCR is the ISO 3166-1 alpha-2 code for Costa Rica.
CountryCU is the ISO 3166-1 alpha-2 code for Cuba.
CountryCV is the ISO 3166-1 alpha-2 code for Cabo Verde.
CountryCW is the ISO 3166-1 alpha-2 code for Curaçao.
CountryCX is the ISO 3166-1 alpha-2 code for Christmas Island.
CountryCY is the ISO 3166-1 alpha-2 code for Cyprus.
CountryCZ is the ISO 3166-1 alpha-2 code for Czechia.
CountryDE is the ISO 3166-1 alpha-2 code for Germany.
CountryDJ is the ISO 3166-1 alpha-2 code for Djibouti.
CountryDK is the ISO 3166-1 alpha-2 code for Denmark.
CountryDM is the ISO 3166-1 alpha-2 code for Dominica.
CountryDO is the ISO 3166-1 alpha-2 code for Dominican Republic.
CountryDZ is the ISO 3166-1 alpha-2 code for Algeria.
CountryEC is the ISO 3166-1 alpha-2 code for Ecuador.
CountryEE is the ISO 3166-1 alpha-2 code for Estonia.
CountryEG is the ISO 3166-1 alpha-2 code for Egypt.
CountryEH is the ISO 3166-1 alpha-2 code for Western Sahara.
CountryER is the ISO 3166-1 alpha-2 code for Eritrea.
CountryES is the ISO 3166-1 alpha-2 code for Spain.
CountryET is the ISO 3166-1 alpha-2 code for Ethiopia.
CountryFI is the ISO 3166-1 alpha-2 code for Finland.
CountryFJ is the ISO 3166-1 alpha-2 code for Fiji.
CountryFK is the ISO 3166-1 alpha-2 code for Falkland Islands (Malvinas).
CountryFM is the ISO 3166-1 alpha-2 code for Micronesia, Federated States of.
CountryFO is the ISO 3166-1 alpha-2 code for Faroe Islands.
CountryFR is the ISO 3166-1 alpha-2 code for France.
CountryGA is the ISO 3166-1 alpha-2 code for Gabon.
CountryGB is the ISO 3166-1 alpha-2 code for United Kingdom of Great Britain and Northern Ireland.
CountryGD is the ISO 3166-1 alpha-2 code for Grenada.
CountryGE is the ISO 3166-1 alpha-2 code for Georgia.
CountryGF is the ISO 3166-1 alpha-2 code for French Guiana.
CountryGG is the ISO 3166-1 alpha-2 code for Guernsey.
CountryGH is the ISO 3166-1 alpha-2 code for Ghana.
CountryGI is the ISO 3166-1 alpha-2 code for Gibraltar.
CountryGL is the ISO 3166-1 alpha-2 code for Greenland.
CountryGM is the ISO 3166-1 alpha-2 code for Gambia.
CountryGN is the ISO 3166-1 alpha-2 code for Guinea.
CountryGP is the ISO 3166-1 alpha-2 code for Guadeloupe.
CountryGQ is the ISO 3166-1 alpha-2 code for Equatorial Guinea.
CountryGR is the ISO 3166-1 alpha-2 code for Greece.
CountryGS is the ISO 3166-1 alpha-2 code for South Georgia and the South Sandwich Islands.
CountryGT is the ISO 3166-1 alpha-2 code for Guatemala.
CountryGU is the ISO 3166-1 alpha-2 code for Guam.
CountryGW is the ISO 3166-1 alpha-2 code for Guinea-Bissau.
CountryGY is the ISO 3166-1 alpha-2 code for Guyana.
CountryHK is the ISO 3166-1 alpha-2 code for Hong Kong.
CountryHM is the ISO 3166-1 alpha-2 code for Heard Island and McDonald Islands.
CountryHN is the ISO 3166-1 alpha-2 code for Honduras.
CountryHR is the ISO 3166-1 alpha-2 code for Croatia.
CountryHT is the ISO 3166-1 alpha-2 code for Haiti.
CountryHU is the ISO 3166-1 alpha-2 code for Hungary.
CountryID is the ISO 3166-1 alpha-2 code for Indonesia.
CountryIE is the ISO 3166-1 alpha-2 code for Ireland.
CountryIL is the ISO 3166-1 alpha-2 code for Israel.
CountryIM is the ISO 3166-1 alpha-2 code for Isle of Man.
CountryIN is the ISO 3166-1 alpha-2 code for India.
CountryIO is the ISO 3166-1 alpha-2 code for British Indian Ocean Territory.
CountryIQ is the ISO 3166-1 alpha-2 code for Iraq.
CountryIR is the ISO 3166-1 alpha-2 code for Iran, Islamic Republic of.
CountryIS is the ISO 3166-1 alpha-2 code for Iceland.
CountryIT is the ISO 3166-1 alpha-2 code for Italy.
CountryJE is the ISO 3166-1 alpha-2 code for Jersey.
CountryJM is the ISO 3166-1 alpha-2 code for Jamaica.
CountryJO is the ISO 3166-1 alpha-2 code for Jordan.
CountryJP is the ISO 3166-1 alpha-2 code for Japan.
CountryKE is the ISO 3166-1 alpha-2 code for Kenya.
CountryKG is the ISO 3166-1 alpha-2 code for Kyrgyzstan.
CountryKH is the ISO 3166-1 alpha-2 code for Cambodia.
CountryKI is the ISO 3166-1 alpha-2 code for Kiribati.
CountryKM is the ISO 3166-1 alpha-2 code for Comoros.
CountryKN is the ISO 3166-1 alpha-2 code for Saint Kitts and Nevis.
CountryKP is the ISO 3166-1 alpha-2 code for Korea, Democratic People's Republic of.
CountryKR is the ISO 3166-1 alpha-2 code for Korea, Republic of.
CountryKW is the ISO 3166-1 alpha-2 code for Kuwait.
CountryKY is the ISO 3166-1 alpha-2 code for Cayman Islands.
CountryKZ is the ISO 3166-1 alpha-2 code for Kazakhstan.
CountryLA is the ISO 3166-1 alpha-2 code for Lao People's Democratic Republic.
CountryLB is the ISO 3166-1 alpha-2 code for Lebanon.
CountryLC is the ISO 3166-1 alpha-2 code for Saint Lucia.
CountryLI is the ISO 3166-1 alpha-2 code for Liechtenstein.
CountryLK is the ISO 3166-1 alpha-2 code for Sri Lanka.
CountryLR is the ISO 3166-1 alpha-2 code for Liberia.
CountryLS is the ISO 3166-1 alpha-2 code for Lesotho.
CountryLT is the ISO 3166-1 alpha-2 code for Lithuania.
CountryLU is the ISO 3166-1 alpha-2 code for Luxembourg.
CountryLV is the ISO 3166-1 alpha-2 code for Latvia.
CountryLY is the ISO 3166-1 alpha-2 code for Libya.
CountryMA is the ISO 3166-1 alpha-2 code for Morocco.
CountryMC is the ISO 3166-1 alpha-2 code for Monaco.
CountryMD is the ISO 3166-1 alpha-2 code for Moldova, Republic of.
CountryME is the ISO 3166-1 alpha-2 code for Montenegro.
CountryMF is the ISO 3166-1 alpha-2 code for Saint Martin (French part).
CountryMG is the ISO 3166-1 alpha-2 code for Madagascar.
CountryMH is the ISO 3166-1 alpha-2 code for Marshall Islands.
CountryMK is the ISO 3166-1 alpha-2 code for North Macedonia.
CountryML is the ISO 3166-1 alpha-2 code for Mali.
CountryMM is the ISO 3166-1 alpha-2 code for Myanmar.
CountryMN is the ISO 3166-1 alpha-2 code for Mongolia.
CountryMO is the ISO 3166-1 alpha-2 code for Macao.
CountryMP is the ISO 3166-1 alpha-2 code for Northern Mariana Islands.
CountryMQ is the ISO 3166-1 alpha-2 code for Martinique.
CountryMR is the ISO 3166-1 alpha-2 code for Mauritania.
CountryMS is the ISO 3166-1 alpha-2 code for Montserrat.
CountryMT is the ISO 3166-1 alpha-2 code for Malta.
CountryMU is the ISO 3166-1 alpha-2 code for Mauritius.
CountryMV is the ISO 3166-1 alpha-2 code for Maldives.
CountryMW is the ISO 3166-1 alpha-2 code for Malawi.
CountryMX is the ISO 3166-1 alpha-2 code for Mexico.
CountryMY is the ISO 3166-1 alpha-2 code for Malaysia.
CountryMZ is the ISO 3166-1 alpha-2 code for Mozambique.
CountryNA is the ISO 3166-1 alpha-2 code for Namibia.
CountryNC is the ISO 3166-1 alpha-2 code for New Caledonia.
CountryNE is the ISO 3166-1 alpha-2 code for Niger.
CountryNF is the ISO 3166-1 alpha-2 code for Norfolk Island.
CountryNG is the ISO 3166-1 alpha-2 code for Nigeria.
CountryNI is the ISO 3166-1 alpha-2 code for Nicaragua.
CountryNL is the ISO 3166-1 alpha-2 code for Netherlands, Kingdom of the.
CountryNO is the ISO 3166-1 alpha-2 code for Norway.
CountryNone is an invalid or unknown country code.
CountryNotApplicable is the user-assigned ISO 3166-1 alpha-2 code used when a country of origin cannot be determined due to a lack of information, for example a response of the record type that doesn't contain an IP address.
CountryNP is the ISO 3166-1 alpha-2 code for Nepal.
CountryNR is the ISO 3166-1 alpha-2 code for Nauru.
CountryNU is the ISO 3166-1 alpha-2 code for Niue.
CountryNZ is the ISO 3166-1 alpha-2 code for New Zealand.
CountryOM is the ISO 3166-1 alpha-2 code for Oman.
CountryPA is the ISO 3166-1 alpha-2 code for Panama.
CountryPE is the ISO 3166-1 alpha-2 code for Peru.
CountryPF is the ISO 3166-1 alpha-2 code for French Polynesia.
CountryPG is the ISO 3166-1 alpha-2 code for Papua New Guinea.
CountryPH is the ISO 3166-1 alpha-2 code for Philippines.
CountryPK is the ISO 3166-1 alpha-2 code for Pakistan.
CountryPL is the ISO 3166-1 alpha-2 code for Poland.
CountryPM is the ISO 3166-1 alpha-2 code for Saint Pierre and Miquelon.
CountryPN is the ISO 3166-1 alpha-2 code for Pitcairn.
CountryPR is the ISO 3166-1 alpha-2 code for Puerto Rico.
CountryPS is the ISO 3166-1 alpha-2 code for Palestine, State of.
CountryPT is the ISO 3166-1 alpha-2 code for Portugal.
CountryPW is the ISO 3166-1 alpha-2 code for Palau.
CountryPY is the ISO 3166-1 alpha-2 code for Paraguay.
CountryQA is the ISO 3166-1 alpha-2 code for Qatar.
CountryRE is the ISO 3166-1 alpha-2 code for Réunion.
CountryRO is the ISO 3166-1 alpha-2 code for Romania.
CountryRS is the ISO 3166-1 alpha-2 code for Serbia.
CountryRU is the ISO 3166-1 alpha-2 code for Russian Federation.
CountryRW is the ISO 3166-1 alpha-2 code for Rwanda.
CountrySA is the ISO 3166-1 alpha-2 code for Saudi Arabia.
CountrySB is the ISO 3166-1 alpha-2 code for Solomon Islands.
CountrySC is the ISO 3166-1 alpha-2 code for Seychelles.
CountrySD is the ISO 3166-1 alpha-2 code for Sudan.
CountrySE is the ISO 3166-1 alpha-2 code for Sweden.
CountrySG is the ISO 3166-1 alpha-2 code for Singapore.
CountrySH is the ISO 3166-1 alpha-2 code for Saint Helena, Ascension and Tristan da Cunha.
CountrySI is the ISO 3166-1 alpha-2 code for Slovenia.
CountrySJ is the ISO 3166-1 alpha-2 code for Svalbard and Jan Mayen.
CountrySK is the ISO 3166-1 alpha-2 code for Slovakia.
CountrySL is the ISO 3166-1 alpha-2 code for Sierra Leone.
CountrySM is the ISO 3166-1 alpha-2 code for San Marino.
CountrySN is the ISO 3166-1 alpha-2 code for Senegal.
CountrySO is the ISO 3166-1 alpha-2 code for Somalia.
CountrySR is the ISO 3166-1 alpha-2 code for Suriname.
CountrySS is the ISO 3166-1 alpha-2 code for South Sudan.
CountryST is the ISO 3166-1 alpha-2 code for Sao Tome and Principe.
CountrySV is the ISO 3166-1 alpha-2 code for El Salvador.
CountrySX is the ISO 3166-1 alpha-2 code for Sint Maarten (Dutch part).
CountrySY is the ISO 3166-1 alpha-2 code for Syrian Arab Republic.
CountrySZ is the ISO 3166-1 alpha-2 code for Eswatini.
CountryTC is the ISO 3166-1 alpha-2 code for Turks and Caicos Islands.
CountryTD is the ISO 3166-1 alpha-2 code for Chad.
CountryTF is the ISO 3166-1 alpha-2 code for French Southern Territories.
CountryTG is the ISO 3166-1 alpha-2 code for Togo.
CountryTH is the ISO 3166-1 alpha-2 code for Thailand.
CountryTJ is the ISO 3166-1 alpha-2 code for Tajikistan.
CountryTK is the ISO 3166-1 alpha-2 code for Tokelau.
CountryTL is the ISO 3166-1 alpha-2 code for Timor-Leste.
CountryTM is the ISO 3166-1 alpha-2 code for Turkmenistan.
CountryTN is the ISO 3166-1 alpha-2 code for Tunisia.
CountryTO is the ISO 3166-1 alpha-2 code for Tonga.
CountryTR is the ISO 3166-1 alpha-2 code for Türkiye.
CountryTT is the ISO 3166-1 alpha-2 code for Trinidad and Tobago.
CountryTV is the ISO 3166-1 alpha-2 code for Tuvalu.
CountryTW is the ISO 3166-1 alpha-2 code for Taiwan, Province of China.
CountryTZ is the ISO 3166-1 alpha-2 code for Tanzania, United Republic of.
CountryUA is the ISO 3166-1 alpha-2 code for Ukraine.
CountryUG is the ISO 3166-1 alpha-2 code for Uganda.
CountryUM is the ISO 3166-1 alpha-2 code for United States Minor Outlying Islands.
CountryUS is the ISO 3166-1 alpha-2 code for United States of America.
CountryUY is the ISO 3166-1 alpha-2 code for Uruguay.
CountryUZ is the ISO 3166-1 alpha-2 code for Uzbekistan.
CountryVA is the ISO 3166-1 alpha-2 code for Holy See.
CountryVC is the ISO 3166-1 alpha-2 code for Saint Vincent and the Grenadines.
CountryVE is the ISO 3166-1 alpha-2 code for Venezuela, Bolivarian Republic of.
CountryVG is the ISO 3166-1 alpha-2 code for Virgin Islands (British).
CountryVI is the ISO 3166-1 alpha-2 code for Virgin Islands (U.S.).
CountryVN is the ISO 3166-1 alpha-2 code for Viet Nam.
CountryVU is the ISO 3166-1 alpha-2 code for Vanuatu.
CountryWF is the ISO 3166-1 alpha-2 code for Wallis and Futuna.
CountryWS is the ISO 3166-1 alpha-2 code for Samoa.
CountryXK is the user-assigned ISO 3166-1 alpha-2 code for Republic of Kosovo.
CountryYE is the ISO 3166-1 alpha-2 code for Yemen.
CountryYT is the ISO 3166-1 alpha-2 code for Mayotte.
CountryZA is the ISO 3166-1 alpha-2 code for South Africa.
CountryZM is the ISO 3166-1 alpha-2 code for Zambia.
CountryZW is the ISO 3166-1 alpha-2 code for Zimbabwe.

# Variables

DefaultCountryTopASNs is a mapping of a country to their top ASNs.
DefaultTopASNs contains all specially handled ASNs.

# Structs

EmptyMetrics is the implementation of the [Metrics] interface that does nothing.
File is a file implementation of [geoip.Interface].
FileConfig is the file-based GeoIP configuration structure.
Location represents the GeoIP location data about an IP address.
NotAContinentError is returned from NewContinent when the string doesn't represent a valid continent.
NotACountryError is returned from NewCountry when the string doesn't represent a valid country.

# Interfaces

Interface is the interface for the GeoIP database that stores the geographic data about an IP address.
Metrics is an interface that is used for the collection of the GeoIP database statistics.

# Type aliases

ASN is the autonomous system number of an IP address.
Continent represents a continent code used by MaxMind.
Country represents an ISO 3166-1 alpha-2 country code.