Protocol definitions for the geo module.
FC/IS rule: protocols are interfaces — no implementation here. Adapters (shell layer) implement these protocols.
Protocol definitions for the geo module. FC/IS rule: protocols are interfaces — no implementation here. Adapters (shell layer) implement these protocols.
Contract for geo result caching.
The default implementation (DbGeoCache) persists results in a
geo_cache database table. An atom-backed implementation is used
in tests.
Contract for geo result caching. The default implementation (DbGeoCache) persists results in a `geo_cache` database table. An atom-backed implementation is used in tests.
(cache-lookup this query-hash)Look up a cached geocoding result by its query hash.
Args: query-hash - SHA-256 hex string (produced by address/query-hash)
Returns: GeoResult map with :cached? true if found and not expired, else nil.
Look up a cached geocoding result by its query hash. Args: query-hash - SHA-256 hex string (produced by address/query-hash) Returns: GeoResult map with :cached? true if found and not expired, else nil.
(cache-store! this query-hash result)Persist a geocoding result in the cache.
Args: query-hash - SHA-256 hex string result - GeoResult map to store
Returns: nil (side-effect only).
Persist a geocoding result in the cache. Args: query-hash - SHA-256 hex string result - GeoResult map to store Returns: nil (side-effect only).
Contract for geocoding provider adapters.
Implementations live in shell/adapters/:
Contract for geocoding provider adapters. Implementations live in shell/adapters/: - NominatimAdapter (OpenStreetMap, free, rate-limited to 1 req/sec) - GoogleAdapter (Google Maps Geocoding API, requires API key) - MapboxAdapter (Mapbox Geocoding API, requires access token)
(geocode this query)Forward geocode an address query to coordinates.
Args: query - AddressQuery map with optional :address :postcode :city :country
Returns: GeoResult map on success, nil on no results or error.
Forward geocode an address query to coordinates. Args: query - AddressQuery map with optional :address :postcode :city :country Returns: GeoResult map on success, nil on no results or error.
(reverse-geocode this point)Reverse geocode coordinates to an address.
Args: point - GeoPoint map with :lat and :lng
Returns: GeoResult map on success, nil on no results or error.
Reverse geocode coordinates to an address. Args: point - GeoPoint map with :lat and :lng Returns: GeoResult map on success, nil on no results or error.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |