View Source Eakins.Storage behaviour (eakins v0.0.1)

The storage interface for uploaded images

Link to this section Summary

Link to this section Types

@type image() :: Eakins.Image.Stored.t()
@type parent_schema() :: Ecto.Schema.schema()

Link to this section Callbacks

Link to this callback

delete(parent_schema, image)

View Source
@callback delete(parent_schema(), image()) :: :ok | {:error, term()}
@callback delete_all() :: :ok | {:error, term()}
Link to this callback

exists?(parent_schema, image)

View Source
@callback exists?(parent_schema(), image()) :: boolean()
Link to this callback

store(parent_schema, image)

View Source
@callback store(parent_schema(), image()) :: {:ok, image()} | {:error, term()}

Link to this section Functions