mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-25 09:22:22 +00:00
c51115bdbe
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
16 lines
453 B
Elixir
16 lines
453 B
Elixir
defmodule Mobilizon.Service.ActivityPub.Converter do
|
|
@moduledoc """
|
|
Converter behaviour
|
|
|
|
This module allows to convert from ActivityStream format to our own internal one, and back
|
|
"""
|
|
@callback as_to_model_data(map()) :: map()
|
|
@callback model_to_as(struct()) :: map()
|
|
end
|
|
|
|
defprotocol Mobilizon.Service.ActivityPub.Convertible do
|
|
@type activitystreams :: map()
|
|
|
|
@spec model_to_as(t) :: activitystreams
|
|
def model_to_as(convertible)
|
|
end
|