standort

Gopher CircleCI codecov Go Reference Stability: Active

📍 Standort

Standort is a Go service that returns a country and continent for an IP address, a latitude and longitude point, or both. It exposes v1 and v2 APIs over gRPC and HTTP. It uses embedded GeoIP2 and GeoJSON datasets for coarse location lookups without contacting an external provider at request time.

The Go module is github.com/alexfalkowski/standort/v3. Go consumers migrating from /v2 must update their imports to /v3. The protobuf packages and RPC routes retain their v1 and v2 names.

🚀 Quickstart

Install the Go version specified in go.mod and Ruby with Bundler. The bin submodule uses GitHub SSH, so configure GitHub SSH access before cloning submodules. Run these commands from the root of a clone named standort.

git submodule sync
git submodule update --init
make dep
make build
./standort server -config file:test/.config/server.yaml

If Go reports inconsistent vendoring, rerun make dep. The development config uses HTTP port 11000 and gRPC port 12000. The local readiness probe is GET http://localhost:11000/standort/readyz.

In another terminal, use curl to look up an IP address.

curl -sS \
  -X POST \
  -H 'Content-Type: application/json' \
  -d '{"ip":"8.8.8.8"}' \
  http://localhost:11000/standort.v2.Service/GetLocation

The v2 response reports the IP-based country and continent in ip.

📚 Documentation

Report bugs, documentation issues, or feature requests in the GitHub issue tracker.