2
3
4
5
6
7
8
9
10
12#ifndef MQTTSTORE_LIB_CONFIGSECTIONS_H
13#define MQTTSTORE_LIB_CONFIGSECTIONS_H
15#include <net/config/ConfigSection.h>
17#ifndef DOXYGEN_SHOULD_SKIP_THIS
25namespace mqtt::mqttstore::
lib {
29 constexpr static std::string_view
NAME{
"session"};
30 constexpr static std::string_view
DESCRIPTION{
"MQTT session behavior"};
63 constexpr static std::string_view
NAME{
"sub"};
64 constexpr static std::string_view
DESCRIPTION{
"MQTT subscriptions to persist"};
69 [[nodiscard]] std::list<std::string>
getTopic()
const;
77 constexpr static std::string_view
NAME{
"db"};
78 constexpr static std::string_view
DESCRIPTION{
"MariaDB/MySQL connection"};
83 [[nodiscard]] std::string
getHost()
const;
88 [[nodiscard]] std::string
getSocket()
const;
103 constexpr static std::string_view
NAME{
"storage"};
104 constexpr static std::string_view
DESCRIPTION{
"Generic MQTT persistence behavior"};
core::socket::stream::SocketContext * create(core::socket::stream::SocketConnection *socketConnection) final
std::string getHost() const
CLI::Option * databaseOpt
static constexpr std::string_view DESCRIPTION
static constexpr std::string_view NAME
std::string getSocket() const
~ConfigDatabase() override
std::uint32_t getFlags() const
CLI::Option * passwordOpt
std::string getPassword() const
std::string getUsername() const
std::string getDatabase() const
std::uint16_t getPort() const
CLI::Option * usernameOpt
ConfigDatabase(utils::SubCommand *parent)
std::uint8_t getWillQoS() const
static constexpr std::string_view DESCRIPTION
ConfigSession(utils::SubCommand *parent)
CLI::Option * passwordOpt
~ConfigSession() override
std::uint16_t getKeepAlive() const
CLI::Option * sessionStoreOpt
CLI::Option * willMessageOpt
CLI::Option * usernameOpt
std::string getPassword() const
bool getWillRetain() const
std::string getClientId() const
std::string getWillMessage() const
static constexpr std::string_view NAME
CLI::Option * retainSessionOpt
std::string getSessionStore() const
std::string getWillTopic() const
CLI::Option * willTopicOpt
std::string getUsername() const
CLI::Option * clientIdOpt
std::uint8_t getQoS() const
bool getRetainSession() const
CLI::Option * keepAliveOpt
CLI::Option * willRetainOpt
CLI::Option * projectionFileOpt
std::string getProjectionFile() const
bool getAutoCreateRawTable() const
CLI::Option * rawTableOpt
std::string getRawTable() const
ConfigStorage(utils::SubCommand *parent)
static constexpr std::string_view NAME
CLI::Option * autoCreateRawTableOpt
~ConfigStorage() override
static constexpr std::string_view DESCRIPTION
static constexpr std::string_view DESCRIPTION
static constexpr std::string_view NAME
ConfigSubscribe(utils::SubCommand *parent)
std::list< std::string > getTopic() const
~ConfigSubscribe() override
static StoragePlan fromFile(const std::string &fileName)
StorageOptions getStorageOptions(const mqtt::mqttstore::lib::ConfigStorage *configStorage)
std::string projectionFile