Astarte.Core.Device.decode_device_id

You're seeing just the function decode_device_id, go back to Astarte.Core.Device module for more information.
Link to this function

decode_device_id(encoded_device_id, opts \\ [])

View Source

Specs

decode_device_id(encoded_device_id :: encoded_device_id(), opts :: options) ::
  {:ok, device_id :: device_id()} | {:error, atom()}
when options: [option], option: {:allow_extended_id, boolean()}

Decodes a Base64 url encoded device id and returns it as a 128-bit binary (usable as uuid).

By default, it will fail with {:error, :extended_id_not_allowed} if the size of the encoded device_id is > 128 bit. You can pass allow_extended_id: true as second argument to allow longer device ids (the returned binary will still be 128 bit long, but the function will not return an error and will instead drop the extended id).

Returns {:ok, device_id} or {:error, reason}.