29 explicit operator bool()
const {
return message.empty(); }
35 Status
CreateStage(
const nlohmann::json &files, std::string &requestId);
36 Status
GetStage(
const std::string &requestId, nlohmann::json &response);
38 const nlohmann::json &paths);
40 Status
Release(
const std::string &requestId,
const nlohmann::json &paths);
41 Status
ArchiveInfo(
const nlohmann::json &paths, nlohmann::json &response);
44 Status ResolvePath(
const std::filesystem::path &root,
45 const std::string &path,
46 std::string &normalized,
47 std::filesystem::path &resolved)
const;
48 Status ReadRequest(
const std::string &requestId,
49 nlohmann::json &request)
const;
50 Status WriteRequest(
const nlohmann::json &request)
const;
51 Status ValidateRequestPaths(
const nlohmann::json &request,
52 const nlohmann::json &paths,
53 std::vector<std::string> &normalized)
const;
55 static bool IsRequestId(
const std::string &requestId);
56 static std::uint64_t Now();
57 static std::string GenerateRequestId();
58 static nlohmann::json StatusResponse(
const nlohmann::json &request);
60 std::filesystem::path m_root;
61 std::filesystem::path m_archiveRoot;
62 std::filesystem::path m_diskRoot;
63 std::filesystem::path m_requestsRoot;
64 mutable std::mutex m_mutex;