-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathtypes.go
More file actions
134 lines (118 loc) · 3.14 KB
/
Copy pathtypes.go
File metadata and controls
134 lines (118 loc) · 3.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
package geoip2
const (
dataTypeExtended = 0
dataTypePointer = 1
dataTypeString = 2
dataTypeFloat64 = 3
dataTypeBytes = 4
dataTypeUint16 = 5
dataTypeUint32 = 6
dataTypeMap = 7
dataTypeInt32 = 8
dataTypeUint64 = 9
dataTypeUint128 = 10
dataTypeSlice = 11
dataTypeDataCacheContainer = 12
dataTypeEndMarker = 13
dataTypeBool = 14
dataTypeFloat32 = 15
dataSectionSeparatorSize = 16
)
type (
Continent struct {
GeoNameID uint32
Code string
Names map[string]string
}
Country struct {
ISOCode string
Names map[string]string
Type string // [RepresentedCountry]
GeoNameID uint32
Confidence uint16 // Enterprise [Country, RegisteredCountry]
IsInEuropeanUnion bool
}
Subdivision struct {
ISOCode string
Names map[string]string
GeoNameID uint32
Confidence uint16 // Enterprise
}
City struct {
Names map[string]string
GeoNameID uint32
Confidence uint16 // Enterprise
}
Location struct {
Latitude float64
Longitude float64
TimeZone string
AccuracyRadius uint16
MetroCode uint16
}
Postal struct {
Code string
Confidence uint16 // Enterprise
}
Traits struct {
StaticIPScore float64 // Enterprise
ISP string // Enterprise
Organization string // Enterprise
ConnectionType string // Enterprise
Domain string // Enterprise
UserType string // Enterprise
AutonomousSystemOrganization string // Enterprise
AutonomousSystemNumber uint32 // Enterprise
IsLegitimateProxy bool // Enterprise
MobileCountryCode string // Enterprise
MobileNetworkCode string // Enterprise
IsAnonymousProxy bool
IsSatelliteProvider bool
IsAnycast bool
}
CountryResult struct {
Continent Continent
Country Country
RegisteredCountry Country
RepresentedCountry Country
Traits Traits
}
CityResult struct {
Continent Continent
Country Country
Subdivisions []Subdivision
City City
Location Location
Postal Postal
RegisteredCountry Country
RepresentedCountry Country
Traits Traits
}
ISP struct {
AutonomousSystemNumber uint32
AutonomousSystemOrganization string
ISP string
Organization string
MobileCountryCode string
MobileNetworkCode string
}
ConnectionType struct {
ConnectionType string
}
AnonymousIP struct {
IsAnonymous bool
IsAnonymousVPN bool
IsHostingProvider bool
IsPublicProxy bool
IsTorExitNode bool
IsResidentialProxy bool
}
ASN struct {
AutonomousSystemNumber uint32
AutonomousSystemOrganization string
Network string
}
Domain struct {
Domain string
}
)