View Source Tempel.Gate behaviour (Tempel v0.2.0)
Summary
Provides macros to creates uploader modules
defmodule MyUploader do
service(persistence: Tempel.Local, variant: Tempel.Variant)
end
Available types:
file()
is structured to match the format of Plug.Uploadfileio()
is structured likefile()
. But instead of the file path it contains the IO data in key:iodata
Link to this section Summary
Types
This type is stuctured like the format of Plug.Upload
fileio()
is structured like file()
. But instead of the file path it contains the IO data in key :iodata
mainly the result from variant generation in Tempel.Variant
This type is the one will be consumed to Tempel.Local
This type is the retun after save from Tempel.Local
through Tempel.Persistence
Callbacks
This function is used to initialize the settings, could be storage path, aws secret key, etc.
Link to this section Types
This type is stuctured like the format of Plug.Upload
fileio()
is structured like file()
. But instead of the file path it contains the IO data in key :iodata
mainly the result from variant generation in Tempel.Variant
This type is the one will be consumed to Tempel.Local
This type is the retun after save from Tempel.Local
through Tempel.Persistence
Link to this section Callbacks
This function is used to initialize the settings, could be storage path, aws secret key, etc.
@callback pipeline(name :: atom(), files :: [file()], opts :: keyword()) :: raw_variant()