2020-02-11 15:42:05 +00:00
|
|
|
//
|
|
|
|
// Created by lukas on 11.02.20.
|
|
|
|
//
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
2020-04-30 17:37:11 +00:00
|
|
|
class Config {
|
2020-02-11 15:42:05 +00:00
|
|
|
public:
|
2020-02-11 16:14:17 +00:00
|
|
|
static std::string dynuapikey;
|
2020-02-11 15:42:05 +00:00
|
|
|
|
2020-02-11 16:14:17 +00:00
|
|
|
static std::string domainid; //id of the dynu domain
|
|
|
|
static std::string domainname;
|
2020-02-11 15:42:05 +00:00
|
|
|
|
2020-02-11 16:14:17 +00:00
|
|
|
static std::string telegramApiKey;
|
|
|
|
static std::string chatId;
|
2020-02-11 15:42:05 +00:00
|
|
|
|
2020-05-01 13:33:20 +00:00
|
|
|
/**
|
|
|
|
* read configuration out of config file
|
|
|
|
*
|
|
|
|
* @return success of config read
|
|
|
|
*/
|
2020-04-29 18:06:27 +00:00
|
|
|
static bool readCredentials();
|
2020-02-11 15:42:05 +00:00
|
|
|
|
2020-05-01 13:33:20 +00:00
|
|
|
/**
|
|
|
|
* validate config file
|
|
|
|
*
|
|
|
|
* @return validity of config file
|
|
|
|
*/
|
|
|
|
static bool validateConfig();
|
|
|
|
|
2020-02-11 16:14:17 +00:00
|
|
|
private:
|
|
|
|
};
|