Geolix Test Data Provider v0.5.1 Geolix.TestData.MMDB2Fixture View Source

MMDB2 Fixture Provider (Downloader)

Link to this section Summary

Functions

Returns the contents of a test fixture.

Downloads a test fixture from the MaxMind MMDB2 specification repository.

Link to this section Functions

Specs

contents(String.t(), Path.t()) :: binary()

Returns the contents of a test fixture.

If the fixture is not found in the given path a download will be done to make it available.

Specs

download(String.t(), Path.t()) :: :ok | {:error, term()}

Downloads a test fixture from the MaxMind MMDB2 specification repository.

Usage

iex> download("MaxMind-DB-test-decoder.mmdb", "/storage/path/for/fixture")
:ok