Nix 2.26.3
Nix, the purely functional package manager; unstable internal interfaces
 
Loading...
Searching...
No Matches
s3.hh
Go to the documentation of this file.
1#pragma once
3
4#if ENABLE_S3
5
6#include "ref.hh"
7
8#include <optional>
9#include <string>
10
11namespace Aws { namespace Client { struct ClientConfiguration; } }
12namespace Aws { namespace S3 { class S3Client; } }
13
14namespace nix {
15
16struct S3Helper
17{
18 ref<Aws::Client::ClientConfiguration> config;
19 ref<Aws::S3::S3Client> client;
20
21 S3Helper(const std::string & profile, const std::string & region, const std::string & scheme, const std::string & endpoint);
22
23 ref<Aws::Client::ClientConfiguration> makeConfig(const std::string & region, const std::string & scheme, const std::string & endpoint);
24
25 struct FileTransferResult
26 {
27 std::optional<std::string> data;
28 unsigned int durationMs;
29 };
30
31 FileTransferResult getObject(
32 const std::string & bucketName, const std::string & key);
33};
34
35}
36
37#endif
const T::key_type & key
Definition lexer.l:2763
std::variant< std::string, std::string_view > data
Definition lexer.l:177