standort

command module
v3.25.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2026 License: MIT Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Gopher CircleCI codecov Go Reference

📍 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

  • API guide covers v1 and v2 behavior, batch lookups, errors, and gRPC and HTTP examples.
  • Server configuration and health covers required configuration, health probes, and metrics.
  • Development covers live reload, tests, CI checks, and protobuf generation.
  • Lookup assets covers dataset accuracy limits, licensing, and how to refresh the embedded data.

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

Documentation

Overview

Package main provides the standort server command-line entrypoint.

The executable registers the `server` command, which starts the service using the dependency-injection graph composed under `internal/cmd`.

Directories

Path Synopsis
api
Package assets provides access to standort's embedded runtime data files.
Package assets provides access to standort's embedded runtime data files.
internal
api/location
Package location provides transport-facing location lookup helpers for the API layers.
Package location provides transport-facing location lookup helpers for the API layers.
api/v1
Package v1 wires the Standort API v1 transport layer into the application.
Package v1 wires the Standort API v1 transport layer into the application.
api/v1/location
Package location adapts domain lookup results into v1 responses.
Package location adapts domain lookup results into v1 responses.
api/v1/transport/grpc
Package grpc provides the Standort API v1 gRPC transport implementation.
Package grpc provides the Standort API v1 gRPC transport implementation.
api/v1/transport/http
Package http provides the Standort API v1 HTTP transport wiring.
Package http provides the Standort API v1 HTTP transport wiring.
api/v2
Package v2 wires the Standort API v2 transport layer into the application.
Package v2 wires the Standort API v2 transport layer into the application.
api/v2/assets
Package assets builds v2 responses that describe embedded lookup assets.
Package assets builds v2 responses that describe embedded lookup assets.
api/v2/location
Package location adapts transport-facing lookup results into v2 responses.
Package location adapts transport-facing lookup results into v2 responses.
api/v2/transport/grpc
Package grpc provides the Standort API v2 gRPC transport implementation.
Package grpc provides the Standort API v2 gRPC transport implementation.
api/v2/transport/http
Package http provides the Standort API v2 HTTP transport wiring.
Package http provides the Standort API v2 HTTP transport wiring.
assets
Package assets describes embedded lookup asset files for internal consumers.
Package assets describes embedded lookup asset files for internal consumers.
cmd
Package cmd contains the standort CLI command wiring.
Package cmd contains the standort CLI command wiring.
config
Package config defines the standort service configuration model and provides dependency-injection wiring for loading and exposing configuration.
Package config defines the standort service configuration model and provides dependency-injection wiring for loading and exposing configuration.
diagnostics
Package diagnostics carries safe lookup failure diagnostics to transports.
Package diagnostics carries safe lookup failure diagnostics to transports.
health
Package health wires standort's health subsystem into the application.
Package health wires standort's health subsystem into the application.
location
Package location contains standort's domain logic for resolving a location (country and continent) from different kinds of inputs.
Package location contains standort's domain logic for resolving a location (country and continent) from different kinds of inputs.
location/continent
Package continent provides a normalization map for continent identifiers.
Package continent provides a normalization map for continent identifiers.
location/country
Package country selects the default country lookup provider for standort.
Package country selects the default country lookup provider for standort.
location/country/provider
Package provider defines the country lookup contract used by the location domain service.
Package provider defines the country lookup contract used by the location domain service.
location/country/provider/gountries
Package gountries adapts github.com/pariz/gountries to standort's country provider contract.
Package gountries adapts github.com/pariz/gountries to standort's country provider contract.
location/ip
Package ip selects the default IP lookup provider for standort.
Package ip selects the default IP lookup provider for standort.
location/ip/provider
Package provider defines the IP lookup contract used by the location domain service.
Package provider defines the IP lookup contract used by the location domain service.
location/ip/provider/geoip2
Package geoip2 adapts the embedded GeoIP2 country database to standort's IP provider contract.
Package geoip2 adapts the embedded GeoIP2 country database to standort's IP provider contract.
location/orb
Package orb selects the default latitude/longitude lookup provider for standort.
Package orb selects the default latitude/longitude lookup provider for standort.
location/orb/provider
Package provider defines the latitude/longitude lookup contract used by the location domain service.
Package provider defines the latitude/longitude lookup contract used by the location domain service.
location/orb/provider/rtree
Package rtree implements point-in-polygon lookup with an in-memory R-tree.
Package rtree implements point-in-polygon lookup with an in-memory R-tree.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL