2019-03-12 11:52:28 +01:00
|
|
|
defmodule Mobilizon.Service.Geospatial do
|
|
|
|
@moduledoc """
|
2019-09-22 16:26:23 +02:00
|
|
|
Module to load the service adapter defined inside the configuration.
|
2019-03-12 11:52:28 +01:00
|
|
|
|
2019-09-22 16:26:23 +02:00
|
|
|
See `Mobilizon.Service.Geospatial.Provider`.
|
2019-03-12 11:52:28 +01:00
|
|
|
"""
|
|
|
|
|
|
|
|
@doc """
|
2019-09-22 16:26:23 +02:00
|
|
|
Returns the appropriate service adapter.
|
2019-03-12 11:52:28 +01:00
|
|
|
|
2019-09-22 16:26:23 +02:00
|
|
|
According to the config behind
|
|
|
|
`config :mobilizon, Mobilizon.Service.Geospatial,
|
|
|
|
service: Mobilizon.Service.Geospatial.Module`
|
2019-03-12 11:52:28 +01:00
|
|
|
"""
|
2019-09-22 16:26:23 +02:00
|
|
|
@spec service :: module
|
|
|
|
def service, do: get_in(Application.get_env(:mobilizon, __MODULE__), [:service])
|
2019-03-12 11:52:28 +01:00
|
|
|
end
|