View Source Geolix.TestData.MMDB2Fixture (Geolix Test Data Provider v0.6.0)

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

@spec 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.

Link to this function

download(fixture, path, version \\ "main")

View Source
@spec download(String.t(), Path.t(), String.t()) :: :ok | {:error, term()}

Downloads a test fixture from the MaxMind MMDB2 specification repository.

Optional third parameter defines the version of the fixture to download. Defaults to the main branch.

usage

Usage

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

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