C++ edjLibrary SDK
Classes | Functions
edjx::storage Namespace Reference

Classes

struct  FileAttributes
 Represents the attributes associated with a stored file. More...
 
struct  StorageResponse
 Response to the [edjx::storage::get] request. More...
 

Functions

edjx::error::StorageError get (StorageResponse &result, const std::string &bucket_id, const std::string &file_name)
 Returns a file from the EDJX Object Store. More...
 
edjx::error::StorageError put (StorageResponse &result, const std::string &bucket_id, const std::string &file_name, const std::string &properties, const std::vector< uint8_t > contents)
 Uploads a file to the EDJX Object Store. More...
 
edjx::error::StorageError remove (StorageResponse result, const std::string &bucket_id, const std::string &file_name)
 Deletes the given file from the EDJX Object Store. More...
 
edjx::error::StorageError get_attributes (FileAttributes &result, const std::string &bucket_id, const std::string &file_name)
 Returns attributes associated with the given file from the EDJX Object Store. More...
 
edjx::error::StorageError set_attributes (StorageResponse &result, const std::string &bucket_id, const std::string &file_name, const FileAttributes &attributes)
 Sets the attributes associated with the given file. More...
 

Function Documentation

◆ get()

edjx::error::StorageError edjx::storage::get ( StorageResponse result,
const std::string &  bucket_id,
const std::string &  file_name 
)

Returns a file from the EDJX Object Store.

Parameters
resultResult File
bucket_idBucket ID
file_nameFile name
Returns
edjx::storage::StorageError::Success on success, some other value on failure

◆ get_attributes()

edjx::error::StorageError edjx::storage::get_attributes ( FileAttributes result,
const std::string &  bucket_id,
const std::string &  file_name 
)

Returns attributes associated with the given file from the EDJX Object Store.

Parameters
resultResult of the operation
bucket_idBucket ID
file_nameFile name
Returns
edjx::error::StorageError::Success on success, some other value on failure

◆ put()

edjx::error::StorageError edjx::storage::put ( StorageResponse result,
const std::string &  bucket_id,
const std::string &  file_name,
const std::string &  properties,
const std::vector< uint8_t >  contents 
)

Uploads a file to the EDJX Object Store.

Parameters
resultResult of the operation
bucket_idBucket ID
file_nameFile name
propertiesProperties
contentsFile content
Returns
edjx::error::StorageError::Success on success, some other value on failure

◆ remove()

edjx::error::StorageError edjx::storage::remove ( StorageResponse  result,
const std::string &  bucket_id,
const std::string &  file_name 
)

Deletes the given file from the EDJX Object Store.

Parameters
resultResult of the operation
bucket_idBucket ID
file_nameFile Name
Returns
edjx::error::StorageError::Success on success, some other value on failure

◆ set_attributes()

edjx::error::StorageError edjx::storage::set_attributes ( StorageResponse result,
const std::string &  bucket_id,
const std::string &  file_name,
const FileAttributes attributes 
)

Sets the attributes associated with the given file.

This setting replaces the existing attributes.

Parameters
resultResult of the operation
bucket_idBucket ID
file_nameFile name
attributesFile attributes
Returns
edjx::error::StorageError::Success on success, some other value on failure