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

KeyTypeDescription
:nameatomField name
:tagintegerTLV tag byte
:typeatom:string, :integer, :date, :boolean, :enum, :binary
:encodingatom:raw, :c40, :utf8, :date, :integer, :boolean
:required?booleanWhether field is mandatory
:sensitive?booleanWhether field contains sensitive data
:max_lengthintegerMaximum byte length after encoding
:valueslistAllowed values for :enum type
:defaulttermDefault 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

encode_all_features(document_data, opts)

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