userver: s3api::ClientImpl Class Reference
Loading...
Searching...
No Matches
s3api::ClientImpl Class Reference

#include </data/code/userver/libraries/s3api/src/s3api/clients/client.hpp>

Detailed Description

Implementation of S3 client.

Definition at line 35 of file client.hpp.

+ Inheritance diagram for s3api::ClientImpl:

Public Types

using CiUnorderedMap = ::http::headers::HeaderMap
 
using Meta = CiUnorderedMap
 
using Headers = CiUnorderedMap
 

Public Member Functions

 ClientImpl (std::shared_ptr< S3Connection > s3conn, std::shared_ptr< authenticators::Authenticator > authenticator, std::string bucket)
 
 ClientImpl (std::shared_ptr< S3Connection > s3conn, std::shared_ptr< authenticators::AccessKey > authenticator, std::string bucket)
 
std::string PutObject (std::string_view path, std::string data, const std::optional< Meta > &meta, std::string_view content_type, const std::optional< std::string > &content_disposition, const std::optional< std::vector< Tag > > &tags) const final
 
void DeleteObject (std::string_view path) const final
 
std::optional< std::string > GetObject (std::string_view path, std::optional< std::string > versiong, HeadersDataResponse *headers_data, const HeaderDataRequest &headers_request) const final
 
std::string TryGetObject (std::string_view path, std::optional< std::string > versiong, HeadersDataResponse *headers_data, const HeaderDataRequest &headers_request) const final
 
std::optional< std::string > GetPartialObject (std::string_view path, std::string_view range, std::optional< std::string > versiong, HeadersDataResponse *headers_data, const HeaderDataRequest &headers_request) const final
 
std::string TryGetPartialObject (std::string_view path, std::string_view range, std::optional< std::string > versiong, HeadersDataResponse *headers_data, const HeaderDataRequest &headers_request) const final
 
std::string CopyObject (std::string_view key_from, std::string_view bucket_to, std::string_view key_to, const std::optional< Meta > &meta) final
 
std::string CopyObject (std::string_view key_from, std::string_view key_to, const std::optional< Meta > &meta) final
 
std::optional< HeadersDataResponseGetObjectHead (std::string_view path, const HeaderDataRequest &request) const final
 
std::string GenerateDownloadUrl (std::string_view path, time_t expires, bool use_ssl) const final
 
std::string GenerateDownloadUrlVirtualHostAddressing (std::string_view path, const std::chrono::system_clock::time_point &expires_at, std::string_view protocol) const final
 
std::string GenerateUploadUrlVirtualHostAddressing (std::string_view data, std::string_view content_type, std::string_view path, const std::chrono::system_clock::time_point &expires_at, std::string_view protocol) const final
 
std::optional< std::string > ListBucketContents (std::string_view path, int max_keys, std::string marker, std::string delimiter) const final
 
std::vector< ObjectMetaListBucketContentsParsed (std::string_view path_prefix) const final
 
std::vector< std::string > ListBucketDirectories (std::string_view path_prefix) const final
 
void UpdateConfig (ConnectionCfg &&config) final
 
std::string_view GetBucketName () const final
 

Member Typedef Documentation

◆ CiUnorderedMap

Definition at line 82 of file s3api.hpp.

◆ Headers

Definition at line 84 of file s3api.hpp.

◆ Meta

Definition at line 83 of file s3api.hpp.

Constructor & Destructor Documentation

◆ ClientImpl() [1/2]

s3api::ClientImpl::ClientImpl ( std::shared_ptr< S3Connection > s3conn,
std::shared_ptr< authenticators::Authenticator > authenticator,
std::string bucket )

Definition at line 154 of file client.cpp.

◆ ClientImpl() [2/2]

s3api::ClientImpl::ClientImpl ( std::shared_ptr< S3Connection > s3conn,
std::shared_ptr< authenticators::AccessKey > authenticator,
std::string bucket )

Definition at line 161 of file client.cpp.

Member Function Documentation

◆ CopyObject() [1/2]

std::string s3api::ClientImpl::CopyObject ( std::string_view key_from,
std::string_view bucket_to,
std::string_view key_to,
const std::optional< Meta > & meta )
finalvirtual

Implements s3api::Client.

Definition at line 451 of file client.cpp.

◆ CopyObject() [2/2]

std::string s3api::ClientImpl::CopyObject ( std::string_view key_from,
std::string_view key_to,
const std::optional< Meta > & meta )
finalvirtual

