GCC Code Coverage Report


Directory: cvmfs/
File: cvmfs/gateway_util.h
Date: 2025-06-22 02:36:02
Exec Total Coverage
Lines: 0 6 0.0%
Branches: 0 2 0.0%

Line Branch Exec Source
1 /**
2 * This file is part of the CernVM File System.
3 */
4
5 #ifndef CVMFS_GATEWAY_UTIL_H_
6 #define CVMFS_GATEWAY_UTIL_H_
7
8 #include <string>
9
10 namespace gateway {
11
12 struct GatewayKey {
13 public:
14 GatewayKey() { }
15 GatewayKey(const std::string &i, const std::string &s)
16 : id_(i), secret_(s) { }
17
18 bool IsValid() const { return !id_.empty(); }
19 std::string id() const { return id_; }
20 std::string secret() const { return secret_; }
21
22 private:
23 std::string id_;
24 std::string secret_;
25 };
26
27 int APIVersion();
28
29 GatewayKey ReadGatewayKey(const std::string &key_file_name);
30
31 bool ReadKeys(const std::string &key_file_name, std::string *key_id,
32 std::string *secret);
33
34 bool ParseKey(const std::string &body, std::string *key_id,
35 std::string *secret);
36
37 } // namespace gateway
38
39 #endif // CVMFS_GATEWAY_UTIL_H_
40