Packages

ISO/HL7 FHIR Application Server

Current section

Files

Jump to
hl7 lib validation loader.ex
Raw

lib/validation/loader.ex

defmodule Xema.Loader do
@moduledoc """
The behaviour for loaders.
For the loader configuration see "[Configure a loader](loader.html)".
"""
@doc """
This function expected an URI, to fetch the required data to create a schema.
"""
@callback fetch(uri :: URI.t()) :: {:ok, any} | {:error, any}
defp impl, do: Application.get_env(:hl7, :loader)
def fetch(uri), do: impl().fetch(uri)
end