Astarte.Core.Mapping (astarte_core v1.1.1) View Source

This module handles Interface Mappings using Ecto Changesets

Link to this section Summary

Functions

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

Check if token is a placeholder.

Removes all placeholders from an endpoint.

Link to this section Functions

Link to this function

changeset(mapping, params, opts)

View Source
Link to this function

from_db_result!(db_result)

View Source

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

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

Specs

is_placeholder?(String.t()) :: boolean()

Check if token is a placeholder.

Link to this function

normalize_endpoint(endpoint)

View Source

Specs

normalize_endpoint(String.t()) :: String.t()

Removes all placeholders from an endpoint.