locus_mmdb_data_raw (locus v2.3.15)

Copy Markdown View Source

API for working with MMDB - raw data representation (it preserves the original type for when it's necessary to distinguish between e.g. {uint32, 0} and {uint16, 0}, which locus_mmdb_data does not allow for.)

See MaxMind DB File Format Specification.

Summary

Types

array()

-type array() :: {array, [value()]}.

boolean_()

-type boolean_() :: {boolean, locus_mmdb_data:boolean_()}.

bytes()

-type bytes() :: {bytes, locus_mmdb_data:bytes()}.

double()

-type double() :: {double, locus_mmdb_data:double()}.

float_()

-type float_() :: {float, locus_mmdb_data:float_()}.

int32()

-type int32() :: {int32, locus_mmdb_data:int32()}.

map_()

-type map_() :: {map, #{locus_mmdb_data:utf8_string() => value()}}.

uint16()

-type uint16() :: {uint16, locus_mmdb_data:uint16()}.

uint32()

-type uint32() :: {uint32, locus_mmdb_data:uint32()}.

uint64()

-type uint64() :: {uint64, locus_mmdb_data:uint64()}.

uint128()

-type uint128() :: {uint128, locus_mmdb_data:uint128()}.

utf8_string()

-type utf8_string() :: {utf8_string, locus_mmdb_data:utf8_string()}.

value()

-type value() ::
          utf8_string() |
          double() |
          bytes() |
          uint16() |
          uint32() |
          map_() |
          int32() |
          uint64() |
          uint128() |
          array() |
          boolean_() |
          float_().

value_tag()

-type value_tag() ::
          pointer | utf8_string | double | bytes | uint16 | uint32 | map | int32 | uint64 | uint128 |
          array | boolean | float.