Copyright © 2022 Marc Worrell
Authors: Marc Worrell.
acl_type() = private | public_read | public_read_write | authenticated_read | bucket_owner_read | bucket_owner_full_control
config() = {Username::binary(), Password::binary()}
put_data() = {data, binary()} | {filename, pos_integer(), file:filename_all()} | {filename, file:filename_all()}
put_opt() = {acl, acl_type()} | {content_type, string()}
put_opts() = [put_opt()]
queue_reply() = {ok, any(), pid()} | {error, {already_started, pid()}}
ready_fun() = undefined | {atom(), atom(), list()} | function() | pid()
stream_fun() = {atom(), atom(), list()} | function() | pid()
sync_reply() = ok | {error, enoent | forbidden | term()}
url() = binary() | string()
create_bucket/2 | Create a private bucket (aka directory) at the URL. |
create_bucket/3 | Create a bucket at the URL, with acl options. |
delete/2 | Delete the file at the url. |
get/2 | Fetch the data at the url. |
put/3 | Put a binary or file to the given url. |
put/4 | Put a binary or file to the given url. |
queue_delete/2 | Async delete a file on S3. |
queue_delete/3 | Async delete a file on S3, call ready_fun when ready. |
queue_delete_id/4 | Queue a named file deletion process, call ready_fun when ready. |
queue_get/3 | Queue a file dowloader and call ready_fun when finished. |
queue_get_id/4 | Queue a named file dowloader and call ready_fun when finished. |
queue_put/3 | Queue a file uploader. |
queue_put/4 | Queue a file uploader and call ready_fun when finished. |
queue_put/5 | Queue a file uploader and call ready_fun when finished. |
queue_put_id/5 | Start a named file uploader. |
queue_stream/3 | Queue a file downloader that will stream chunks to the given stream_fun. |
queue_stream_id/4 | Queue a named file downloader that will stream chunks to the given stream_fun. |
stream/3 | Stream the contents of the url to the function, callback or to the httpc-streaming Pid. |
create_bucket(Config::config(), Url::url()) -> sync_reply()
Create a private bucket (aka directory) at the URL.
create_bucket(Config::config(), Url::url(), Opts::put_opts()) -> sync_reply()
Create a bucket at the URL, with acl options.
delete(Config::config(), Url::url()) -> sync_reply()
Delete the file at the url.
get(Config::config(), Url::url()) -> {ok, ContentType::binary(), Data::binary()} | {error, enoent | forbidden | term()}
Fetch the data at the url.
put(Config::config(), Url::url(), Payload::put_data()) -> sync_reply()
Put a binary or file to the given url.
put(Config::config(), Url::url(), X3::put_data(), Opts::put_opts()) -> sync_reply()
Put a binary or file to the given url. Set options for acl. Ensures that the directory of the file is present by recursively creating the sub directories.
queue_delete(Config::config(), Url::url()) -> queue_reply()
Async delete a file on S3
queue_delete(Config::config(), Url::url(), ReadyFun::ready_fun()) -> queue_reply()
Async delete a file on S3, call ready_fun when ready.
queue_delete_id(JobId::any(), Config::config(), Url::url(), ReadyFun::ready_fun()) -> queue_reply()
Queue a named file deletion process, call ready_fun when ready.
queue_get(Config::config(), Url::url(), ReadyFun::ready_fun()) -> queue_reply()
Queue a file dowloader and call ready_fun when finished.
queue_get_id(JobId::any(), Config::config(), Url::url(), ReadyFun::ready_fun()) -> queue_reply()
Queue a named file dowloader and call ready_fun when finished. Names must be unique, duplicates are refused with {error, {already_started, _}}.
queue_put(Config::config(), Url::url(), What::put_data()) -> queue_reply()
Queue a file uploader. The data can be a binary or a filename.
queue_put(Config::config(), Url::url(), What::put_data(), ReadyFun::ready_fun()) -> queue_reply()
Queue a file uploader and call ready_fun when finished.
queue_put(Config::config(), Url::url(), What::put_data(), ReadyFun::ready_fun(), Opts::put_opts()) -> queue_reply()
Queue a file uploader and call ready_fun when finished. Options include the acl setting and content_type for the file.
queue_put_id(JobId::any(), Config::config(), Url::url(), What::put_data(), ReadyFun::ready_fun()) -> queue_reply()
Start a named file uploader. Names must be unique, duplicates are refused with {error, {already_started, _}}.
queue_stream(Config::config(), Url::url(), StreamFun::stream_fun()) -> queue_reply()
Queue a file downloader that will stream chunks to the given stream_fun. The default block size for the chunks is 64KB.
queue_stream_id(JobId::any(), Config::config(), Url::url(), StreamFun::stream_fun()) -> queue_reply()
Queue a named file downloader that will stream chunks to the given stream_fun. The default block size for the chunks is 64KB.
stream(Config::config(), Url::url(), Fun::stream_fun() | {any(), pid()}) -> sync_reply()
Stream the contents of the url to the function, callback or to the httpc-streaming Pid.
Generated by EDoc