userver: /data/code/userver/libraries/s3api/src/s3api/s3api_methods.hpp Source File
Loading...
Searching...
No Matches
s3api_methods.hpp
1#pragma once
2
3#include <optional>
4#include <string>
5
6#include <userver/http/predefined_header.hpp>
7
8#include <userver/s3api/models/request.hpp>
9
10USERVER_NAMESPACE_BEGIN
11
12namespace s3api::api_methods {
13
14namespace headers {
15inline constexpr USERVER_NAMESPACE::http::headers::PredefinedHeader kAmzCopySource{"x-amz-copy-source"};
16}
17
18Request PutObject(
19 std::string_view bucket,
20 std::string_view path,
21 std::string data,
22 std::string_view content_type,
23 const std::optional<std::string_view>& content_disposition = std::nullopt
24);
25
26Request DeleteObject(std::string_view bucket, std::string_view path);
27
29GetObject(std::string_view bucket, std::string_view path, std::optional<std::string_view> version = std::nullopt);
30
31Request GetObjectHead(std::string_view bucket, std::string_view path);
32
33void SetRange(Request& req, size_t begin, size_t end);
34
35void SetRange(Request& req, std::string_view range);
36
37Request GetBuckets();
38
39Request ListBucketContents(
40 std::string_view bucket,
41 std::string_view path,
42 int max_keys = 0,
43 std::string_view marker = "",
44 std::string_view delimiter = ""
45);
46
47Request CopyObject(
48 std::string_view source_bucket,
49 std::string_view source_key,
50 std::string_view dest_bucket,
51 std::string_view dest_key,
52 std::string_view content_type
53);
54
55} // namespace s3api::api_methods
56
57USERVER_NAMESPACE_END