MCPcopy Create free account
hub / github.com/apache/cloudberry / S3Url

Class S3Url

gpcontrib/gpcloud/include/s3url.h:9–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7#include "s3utils.h"
8
9class S3Url {
10 public:
11 S3Url(const string &sourceUrl, bool useHttps = true, const string &version = "",
12 const string &region = "");
13
14 string getFullUrlForCurl() const;
15 string getHostForCurl() const;
16 string getPathForCurl() const;
17
18 const string &getSchema() const {
19 return schema;
20 }
21
22 const string &getHost() const {
23 return host;
24 }
25
26 const string &getPort() const {
27 return port;
28 }
29
30 const string &getBucket() const {
31 return bucket;
32 }
33
34 const string &getPrefix() const {
35 return prefix;
36 }
37
38 const string &getRegion() const {
39 return region;
40 }
41
42 const string &getVersion() const {
43 return version;
44 }
45
46 void setPrefix(const string &prefix) {
47 this->prefix = prefix;
48 };
49
50 bool isValidUrl() const;
51
52 string getExtension() const;
53
54 private:
55 string extractField(const struct http_parser_url *urlParser, http_parser_url_fields i);
56
57 bool extractRegionFromUrl();
58 void extractEncodedPrefix();
59 void extractBucket();
60
61 string version;
62
63 string sourceUrl;
64 string schema;
65 string host;
66 string port;

Callers 3

TESTFunction · 0.85
TEST_FFunction · 0.85
genUniqueKeyNameMethod · 0.85

Calls

no outgoing calls

Tested by 2

TESTFunction · 0.68
TEST_FFunction · 0.68