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