Implements s3api::Client.

Definition at line 489 of file client.cpp.

◆ DeleteObject()

void s3api::ClientImpl::DeleteObject ( std::string_view path) const
finalvirtual

Implements s3api::Client.

Definition at line 199 of file client.cpp.

◆ GenerateDownloadUrl()

std::string s3api::ClientImpl::GenerateDownloadUrl ( std::string_view path,
time_t expires,
bool use_ssl ) const
finalvirtual

Implements s3api::Client.

Definition at line 282 of file client.cpp.

◆ GenerateDownloadUrlVirtualHostAddressing()

std::string s3api::ClientImpl::GenerateDownloadUrlVirtualHostAddressing ( std::string_view path,
const std::chrono::system_clock::time_point & expires_at,
std::string_view protocol ) const
finalvirtual

Implements s3api::Client.

Definition at line 300 of file client.cpp.

◆ GenerateUploadUrlVirtualHostAddressing()

std::string s3api::ClientImpl::GenerateUploadUrlVirtualHostAddressing ( std::string_view data,
std::string_view content_type,
std::string_view path,
const std::chrono::system_clock::time_point & expires_at,
std::string_view protocol ) const
finalvirtual

Implements s3api::Client.

Definition at line 312 of file client.cpp.

◆ GetBucketName()

std::string_view s3api::ClientImpl::GetBucketName ( ) const
finalvirtual

Implements s3api::Client.

Definition at line 172 of file client.cpp.

◆ GetObject()

std::optional< std::string > s3api::ClientImpl::GetObject ( std::string_view path,
std::optional< std::string > versiong,
HeadersDataResponse * headers_data,
const HeaderDataRequest & headers_request ) const
finalvirtual

Implements s3api::Client.

Definition at line 204 of file client.cpp.

◆ GetObjectHead()

std::optional< ClientImpl::HeadersDataResponse > s3api::ClientImpl::GetObjectHead ( std::string_view path,
const HeaderDataRequest & request ) const
finalvirtual

Implements s3api::Client.

Definition at line 270 of file client.cpp.

◆ GetPartialObject()

std::optional< std::string > s3api::ClientImpl::GetPartialObject ( std::string_view path,
std::string_view range,
std::optional< std::string > versiong,
HeadersDataResponse * headers_data,
const HeaderDataRequest & headers_request ) const
finalvirtual

Implements s3api::Client.

Definition at line 235 of file client.cpp.

◆ ListBucketContents()

std::optional< std::string > s3api::ClientImpl::ListBucketContents ( std::string_view path,
int max_keys,
std::string marker,
std::string delimiter ) const
finalvirtual

Implements s3api::Client.

Definition at line 383 of file client.cpp.

◆ ListBucketContentsParsed()

std::vector< ObjectMeta > s3api::ClientImpl::ListBucketContentsParsed ( std::string_view path_prefix) const
finalvirtual

Implements s3api::Client.

Definition at line 392 of file client.cpp.

◆ ListBucketDirectories()

std::vector< std::string > s3api::ClientImpl::ListBucketDirectories ( std::string_view path_prefix) const
finalvirtual

Implements s3api::Client.

Definition at line 420 of file client.cpp.

◆ PutObject()

std::string s3api::ClientImpl::PutObject ( std::string_view path,
std::string data,
const std::optional< Meta > & meta,
std::string_view content_type,
const std::optional< std::string > & content_disposition,
const std::optional< std::vector< Tag > > & tags ) const
finalvirtual

Implements s3api::Client.

Definition at line 174 of file client.cpp.

◆ TryGetObject()

std::string s3api::ClientImpl::TryGetObject ( std::string_view path,
std::optional< std::string > versiong,
HeadersDataResponse * headers_data,
const HeaderDataRequest & headers_request ) const
finalvirtual

Implements s3api::Client.

Definition at line 225 of file client.cpp.

◆ TryGetPartialObject()

std::string s3api::ClientImpl::TryGetPartialObject ( std::string_view path,
std::string_view range,
std::optional< std::string > versiong,
HeadersDataResponse * headers_data,
const HeaderDataRequest & headers_request ) const
finalvirtual

Implements s3api::Client.

Definition at line 257 of file client.cpp.

◆ UpdateConfig()

void s3api::ClientImpl::UpdateConfig ( ConnectionCfg && config)
finalvirtual

Implements s3api::Client.

Definition at line 152 of file client.cpp.


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