ExIcaoVds.Profiles.Generic
(ex_icao_vds v0.3.2)
Copy Markdown
Declarative generic profile. Field definitions are supplied via config or runtime opts rather than a custom module.
Field definition map keys
| Key | Type | Description |
|---|---|---|
:name | atom | Field name |
:tag | integer | TLV tag byte |
:type | atom | :string, :integer, :date, :boolean, :enum, :binary |
:encoding | atom | :raw, :c40, :utf8, :date, :integer, :boolean |
:required? | boolean | Whether field is mandatory |
:sensitive? | boolean | Whether field contains sensitive data |
:max_length | integer | Maximum byte length after encoding |
:values | list | Allowed values for :enum type |
:default | term | Default value when absent |
Summary
Functions
Encode all fields in document_data according to field definitions in opts,
returning an ordered list of Feature structs.
Functions
@spec encode_all_features( map(), keyword() ) :: {:ok, [ExIcaoVds.Feature.t()]} | {:error, ExIcaoVds.Error.t()}
Encode all fields in document_data according to field definitions in opts,
returning an ordered list of Feature structs.