userver
C++ Async Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
options.hpp
1
#
pragma
once
2
3
#
include
<
optional
>
4
#
include
<
string
>
5
#
include
<
string_view
>
6
#
include
<
vector
>
7
8
#
include
<
boost
/
program_options
/
options_description
.
hpp
>
9
10
USERVER_NAMESPACE_BEGIN
11
12
namespace
s3api::cli {
13
14
inline
constexpr
int
kDefaultTimeoutMs = 3000;
15
inline
constexpr
int
kDefaultRetries = 1;
16
inline
constexpr
int
kSuccessExitCode = 0;
17
inline
constexpr
int
kOperationErrorExitCode = 1;
18
inline
constexpr
int
kConfigurationErrorExitCode = 2;
19
inline
constexpr
std::string_view kHttpScheme =
"http://"
;
20
inline
constexpr
std::string_view kHttpsScheme =
"https://"
;
21
22
enum
class
Command {
23
kGetObject,
24
kPutObject,
25
kPutObjectConditional,
26
};
27
28
struct
Options
{
29
bool
help =
false
;
30
Command command = Command::kGetObject;
31
std::string endpoint;
32
std::string bucket;
33
std::string key;
34
std::string credentials_file;
35
std::string signature_version =
"v4"
;
36
std::optional<std::string> region;
37
std::string body_file;
38
std::string output_file;
39
std::optional<std::string> if_match;
40
bool
if_none_match =
false
;
41
int
timeout_ms = kDefaultTimeoutMs;
42
int
retries = kDefaultRetries;
43
};
44
45
boost::program_options::options_description DescribeOptions();
46
Options
ParseOptions(
const
std::vector<std::string>& arguments);
47
48
}
// namespace s3api::cli
49
50
USERVER_NAMESPACE_END
tools
cli
options.hpp
Generated on
for userver by
Doxygen
1.17.0