LastCrusader.Micropub.Backend behaviour (Last Crusader v0.14.0)

Copy Markdown View Source

Behaviour for git backends used to persist Hugo post files.

Summary

Callbacks

get_file(filename)

@callback get_file(filename :: String.t()) :: {:ok, String.t()} | {:ko, atom(), any()}

new_file(filename, content)

@callback new_file(filename :: String.t(), content :: String.t()) ::
  {:ok, :content_created} | {:ko, atom(), any()}

update_file(filename, content)

@callback update_file(filename :: String.t(), content :: String.t()) ::
  {:ok, :content_updated} | {:ko, atom(), any()}