nomad v0.6.0 NomadStorage behaviour
Summary
Callbacks
Creates a storage (a bucket) for the chosen cloud provider’s storage service
Creates a storage (a bucket) for the chosen cloud provider’s storage service in the desired ‘region’
Creates a storage (a bucket) for the chosen cloud provider’s storage service in the desired ‘region’
Deletes the file in ‘item’ in the given ‘storage’
Deletes the given ‘storage’. Usually the storage must be empty before deletion
Downloads the given ‘item’ in the given ‘storage’
Retrieves the given ‘item’s ACL in the given ‘storage’
Returns the given ‘storage’ ACL
Returns the given ‘storage’ class
Returns the given ‘storage’ region
Lists the available classes for the storages
Lists all the available files in the given ‘storage’
Lists all the available storages for the chosen cloud provider’s storage service
Uploads the file in ‘filepath’ to the given ‘storage’
Uploads the file in ‘filepath’ to the given ‘storage’ and stores it in the specified ‘storage_path’. The necessaries directories in ‘storage_path’ will be created if they do not exist
Callbacks
Specs
create_storage(binary) :: :ok | binary
Creates a storage (a bucket) for the chosen cloud provider’s storage service.
Specs
create_storage(binary, binary) :: :ok | binary
Creates a storage (a bucket) for the chosen cloud provider’s storage service in the desired ‘region’.
Specs
create_storage(binary, binary, binary) ::
:ok |
binary
Creates a storage (a bucket) for the chosen cloud provider’s storage service in the desired ‘region’.
Specs
delete_item(binary, binary) :: :ok | binary
Deletes the file in ‘item’ in the given ‘storage’.
Specs
delete_storage(binary) :: :ok | binary
Deletes the given ‘storage’. Usually the storage must be empty before deletion.
Specs
get_item(binary, binary) :: :ok | binary
Downloads the given ‘item’ in the given ‘storage’.
Specs
get_item_acl(binary, binary) ::
[{binary, binary}] |
binary
Retrieves the given ‘item’s ACL in the given ‘storage’.
Specs
get_storage_acl(binary) ::
[{binary, binary}] |
binary
Returns the given ‘storage’ ACL.
Specs
get_storage_class(binary) :: binary
Returns the given ‘storage’ class.
Specs
get_storage_region(binary) :: binary
Returns the given ‘storage’ region.
Specs
list_items(binary) :: [binary] | binary
Lists all the available files in the given ‘storage’.
Specs
list_storages :: [binary] | binary
Lists all the available storages for the chosen cloud provider’s storage service.
Specs
put_item(binary, binary) :: :ok | binary
Uploads the file in ‘filepath’ to the given ‘storage’.