Files
seadisk/include/seafile/fs/setting.hpp
T

29 lines
725 B
C++

//
// Created by Shell on 2026-07-30.
//
#ifndef SEADISK_SETTING_HPP
#define SEADISK_SETTING_HPP
#include <string>
#include <nlohmann/json.hpp>
#include <tl/expected.hpp>
namespace seafile::fs
{
struct Setting final
{
std::string server;
std::string user;
std::string password;
std::string mount_point;
std::string mount_label;
NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT(Setting, server, user, password, mount_point, mount_label);
static auto load(const std::string& path) -> tl::expected<Setting, std::exception>;
static auto load(const std::filesystem::path& path) -> tl::expected<Setting, std::exception>;
};
}
#endif //SEADISK_SETTING_HPP