crawlserv++  [under development]
Application for crawling and analyzing textual content of websites.
crawlservpp::Struct::DatabaseSettings Struct Reference

Database settings containing its host, port, user, password, schema, and compression. More...

#include <DatabaseSettings.hpp>

Properties

std::string host
 The host name to be used to connect to the database server. More...
 
std::uint16_t port {}
 The port to be used to connect to the database server. More...
 
std::string user
 The user name to be used to connect to the database. More...
 
std::string password
 The password to be used to connect to the database. More...
 
std::string name
 The name/schema of the database to be connected to. More...
 
bool compression {false}
 Indicates whether compression should be used for the database connection. More...
 
std::string_view debugDir
 The debug directory to be used by the current thread. More...
 
bool debugLogging {false}
 Indicates whether debug logging (to file) is enabled for the current thread. More...
 

Construction

 DatabaseSettings ()=default
 Default constructor. More...
 
 DatabaseSettings (const DatabaseSettings &other, std::string_view setDebugDir)
 Constructor copying database settings, but setting a distinct debug directory. More...
 

Detailed Description

Database settings containing its host, port, user, password, schema, and compression.

These settings are read from the configuration file.

They contain additional debugging information.

Constructor & Destructor Documentation

◆ DatabaseSettings() [1/2]

crawlservpp::Struct::DatabaseSettings::DatabaseSettings ( )
default

Default constructor.

◆ DatabaseSettings() [2/2]

crawlservpp::Struct::DatabaseSettings::DatabaseSettings ( const DatabaseSettings other,
std::string_view  setDebugDir 
)
inline

Constructor copying database settings, but setting a distinct debug directory.

Parameters
otherConstant reference to a structure containing database settings to be copied to the current instance.
setDebugDirView of a string containing the debug directory to be set explicitly.

References compression, debugLogging, host, name, password, port, and user.

Member Data Documentation

◆ compression

bool crawlservpp::Struct::DatabaseSettings::compression {false}

Indicates whether compression should be used for the database connection.

Referenced by crawlservpp::Main::Database::connect(), DatabaseSettings(), and crawlservpp::Main::App::run().

◆ debugDir

std::string_view crawlservpp::Struct::DatabaseSettings::debugDir

The debug directory to be used by the current thread.

Referenced by crawlservpp::Main::Server::Server().

◆ debugLogging

bool crawlservpp::Struct::DatabaseSettings::debugLogging {false}

Indicates whether debug logging (to file) is enabled for the current thread.

Referenced by DatabaseSettings(), crawlservpp::Main::App::run(), and crawlservpp::Main::Server::Server().

◆ host

std::string crawlservpp::Struct::DatabaseSettings::host

The host name to be used to connect to the database server.

Referenced by crawlservpp::Main::Database::connect(), DatabaseSettings(), and crawlservpp::Main::App::run().

◆ name

◆ password

std::string crawlservpp::Struct::DatabaseSettings::password

The password to be used to connect to the database.

Warning
The password will remain as plain text in memory as long as the command-and-control server is running.

Referenced by crawlservpp::Main::Database::connect(), DatabaseSettings(), and crawlservpp::Main::App::run().

◆ port

std::uint16_t crawlservpp::Struct::DatabaseSettings::port {}

The port to be used to connect to the database server.

Referenced by crawlservpp::Main::Database::connect(), DatabaseSettings(), and crawlservpp::Main::App::run().

◆ user

std::string crawlservpp::Struct::DatabaseSettings::user

The user name to be used to connect to the database.

Referenced by crawlservpp::Main::Database::connect(), DatabaseSettings(), and crawlservpp::Main::App::run().


The documentation for this struct was generated from the following file: