bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
AccessCredentials.h
1//
2// Created by ndp on 2/12/20.
3//
4
5#ifndef HYRAX_GIT_ACCESSCREDENTIALS_H
6#define HYRAX_GIT_ACCESSCREDENTIALS_H
7
8#include <map>
9#include <string>
10
11namespace http {
12
13class AccessCredentials {
14public:
15 // These are the string keys used to express the normative key names
16 // for the credentials components.
17 static const char *ID_KEY;
18 static const char *KEY_KEY;
19 static const char *REGION_KEY;
20 static const char *URL_KEY;
21
22private:
23 std::map<std::string, std::string> d_kvp;
24 std::string d_config_name;
25 bool d_s3_tested = false;
26 bool d_is_s3 = false;
27
28public:
29 AccessCredentials() = default;
30
31 explicit AccessCredentials(std::string config_name) : d_config_name(std::move(config_name)) {}
32
33 AccessCredentials(const AccessCredentials &ac) = default;
34
35 virtual ~AccessCredentials() = default;
36
37 virtual std::string get(const std::string &key);
38
39 virtual void add(const std::string &key, const std::string &value);
40
41 virtual bool is_s3_cred();
42
43 std::string to_json() const;
44
45 std::string name() const { return d_config_name; }
46
47 void name(const std::string &name) { d_config_name = name; }
48};
49
50} // namespace http
51
52#endif //HYRAX_GIT_ACCESSCREDENTIALS_H
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
Definition TheBESKeys.h:51