Libmention.StorageApi behaviour (libmention v0.1.2)
The behaviour for required for storing a webmention.
By default ets
is used, but implementing this behaviour
and setting your configuration value to that implementation,
you can use any storage backend you want.
Link to this section Summary
Callbacks
This is called after a webmention is sent.
This is called when the content of a webmention (sha) changes and we've already and we sent another one.
Link to this section Types
Link to this type
entity()
@type entity() :: %{ source_url: String.t(), target_url: String.t(), endpoint: String.t(), status: :sent | :not_found | :failed | :pending, sha: String.t() }
The shape of the webmention passed to the save/update/exists? calls
Link to this section Callbacks
Link to this callback
exists?(entity)
Link to this callback
get(arg1)
Link to this callback
save(entity)
This is called after a webmention is sent.
Saving the webmention result in storage means that we can make better decisions about if we want to send another webmention or not.
Link to this callback
update(entity)
This is called when the content of a webmention (sha) changes and we've already and we sent another one.