2020-01-22 21:40:40 +00:00
|
|
|
defmodule Mobilizon.Federation.ActivityStream.Converter do
|
2019-05-22 12:12:11 +00:00
|
|
|
@moduledoc """
|
2019-09-22 16:29:13 +00:00
|
|
|
Converter behaviour.
|
2019-05-22 12:12:11 +00:00
|
|
|
|
2019-09-22 16:29:13 +00:00
|
|
|
This module allows to convert from ActivityStream format to our own internal
|
|
|
|
one, and back.
|
2019-05-22 12:12:11 +00:00
|
|
|
"""
|
2019-07-30 14:40:59 +00:00
|
|
|
|
2020-07-09 15:24:28 +00:00
|
|
|
@type model_data :: map()
|
|
|
|
|
|
|
|
@callback as_to_model_data(as_data :: ActivityStream.t()) :: model_data()
|
|
|
|
@callback model_to_as(model :: struct()) :: ActivityStream.t()
|
2019-07-30 14:40:59 +00:00
|
|
|
end
|