Sedex.Storage behaviour (sedex v1.0.0) View Source

Sedex Storage Interface

Link to this section Summary

Link to this section Types

Specs

t() :: Sedex.Storage.Filesystem | Sedex.Storage.Minio

Link to this section Callbacks

Specs

cleanup(directory :: Path.t(), id :: String.t()) :: :ok
Link to this callback

read(filename, directory)

View Source

Specs

read(filename :: Path.t(), directory :: Path.t()) ::
  {:ok, content :: binary()} | {:error, :not_found}
Link to this callback

store(filename, directory, content)

View Source

Specs

store(filename :: Path.t(), directory :: Path.t(), content :: binary()) :: :ok