mirror of
https://github.com/XRPLF/clio.git
synced 2025-12-06 17:27:58 +00:00
refactor: Clio Config (#1544)
Implementation of new config definition + methods + UT Steps that still need to be implemented: - Make ClioConfigDefinition and it's method to be as constexpr as possible - Getting User Config file and populating the values in ConfigDefinition while checking for constraints on user values - Replacing all the places where we fetch config values (by using config.valueOr/MaybeValue) to instead get it from Config Definition - Generate markdown file using Clio Config Description
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "rpc/common/Checkers.hpp"
|
||||
#include "rpc/common/Concepts.hpp"
|
||||
#include "rpc/common/Types.hpp"
|
||||
#include "util/UnsupportedType.hpp"
|
||||
|
||||
#include <boost/json/array.hpp>
|
||||
#include <boost/json/value.hpp>
|
||||
@@ -36,9 +37,6 @@
|
||||
|
||||
namespace rpc::impl {
|
||||
|
||||
template <typename>
|
||||
static constexpr bool unsupported_v = false;
|
||||
|
||||
using FieldSpecProcessor = std::function<MaybeError(boost::json::value&)>;
|
||||
|
||||
static FieldSpecProcessor const EMPTY_FIELD_PROCESSOR = [](boost::json::value&) -> MaybeError { return {}; };
|
||||
@@ -64,7 +62,7 @@ makeFieldProcessor(std::string const& key, Processors&&... procs)
|
||||
if (auto const res = req->modify(j, key); not res)
|
||||
firstFailure = res.error();
|
||||
} else {
|
||||
static_assert(unsupported_v<decltype(*req)>);
|
||||
static_assert(util::Unsupported<decltype(*req)>);
|
||||
}
|
||||
}(),
|
||||
...
|
||||
|
||||
Reference in New Issue
Block a user