userver: s3api::ClientImpl Class Reference
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
s3api::ClientImpl Class Reference

Your opinion will help to improve our service

Leave a feedback >

#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
 
multipart_upload::InitiateMultipartUploadResult CreateMultipartUpload (const multipart_upload::CreateMultipartUploadRequest &request) const final
 Initiate a multipart upload sequence Performs a CreateMultipartUpload S3 Action. Returns result with upload ID which is used to associate all of the parts in the specific multipart upload. You specify this upload ID in each of your subsequent upload part requests For details see https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html.
 
multipart_upload::UploadPartResult UploadPart (const multipart_upload::UploadPartRequest &request) const final
 Upload a part in a multipart upload sequence. Performs an UploadPart S3 Action. Returns ETag value which you must include in the subsequent request to complete the multipart upload. For details see https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html.
 
multipart_upload::CompleteMultipartUploadResult CompleteMultipartUpload (const multipart_upload::CompleteMultipartUploadRequest &request) const final
 Complete a multipart upload by assembling previously uploaded parts. Performs a CompleteMultipartUpload S3 Action. For details see https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html.
 
void AbortMultipartUpload (const multipart_upload::AbortMultipartUploadRequest &request) const final
 Abort a multipart upload sequence. Performs an AbortMultipartUpload S3 Action. For details see https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html.
 
multipart_upload::ListPartsResult ListParts (const multipart_upload::ListPartsRequest &request) const final
 List the parts that have been uploaded for a specific multipart upload. Performs a ListParts S3 Action. For details see https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html.
 
multipart_upload::ListMultipartUploadsResult ListMultipartUploads (const multipart_upload::ListMultipartUploadsRequest &request) const final
 List in-progress multipart uploads in a bucket Performs a ListMultipartUploads S3 Action. For details see https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html.
 
void UpdateConfig (ConnectionCfg &&config) final
 
std::string_view GetBucketName () const final
 

Member Typedef Documentation

◆ CiUnorderedMap

Definition at line 73 of file s3api.hpp.

◆ Headers

Definition at line 75 of file s3api.hpp.

◆ Meta

Definition at line 74 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 156 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 163 of file client.cpp.

Member Function Documentation

◆ AbortMultipartUpload()

void s3api::ClientImpl::AbortMultipartUpload ( const multipart_upload::AbortMultipartUploadRequest & request) const
finalvirtual

Abort a multipart upload sequence. Performs an AbortMultipartUpload S3 Action. For details see https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html.

Implements s3api::Client.

Definition at line 550 of file client.cpp.

◆ CompleteMultipartUpload()

multipart_upload::CompleteMultipartUploadResult s3api::ClientImpl::CompleteMultipartUpload ( const multipart_upload::CompleteMultipartUploadRequest & request) const
finalvirtual

Complete a multipart upload by assembling previously uploaded parts. Performs a CompleteMultipartUpload S3 Action. For details see https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html.

Implements s3api::Client.

Definition at line 535 of file client.cpp.

◆ 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 452 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 490 of file client.cpp.

◆ CreateMultipartUpload()

multipart_upload::InitiateMultipartUploadResult s3api::ClientImpl::CreateMultipartUpload ( const multipart_upload::CreateMultipartUploadRequest & request) const
finalvirtual

Initiate a multipart upload sequence Performs a CreateMultipartUpload S3 Action. Returns result with upload ID which is used to associate all of the parts in the specific multipart upload. You specify this upload ID in each of your subsequent upload part requests For details see https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html.

Implements s3api::Client.

Definition at line 494 of file client.cpp.

◆ DeleteObject()

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

Implements s3api::Client.

Definition at line 201 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 284 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 302 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 314 of file client.cpp.

◆ GetBucketName()

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

Implements s3api::Client.

Definition at line 174 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 206 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 272 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 237 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 384 of file client.cpp.

◆ ListBucketContentsParsed()

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

Implements s3api::Client.

Definition at line 393 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 421 of file client.cpp.

◆ ListMultipartUploads()

multipart_upload::ListMultipartUploadsResult s3api::ClientImpl::ListMultipartUploads ( const multipart_upload::ListMultipartUploadsRequest & request) const
finalvirtual

List in-progress multipart uploads in a bucket Performs a ListMultipartUploads S3 Action. For details see https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html.

Implements s3api::Client.

Definition at line 568 of file client.cpp.

◆ ListParts()

multipart_upload::ListPartsResult s3api::ClientImpl::ListParts ( const multipart_upload::ListPartsRequest & request) const
finalvirtual

List the parts that have been uploaded for a specific multipart upload. Performs a ListParts S3 Action. For details see https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html.

Implements s3api::Client.

Definition at line 555 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 176 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 227 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 259 of file client.cpp.

◆ UpdateConfig()

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

Implements s3api::Client.

Definition at line 154 of file client.cpp.

◆ UploadPart()

multipart_upload::UploadPartResult s3api::ClientImpl::UploadPart ( const multipart_upload::UploadPartRequest & request) const
finalvirtual

Upload a part in a multipart upload sequence. Performs an UploadPart S3 Action. Returns ETag value which you must include in the subsequent request to complete the multipart upload. For details see https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html.

Implements s3api::Client.

Definition at line 506 of file client.cpp.


The documentation for this class was generated from the following files:
  • /data/code/userver/libraries/s3api/src/s3api/clients/client.hpp
  • /data/code/userver/libraries/s3api/src/s3api/clients/client.cpp