View Source CozyPublisher.Adapter behaviour (CozyPublisher v2.0.0)
The specification of adapters.
Link to this section Summary
Types
The attributes parsed from file.
The body parsed from file.
The content of file.
The option for current adapter.
The path of file.
Callbacks
Prepares for future works, such as
Parses the content of files.
Transforms the parsed body.
Link to this section Types
Link to this section Callbacks
@callback init(opts()) :: :ok
Prepares for future works, such as:
- checking required dependencies
- starting necessary applications
Parses the content of files.
It must return:
- a 2 element tuple with attributes and body -
{attrs, body}
a list of 2 element tuple with attributes and body -
[{attrs, body} | _]
Transforms the parsed body.