Astarte.Core.InterfaceDescriptor (astarte_core v1.0.5) View Source

Link to this section Summary

Functions

Deserializes an %InterfaceDescriptor{} from db_result. db_result can be a keyword list or a map.

Deserializes an %InterfaceDescriptor{} from db_result. db_result can be a keyword list or a map.

Builds an %InterfaceDescriptor{} starting from an %Interface{}

Link to this section Functions

Link to this function

from_db_result(db_result)

View Source

Deserializes an %InterfaceDescriptor{} from db_result. db_result can be a keyword list or a map.

Returns the {:ok, %InterfaceDescriptor{}} on success, {:error, :invalid_interface_descriptor_data} on failure.

Link to this function

from_db_result!(db_result)

View Source

Deserializes an %InterfaceDescriptor{} from db_result. db_result can be a keyword list or a map.

Returns the %InterfaceDescriptor{} on success, raises on failure

Link to this function

from_interface(interface)

View Source

Builds an %InterfaceDescriptor{} starting from an %Interface{}

Returns the %InterfaceDescriptor{}