Manages application settings.
More...
#include <kv_store.h>
Manages application settings.
◆ MbKVStore()
Construct the settings store bound to an application.
- Parameters
-
| app | Owning application (db + router access). Stored by reference and must outlive this store. |
◆ configs()
| json & mb::MbKVStore::configs |
( |
| ) |
|
Get the current config data instance.
- Returns
- Config data as a JSON object
◆ configsScriptingJson()
| std::string mb::MbKVStore::configsScriptingJson |
( |
| ) |
const |
|
nodiscard |
◆ getScriptingConfigsCopy()
| json mb::MbKVStore::getScriptingConfigsCopy |
( |
| ) |
const |
|
nodiscard |
Return a copy of current configs (scripting). SMTP passwords are redacted.
◆ getScriptingJson()
| std::string mb::MbKVStore::getScriptingJson |
( |
const std::string & | key | ) |
const |
|
nodiscard |
◆ getScriptingValue()
| json mb::MbKVStore::getScriptingValue |
( |
const std::string & | key | ) |
const |
|
nodiscard |
Read a top-level config key (scripting). Returns null json when missing. smtp.password is returned as "********" when a password is stored.
◆ migrate()
| void mb::MbKVStore::migrate |
( |
| ) |
|
Initialize migration, create base data for setting fields.
◆ reloadScriptingConfigs()
| void mb::MbKVStore::reloadScriptingConfigs |
( |
| ) |
|
Reload configs from the database and apply them to the mailer.
◆ setScriptingJson()
| void mb::MbKVStore::setScriptingJson |
( |
const std::string & | key, |
|
|
const std::string & | json_value ) |
◆ setScriptingValue()
| void mb::MbKVStore::setScriptingValue |
( |
const std::string & | key, |
|
|
const json & | value ) |
Patch a top-level config key, persist it, and apply it. SMTP updates take effect on the mailer immediately. Pass "********" for smtp.password to keep the stored password.
◆ setupRoutes()
| bool mb::MbKVStore::setupRoutes |
( |
| ) |
|
Initialize and set up routes for fetching settings data.
- Returns
- true if setting up routes succeeded.
The documentation for this class was generated from the following files:
- /home/runner/work/mantisbase/mantisbase/include/mantisbase/core/kv_store.h
- /home/runner/work/mantisbase/mantisbase/src/core/kv_store.cpp