crawlserv++  [under development]
Application for crawling and analyzing textual content of websites.
ServerSettings.hpp
Go to the documentation of this file.
1 /*
2  *
3  * ---
4  *
5  * Copyright (C) 2020 Anselm Schmidt (ans[ät]ohai.su)
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version in addition to the terms of any
11  * licences already herein identified.
12  *
13  * This program 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
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20  *
21  * ---
22  *
23  * ServerSettings.hpp
24  *
25  * Server settings (port, allowed clients, origins and actions).
26  *
27  * Created on: Oct 11, 2018
28  * Author: ans
29  */
30 
31 #ifndef STRUCT_SERVERSETTINGS_HPP_
32 #define STRUCT_SERVERSETTINGS_HPP_
33 
34 #include <cstdint> // std::uint16_t
35 #include <string> // std::string
36 
37 namespace crawlservpp::Struct {
38 
41 
42  constexpr auto serverSleepOnSqlErrorDefault{60};
43 
45 
47 
51  struct ServerSettings {
54 
56  std::string port;
57 
59  std::string allowedClients;
60 
62  bool logsDeletable{false};
63 
65  bool dataDeletable{false};
66 
69 
71  };
72 
73 } /* namespace crawlservpp::Struct */
74 
75 #endif /* STRUCT_SERVERSETTINGS_HPP_ */
std::uint16_t sleepOnSqlErrorS
Number of seconds to wait if a MySQL error occures before retrying and possibly terminating the threa...
Definition: ServerSettings.hpp:68
std::string allowedClients
A list of allowed IP addresses, separated by commas.
Definition: ServerSettings.hpp:59
std::string port
The port of the server as string.
Definition: ServerSettings.hpp:56
Server settings containing its port, as well as allowed clients, origins, and actions.
Definition: ServerSettings.hpp:51
bool dataDeletable
Indicates whether the deletion of data is allowed using the frontend, i.e. server commands...
Definition: ServerSettings.hpp:65
bool logsDeletable
Indicates whether the deletion of logs is allowed using the frontend, i.e. server commands...
Definition: ServerSettings.hpp:62
Namespace for data structures.
Definition: AlgoThreadProperties.hpp:43
constexpr auto serverSleepOnSqlErrorDefault
Definition: ServerSettings.hpp:42