Standort provides location based information.
The following locations are covered.
The service allows you to get the location by IP address using geoip2.
The service allows you to get the location based on latitude/longitude using the power of free maps.
The server has the following versions.
The service contains 2 versions of the API. These are as follows:
- V1 - has separate endpoints for IP and countries.
- V2 - combines both into one endpoint and uses the following headers:
- For IP address we will use X-Forwarded-For header.
- For geo location we would use Geolocation header. The format is described as the geo URI.
The client can be used in other projects.
This is configured as follows:
client:
v1:
host: server_host
retry:
attempts: 3
backoff: 100ms
timeout: 3s
timeout: 5s
user_agent: "UA"
v2:
host: server_host
retry:
attempts: 3
backoff: 100ms
timeout: 3s
timeout: 5s
user_agent: "UA"
If you would like to contribute, here is how you can get started.
The project follows the structure in golang-standards/project-layout.
Please make sure that you have the following installed:
- Ruby
- Golang
This project favours the Uber Go Style Guide
The get yourself setup, please run the following:
make setup
To make sure everything compiles for the app, please run the following:
make build-test
To run all the features, please run the following:
make features
To see what has changed, please have a look at CHANGELOG.md