Files
energy_storage/src/app/Config.h

32 lines
405 B
C
Raw Normal View History

#pragma once
#include <string>
struct DatabaseOption
{
std::string host;
int port;
std::string user;
std::string passwd;
std::string dbname;
};
struct AppOption
{
DatabaseOption database;
struct {
bool useToken {true};
int port {0};
} http;
};
class Config
{
public:
static bool init(std::string filename);
static AppOption option;
};