aether::aws_bucket Class Reference

makes a connection to aws to retrieve objects from an s3 bucket the sercurity is configure using the following environemt variables: More...

#include <backends.hh>

Public Member Functions

 aws_bucket (const std::string &bucket_name, const std::string &access_key_id, const std::string &secret_key, const std::string &region)
 constructor More...
 
std::vector< char > fetch (const std::string object_name)
 fetches an object from the bucket and returns the data, if it fails returns an empty vector and error_msg is set More...
 
std::string get_error () const
 

Detailed Description

makes a connection to aws to retrieve objects from an s3 bucket the sercurity is configure using the following environemt variables:

Constructor & Destructor Documentation

aether::aws_bucket::aws_bucket ( const std::string &  bucket_name,
const std::string &  access_key_id,
const std::string &  secret_key,
const std::string &  region 
)

constructor

Parameters
[in]bucket_name: name of the bucket to be accessed
[in]access_key_id: id of the key that will be used
[in]secret_key: key to the bucket
[in]region: region from which the connection is being made

Member Function Documentation

std::vector<char> aether::aws_bucket::fetch ( const std::string  object_name)

fetches an object from the bucket and returns the data, if it fails returns an empty vector and error_msg is set

Parameters
[in]object_name: object to be fetched
Returns
returns a vector with the data, empty if it fails
std::string aether::aws_bucket::get_error ( ) const