24 lines
469 B
C++
24 lines
469 B
C++
#ifndef JSON_SETTINGS_H
|
|
#define JSON_SETTINGS_H
|
|
|
|
#include <vector>
|
|
#include <string>
|
|
#include <expected>
|
|
#include <optional>
|
|
#include <cstdint>
|
|
|
|
struct Service {
|
|
std::string name;
|
|
std::string service;
|
|
};
|
|
|
|
struct AppSettings {
|
|
static std::expected<AppSettings, std::string> loadAppSettings();
|
|
|
|
std::optional<std::string> getId(std::string_view name);
|
|
|
|
std::vector<Service> services;
|
|
std::optional<uint16_t> httpPort;
|
|
};
|
|
|
|
#endif // JSON_SETTINGS_H
|