bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
history_utils.h
1// -*- mode: c++; c-basic-offset:4 -*-
2
3// This file is part of the Hyrax data server.
4
5// Copyright (c) 2021 OPeNDAP, Inc.
6// Author: Nathan Potter <ndp@opendap.org>
7//
8// This library is free software; you can redistribute it and/or
9// modify it under the terms of the GNU Lesser General Public
10// License as published by the Free Software Foundation; either
11// version 2.1 of the License, or (at your option) any later version.
12//
13// This library is distributed in the hope that it will be useful,
14// but WITHOUT ANY WARRANTY; without even the implied warranty of
15// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16// Lesser General Public License for more details.
17//
18// You should have received a copy of the GNU Lesser General Public
19// License along with this library; if not, write to the Free Software
20// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21//
22// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
23
24#ifndef HYRAX_GIT_HISTORY_UTILS_H
25#define HYRAX_GIT_HISTORY_UTILS_H
26
27namespace libdap {
28class DDS;
29class DMR;
30}
31namespace fonc_history_util {
32
33// OLD
34void updateHistoryAttributes(libdap::DDS *dds, const std::string &ce);
35
36// NEW
37void updateHistoryAttributes(libdap::DMR *dmr, const std::string &ce);
38
39// These are
40std::string get_time_now();
41std::string create_cf_history_txt(const std::string &request_url);
42template<typename RJSON_WRITER> void create_json_history_obj(const std::string &request_url, RJSON_WRITER &writer);
43
44// jhrg void update_cf_history_attr(libdap::D4Attribute *global_attribute, const std::string &request_url);
45// jhrg void update_history_json_attr(libdap::D4Attribute *global_attribute, const std::string &request_url);
46
47// jhrg std::string create_cf_history_txt(const std::string &request_url);
48// jhrg std::string get_cf_history_entry (const std::string &request_url);
49
50// jhrg std::string get_history_json_entry (const std::string &request_url);
51
52std::string json_append_entry_to_array(const std::string &current_doc_str, const std::string &new_entry_str);
53#endif //HYRAX_GIT_HISTORY_UTILS_H
54
55}