Arbiter  0.0.0
Classes | Public Member Functions | Static Public Member Functions | List of all members
arbiter::drivers::S3 Class Reference

Amazon S3 driver. More...

#include <arbiter/drivers/s3.hpp>

Inheritance diagram for arbiter::drivers::S3:
arbiter::drivers::Http arbiter::Driver

Classes

class  Auth
 AWS authentication information. More...
 

Public Member Functions

 S3 (http::Pool &pool, const Auth &auth, std::string region="us-east-1", bool sse=false)
 
virtual std::string type () const override
 
virtual std::unique_ptr< std::size_t > tryGetSize (std::string path) const override
 
virtual void put (std::string path, const std::vector< char > &data, http::Headers headers, http::Query query) const override
 
- Public Member Functions inherited from arbiter::drivers::Http
 Http (http::Pool &pool)
 
virtual void put (std::string path, const std::vector< char > &data) const final override
 
std::string get (std::string path, http::Headers headers, http::Query query) const
 
std::unique_ptr< std::string > tryGet (std::string path, http::Headers headers, http::Query query) const
 
std::vector< char > getBinary (std::string path, http::Headers headers, http::Query query) const
 
std::unique_ptr< std::vector< char > > tryGetBinary (std::string path, http::Headers headers, http::Query query) const
 
void put (std::string path, const std::string &data, http::Headers headers, http::Query query) const
 
- Public Member Functions inherited from arbiter::Driver
std::string get (std::string path) const
 
std::unique_ptr< std::string > tryGet (std::string path) const
 
std::vector< char > getBinary (std::string path) const
 
std::unique_ptr< std::vector< char > > tryGetBinary (std::string path) const
 
virtual bool isRemote () const
 
std::size_t getSize (std::string path) const
 
void put (std::string path, const std::string &data) const
 
std::vector< std::string > resolve (std::string path, bool verbose=false) const
 Resolve a possibly globbed path. More...
 

Static Public Member Functions

static std::unique_ptr< S3create (http::Pool &pool, const Json::Value &json)
 
static std::string extractProfile (const Json::Value &json)
 
- Static Public Member Functions inherited from arbiter::drivers::Http
static std::unique_ptr< Httpcreate (http::Pool &pool, const Json::Value &json)
 

Additional Inherited Members

- Protected Member Functions inherited from arbiter::drivers::Http
http::Response internalGet (std::string path, http::Headers headers=http::Headers(), http::Query query=http::Query()) const
 
http::Response internalPut (std::string path, const std::vector< char > &data, http::Headers headers=http::Headers(), http::Query query=http::Query()) const
 
http::Response internalHead (std::string path, http::Headers headers=http::Headers(), http::Query query=http::Query()) const
 
http::Response internalPost (std::string path, const std::vector< char > &data, http::Headers headers=http::Headers(), http::Query query=http::Query()) const
 

Detailed Description

Amazon S3 driver.

Member Function Documentation

std::unique_ptr< S3 > arbiter::drivers::S3::create ( http::Pool &  pool,
const Json::Value &  json 
)
static

Try to construct an S3 Driver. Searches json primarily for the keys access and hidden to construct an S3::Auth. If not found, common filesystem locations and then the environment will be searched (see S3::Auth::find).

Server-side encryption may be enabled by setting key sse to true in json.

void arbiter::drivers::S3::put ( std::string  path,
const std::vector< char > &  data,
http::Headers  headers,
http::Query  query 
) const
overridevirtual

Inherited from Drivers::Http.

Reimplemented from arbiter::drivers::Http.

std::unique_ptr< std::size_t > arbiter::drivers::S3::tryGetSize ( std::string  path) const
overridevirtual

By default, performs a HEAD request and returns the contents of the Content-Length header.

Reimplemented from arbiter::drivers::Http.

virtual std::string arbiter::drivers::S3::type ( ) const
inlineoverridevirtual

Returns a string identifying this driver type, which should be unique among all other drivers. Paths that begin with the substring <type>:// will be routed to this driver. For example, fs, s3, or http.

Note
Derived classes must override.

Reimplemented from arbiter::drivers::Http.


The documentation for this class was generated from the following files: