5#ifndef HYRAX_GIT_ACCESSCREDENTIALS_H
6#define HYRAX_GIT_ACCESSCREDENTIALS_H
13class AccessCredentials {
17 static const char *ID_KEY;
18 static const char *KEY_KEY;
19 static const char *REGION_KEY;
20 static const char *URL_KEY;
23 std::map<std::string, std::string> d_kvp;
24 std::string d_config_name;
25 bool d_s3_tested =
false;
29 AccessCredentials() =
default;
31 explicit AccessCredentials(std::string config_name) : d_config_name(std::move(config_name)) {}
33 AccessCredentials(
const AccessCredentials &ac) =
default;
35 virtual ~AccessCredentials() =
default;
37 virtual std::string
get(
const std::string &key);
39 virtual void add(
const std::string &key,
const std::string &value);
43 std::string to_json()
const;
45 std::string name()
const {
return d_config_name; }
47 void name(
const std::string &name) { d_config_name = name; }
virtual bool is_s3_cred()
Do the URL, ID, Key amd Region items make up an S3 Credential?
virtual std::string get(const std::string &key)
virtual void add(const std::string &key, const std::string &value)
Add the key and value pair.
utility class for the HTTP catalog module