package mmdb

  1. Overview
  2. Docs

Module Mmdb.CoordinatesSource

Interface for retrieving coordinate values from the database

include module type of Coordinates
Sourcetype t = {
  1. longitude : float;
  2. latitude : float;
}
include VALUE_TYPE with type answer = Coordinates.t
Sourcemodule Query : sig ... end
Sourcetype answer = Coordinates.t

The type of answer returned by a query

Sourceval from_db : t -> Ip.t -> Query.t -> (answer option, Fetch_error.t) result

Fetches a value directly from the database

Sourceval from_ip_data : ip_data -> Query.t -> (answer option, Fetch_value_error.t) result

Fetches a value from an ip_data reference

Sourceval location : Query.t

Query that determines the geographical location of an IP