View Source Exshome.Settings behaviour (Exshome - Elixir Smart Home v0.1.7)

Settings module.

Link to this section Summary

Link to this section Callbacks

@callback fields() :: term()

Link to this section Functions

@spec allowed_values(module()) :: map()
@spec available_modules() :: MapSet.t(atom())
@spec changeset(struct()) :: Ecto.Changeset.t()
@spec changeset(module(), map()) :: Ecto.Changeset.t()
@spec default_values(module()) :: map()
@spec get_module_name(module()) :: String.t()
@spec get_settings(arg :: module()) :: Ecto.Schema.t()
@spec save_settings(Ecto.Schema.t()) :: Ecto.Schema.t() | {:error, Ecto.Changeset.t()}
@spec valid_changes?(struct()) :: {:ok, map()} | {:error, Ecto.Changeset.t()}