1
0
Fork 0
mirror of https://framagit.org/framasoft/mobilizon.git synced 2024-12-23 16:33:28 +00:00
mobilizon/lib/federation/activity_stream/converter/converter.ex

14 lines
395 B
Elixir
Raw Normal View History

defmodule Mobilizon.Federation.ActivityStream.Converter do
@moduledoc """
2019-09-22 16:29:13 +00:00
Converter behaviour.
2019-09-22 16:29:13 +00:00
This module allows to convert from ActivityStream format to our own internal
one, and back.
"""
@type model_data :: map()
@callback as_to_model_data(as_data :: ActivityStream.t()) :: model_data() | {:error, any()}
@callback model_to_as(model :: struct()) :: ActivityStream.t()
end