@@ -17,117 +17,117 @@ import (
1717// The Enterprise struct corresponds to the data in the GeoIP2 Enterprise
1818// database.
1919type Enterprise struct {
20- City struct {
21- Confidence uint8 `maxminddb:"confidence"`
22- GeoNameID uint `maxminddb:"geoname_id"`
23- Names map [string ]string `maxminddb:"names"`
24- } `maxminddb:"city"`
2520 Continent struct {
21+ Names map [string ]string `maxminddb:"names"`
2622 Code string `maxminddb:"code"`
2723 GeoNameID uint `maxminddb:"geoname_id"`
28- Names map [string ]string `maxminddb:"names"`
2924 } `maxminddb:"continent"`
30- Country struct {
31- GeoNameID uint `maxminddb:"geoname_id"`
32- IsoCode string `maxminddb:"iso_code"`
33- Names map [string ]string `maxminddb:"names"`
34- Confidence uint8 `maxminddb:"confidence"`
35- IsInEuropeanUnion bool `maxminddb:"is_in_european_union"`
36- } `maxminddb:"country"`
37- Location struct {
38- AccuracyRadius uint16 `maxminddb:"accuracy_radius"`
39- Latitude float64 `maxminddb:"latitude"`
40- Longitude float64 `maxminddb:"longitude"`
41- MetroCode uint `maxminddb:"metro_code"`
42- TimeZone string `maxminddb:"time_zone"`
43- } `maxminddb:"location"`
25+ City struct {
26+ Names map [string ]string `maxminddb:"names"`
27+ GeoNameID uint `maxminddb:"geoname_id"`
28+ Confidence uint8 `maxminddb:"confidence"`
29+ } `maxminddb:"city"`
4430 Postal struct {
4531 Code string `maxminddb:"code"`
4632 Confidence uint8 `maxminddb:"confidence"`
4733 } `maxminddb:"postal"`
48- RegisteredCountry struct {
49- GeoNameID uint `maxminddb:"geoname_id"`
34+ Subdivisions []struct {
35+ Names map [string ]string `maxminddb:"names"`
36+ IsoCode string `maxminddb:"iso_code"`
37+ GeoNameID uint `maxminddb:"geoname_id"`
38+ Confidence uint8 `maxminddb:"confidence"`
39+ } `maxminddb:"subdivisions"`
40+ RepresentedCountry struct {
41+ Names map [string ]string `maxminddb:"names"`
5042 IsoCode string `maxminddb:"iso_code"`
43+ Type string `maxminddb:"type"`
44+ GeoNameID uint `maxminddb:"geoname_id"`
45+ IsInEuropeanUnion bool `maxminddb:"is_in_european_union"`
46+ } `maxminddb:"represented_country"`
47+ Country struct {
5148 Names map [string ]string `maxminddb:"names"`
49+ IsoCode string `maxminddb:"iso_code"`
50+ GeoNameID uint `maxminddb:"geoname_id"`
5251 Confidence uint8 `maxminddb:"confidence"`
5352 IsInEuropeanUnion bool `maxminddb:"is_in_european_union"`
54- } `maxminddb:"registered_country"`
55- RepresentedCountry struct {
53+ } `maxminddb:"country"`
54+ RegisteredCountry struct {
55+ Names map [string ]string `maxminddb:"names"`
56+ IsoCode string `maxminddb:"iso_code"`
5657 GeoNameID uint `maxminddb:"geoname_id"`
58+ Confidence uint8 `maxminddb:"confidence"`
5759 IsInEuropeanUnion bool `maxminddb:"is_in_european_union"`
58- IsoCode string `maxminddb:"iso_code"`
59- Names map [string ]string `maxminddb:"names"`
60- Type string `maxminddb:"type"`
61- } `maxminddb:"represented_country"`
62- Subdivisions []struct {
63- Confidence uint8 `maxminddb:"confidence"`
64- GeoNameID uint `maxminddb:"geoname_id"`
65- IsoCode string `maxminddb:"iso_code"`
66- Names map [string ]string `maxminddb:"names"`
67- } `maxminddb:"subdivisions"`
60+ } `maxminddb:"registered_country"`
6861 Traits struct {
69- AutonomousSystemNumber uint `maxminddb:"autonomous_system_number"`
7062 AutonomousSystemOrganization string `maxminddb:"autonomous_system_organization"`
7163 ConnectionType string `maxminddb:"connection_type"`
7264 Domain string `maxminddb:"domain"`
73- IsAnonymousProxy bool `maxminddb:"is_anonymous_proxy"`
74- IsLegitimateProxy bool `maxminddb:"is_legitimate_proxy"`
75- IsSatelliteProvider bool `maxminddb:"is_satellite_provider"`
7665 ISP string `maxminddb:"isp"`
7766 MobileCountryCode string `maxminddb:"mobile_country_code"`
7867 MobileNetworkCode string `maxminddb:"mobile_network_code"`
7968 Organization string `maxminddb:"organization"`
80- StaticIPScore float64 `maxminddb:"static_ip_score"`
8169 UserType string `maxminddb:"user_type"`
70+ AutonomousSystemNumber uint `maxminddb:"autonomous_system_number"`
71+ StaticIPScore float64 `maxminddb:"static_ip_score"`
72+ IsAnonymousProxy bool `maxminddb:"is_anonymous_proxy"`
73+ IsLegitimateProxy bool `maxminddb:"is_legitimate_proxy"`
74+ IsSatelliteProvider bool `maxminddb:"is_satellite_provider"`
8275 } `maxminddb:"traits"`
76+ Location struct {
77+ TimeZone string `maxminddb:"time_zone"`
78+ Latitude float64 `maxminddb:"latitude"`
79+ Longitude float64 `maxminddb:"longitude"`
80+ MetroCode uint `maxminddb:"metro_code"`
81+ AccuracyRadius uint16 `maxminddb:"accuracy_radius"`
82+ } `maxminddb:"location"`
8383}
8484
8585// The City struct corresponds to the data in the GeoIP2/GeoLite2 City
8686// databases.
8787type City struct {
8888 City struct {
89- GeoNameID uint `maxminddb:"geoname_id"`
9089 Names map [string ]string `maxminddb:"names"`
90+ GeoNameID uint `maxminddb:"geoname_id"`
9191 } `maxminddb:"city"`
92+ Postal struct {
93+ Code string `maxminddb:"code"`
94+ } `maxminddb:"postal"`
9295 Continent struct {
96+ Names map [string ]string `maxminddb:"names"`
9397 Code string `maxminddb:"code"`
9498 GeoNameID uint `maxminddb:"geoname_id"`
95- Names map [string ]string `maxminddb:"names"`
9699 } `maxminddb:"continent"`
97- Country struct {
100+ Subdivisions []struct {
101+ Names map [string ]string `maxminddb:"names"`
102+ IsoCode string `maxminddb:"iso_code"`
103+ GeoNameID uint `maxminddb:"geoname_id"`
104+ } `maxminddb:"subdivisions"`
105+ RepresentedCountry struct {
106+ Names map [string ]string `maxminddb:"names"`
107+ IsoCode string `maxminddb:"iso_code"`
108+ Type string `maxminddb:"type"`
98109 GeoNameID uint `maxminddb:"geoname_id"`
99110 IsInEuropeanUnion bool `maxminddb:"is_in_european_union"`
100- IsoCode string `maxminddb:"iso_code"`
111+ } `maxminddb:"represented_country"`
112+ Country struct {
101113 Names map [string ]string `maxminddb:"names"`
114+ IsoCode string `maxminddb:"iso_code"`
115+ GeoNameID uint `maxminddb:"geoname_id"`
116+ IsInEuropeanUnion bool `maxminddb:"is_in_european_union"`
102117 } `maxminddb:"country"`
118+ RegisteredCountry struct {
119+ Names map [string ]string `maxminddb:"names"`
120+ IsoCode string `maxminddb:"iso_code"`
121+ GeoNameID uint `maxminddb:"geoname_id"`
122+ IsInEuropeanUnion bool `maxminddb:"is_in_european_union"`
123+ } `maxminddb:"registered_country"`
103124 Location struct {
104- AccuracyRadius uint16 `maxminddb:"accuracy_radius "`
125+ TimeZone string `maxminddb:"time_zone "`
105126 Latitude float64 `maxminddb:"latitude"`
106127 Longitude float64 `maxminddb:"longitude"`
107128 MetroCode uint `maxminddb:"metro_code"`
108- TimeZone string `maxminddb:"time_zone "`
129+ AccuracyRadius uint16 `maxminddb:"accuracy_radius "`
109130 } `maxminddb:"location"`
110- Postal struct {
111- Code string `maxminddb:"code"`
112- } `maxminddb:"postal"`
113- RegisteredCountry struct {
114- GeoNameID uint `maxminddb:"geoname_id"`
115- IsInEuropeanUnion bool `maxminddb:"is_in_european_union"`
116- IsoCode string `maxminddb:"iso_code"`
117- Names map [string ]string `maxminddb:"names"`
118- } `maxminddb:"registered_country"`
119- RepresentedCountry struct {
120- GeoNameID uint `maxminddb:"geoname_id"`
121- IsInEuropeanUnion bool `maxminddb:"is_in_european_union"`
122- IsoCode string `maxminddb:"iso_code"`
123- Names map [string ]string `maxminddb:"names"`
124- Type string `maxminddb:"type"`
125- } `maxminddb:"represented_country"`
126- Subdivisions []struct {
127- GeoNameID uint `maxminddb:"geoname_id"`
128- IsoCode string `maxminddb:"iso_code"`
129- Names map [string ]string `maxminddb:"names"`
130- } `maxminddb:"subdivisions"`
131131 Traits struct {
132132 IsAnonymousProxy bool `maxminddb:"is_anonymous_proxy"`
133133 IsSatelliteProvider bool `maxminddb:"is_satellite_provider"`
@@ -138,28 +138,28 @@ type City struct {
138138// Country databases.
139139type Country struct {
140140 Continent struct {
141+ Names map [string ]string `maxminddb:"names"`
141142 Code string `maxminddb:"code"`
142143 GeoNameID uint `maxminddb:"geoname_id"`
143- Names map [string ]string `maxminddb:"names"`
144144 } `maxminddb:"continent"`
145145 Country struct {
146+ Names map [string ]string `maxminddb:"names"`
147+ IsoCode string `maxminddb:"iso_code"`
146148 GeoNameID uint `maxminddb:"geoname_id"`
147149 IsInEuropeanUnion bool `maxminddb:"is_in_european_union"`
148- IsoCode string `maxminddb:"iso_code"`
149- Names map [string ]string `maxminddb:"names"`
150150 } `maxminddb:"country"`
151151 RegisteredCountry struct {
152+ Names map [string ]string `maxminddb:"names"`
153+ IsoCode string `maxminddb:"iso_code"`
152154 GeoNameID uint `maxminddb:"geoname_id"`
153155 IsInEuropeanUnion bool `maxminddb:"is_in_european_union"`
154- IsoCode string `maxminddb:"iso_code"`
155- Names map [string ]string `maxminddb:"names"`
156156 } `maxminddb:"registered_country"`
157157 RepresentedCountry struct {
158- GeoNameID uint `maxminddb:"geoname_id"`
159- IsInEuropeanUnion bool `maxminddb:"is_in_european_union"`
160- IsoCode string `maxminddb:"iso_code"`
161158 Names map [string ]string `maxminddb:"names"`
159+ IsoCode string `maxminddb:"iso_code"`
162160 Type string `maxminddb:"type"`
161+ GeoNameID uint `maxminddb:"geoname_id"`
162+ IsInEuropeanUnion bool `maxminddb:"is_in_european_union"`
163163 } `maxminddb:"represented_country"`
164164 Traits struct {
165165 IsAnonymousProxy bool `maxminddb:"is_anonymous_proxy"`
@@ -180,8 +180,8 @@ type AnonymousIP struct {
180180
181181// The ASN struct corresponds to the data in the GeoLite2 ASN database.
182182type ASN struct {
183- AutonomousSystemNumber uint `maxminddb:"autonomous_system_number"`
184183 AutonomousSystemOrganization string `maxminddb:"autonomous_system_organization"`
184+ AutonomousSystemNumber uint `maxminddb:"autonomous_system_number"`
185185}
186186
187187// The ConnectionType struct corresponds to the data in the GeoIP2
@@ -197,12 +197,12 @@ type Domain struct {
197197
198198// The ISP struct corresponds to the data in the GeoIP2 ISP database.
199199type ISP struct {
200- AutonomousSystemNumber uint `maxminddb:"autonomous_system_number"`
201200 AutonomousSystemOrganization string `maxminddb:"autonomous_system_organization"`
202201 ISP string `maxminddb:"isp"`
203202 MobileCountryCode string `maxminddb:"mobile_country_code"`
204203 MobileNetworkCode string `maxminddb:"mobile_network_code"`
205204 Organization string `maxminddb:"organization"`
205+ AutonomousSystemNumber uint `maxminddb:"autonomous_system_number"`
206206}
207207
208208type databaseType int
0 commit comments