OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
MongoDBSettingsParser.h
Go to the documentation of this file.
1#pragma once
2#pragma warning(disable : 4267)
3#pragma warning(disable : 4244)
4
5#include <string>
6#include <list>
7#include "MongoDBSettings.h"
8
10{
11public:
12 MongoDBSettingsParser(const std::string& _binPath);
13 MongoDBSettingsParser(const std::string& _binPath, const std::string& _adminPsw);
14
15 const MongoDBSettings& getMongoDBSettings() { return m_settings; }
18 std::string getUpdatedConfig();
19 std::string getTempMongoServerConfPath();
20 void createTempMongoServerConf(const std::string& _path);
21
22private:
23
24 MongoDBSettings m_settings;
25
26 const std::string m_cfgKeyWordPort = "port";
27 const std::string m_cfgKeyWordBindIP = "bindIp";
28 const std::string m_cfgKeyWordCertKeyFile = "certificateKeyFile";
29 const std::string m_cfgKeyWordDBPath = "dbPath";
30 const std::string m_cfgKeyWordSysLog = "systemLog";
31 const std::string m_cfgKeyWordSysPath = "path";
32 const std::string m_cfgKeyWordTLSUse = "tlsUseSystemCA";
33 const std::string m_cfgKeyWordJournal = "journal";
34
35 void extractPaths(const std::string& _binPath);
36 const bool extractionSucceeded(std::string& _errorMessage);
37 std::string removeTrailingComments(const std::string& _str);
38 void addJournalEntriesToConfig(const std::list<std::string>& _journalEntries);
39 void removeJournalEnabledEntry(std::list<std::string>& _journalEntries);
40};
41
Definition MongoDBSettingsParser.h:10
const MongoDBSettings & getMongoDBSettings()
Definition MongoDBSettingsParser.h:15
std::string getUpdatedConfig()
Definition MongoDBSettingsParser.cpp:174
std::string getTempMongoServerConfPath()
Definition MongoDBSettingsParser.cpp:189
std::string getCurrentMongoDBServiceVersion()
Definition MongoDBSettingsParser.cpp:26
MongoDBSettingsParser(const std::string &_binPath)
Definition MongoDBSettingsParser.cpp:21
void createTempMongoServerConf(const std::string &_path)
Definition MongoDBSettingsParser.cpp:196
void extractDataFromConfig()
Definition MongoDBSettingsParser.cpp:45
Definition MongoDBSettings.h:4