View Source NervesHubLink.Extensions.Geo.Resolver behaviour (nerves_hub_link v2.6.0)

Summary

Types

Formatted error response from a failed location resolution

Location information from a successful location resolution

Supported responses from resolve_location/0

Types

error_information()

@type error_information() :: %{error_code: String.t(), error_description: String.t()}

Formatted error response from a failed location resolution

location_information()

@type location_information() :: %{
  :latitude => float(),
  :longitude => float(),
  :source => String.t(),
  optional(:accuracy) => pos_integer()
}

Location information from a successful location resolution

location_responses()

@type location_responses() ::
  {:ok, location_information()} | {:error, error_information()}

Supported responses from resolve_location/0

Callbacks

resolve_location()

@callback resolve_location() :: location_responses()