mmcs-quotes-bridge/config.h

37 lines
723 B
C++

#pragma once
#include <exception>
#include <string>
#include <variant>
#include <vector>
namespace config {
struct InvalidConfigException : std::exception {
inline InvalidConfigException(const char *message) : message(message) {};
const char *message;
};
struct VkSourceConfig {
std::variant<long, std::string> id;
std::string link;
};
struct TgSourceConfig {
long id;
std::string link;
};
struct AppConfig {
AppConfig(const std::string &filename);
std::string vkServiceKey;
long tgApiId;
std::string tgApiHash;
std::string tgPhoneNumber;
std::vector<VkSourceConfig> vkSources;
std::vector<TgSourceConfig> tgSources;
long tgDestinationId;
};
}