Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Ip_Country_Mapping = make(map[netaddr.IP]string)
Functions ¶
This section is empty.
Types ¶
type App ¶
App structured as standalone object to better facilitate testing
func (*App) CheckGeoLocation ¶
CheckGeoLocation is our main endpoint We expect a POST from an outside endpoint with basic auth header and a json payload format:
{ "ip_address": "X.X.X.X", "country_names": [ "Mexico", "Canada",
] } This endpoint will return a 302 if the IP was mapped to a country in the country_names list or a 404 if the IP lookup fails Other error codes are 400 if the json payload is malformed or the IP does not conform to IPv4 or IPv6 standards
func (*App) Initialize ¶
Click to show internal directories.
Click to hide internal directories.