3#include "data/BackendInterface.hpp"
4#include "rpc/common/SpecBackend.hpp"
5#include "rpc/common/Types.hpp"
7#include <boost/json/conversion.hpp>
8#include <boost/json/value.hpp>
9#include <rpcspec/handlers/ledger_index/Types.hpp>
23 std::shared_ptr<BackendInterface> sharedPtrBackend_;
46 : sharedPtrBackend_(std::move(sharedPtrBackend))
68 tag_invoke(boost::json::value_from_tag, boost::json::value& jv, Output
const& output);
friend void tag_invoke(boost::json::value_from_tag, boost::json::value &jv, Output const &output)
Convert the Output to a JSON object.
Definition LedgerIndex.cpp:73
HandlerReturnType< Output > Result
The result type of the command: either the Output or an error status.
Definition LedgerIndex.hpp:38
LedgerIndexHandler(std::shared_ptr< BackendInterface > sharedPtrBackend)
Construct a new LedgerIndexHandler object.
Definition LedgerIndex.hpp:45
Result process(Input const &input, Context const &ctx) const
Process the LedgerIndex command.
Definition LedgerIndex.cpp:24
This namespace contains all the RPC logic and handlers.
Definition AMMHelpers.cpp:17
std::expected< OutputType, Status > HandlerReturnType
Return type for each individual handler.
Definition Types.hpp:63
spec::HandlerFor< InputT, boost::json::value > HandlerFor
The spec-driven base every typed handler inherits.
Definition SpecBackend.hpp:24
Context of an RPC call.
Definition Types.hpp:102
A struct to hold the output data of the command.
Definition LedgerIndex.hpp:29
std::string closeTimeIso
Close time of the ledger in ISO 8601 format.
Definition LedgerIndex.hpp:32
std::string ledgerHash
Hash of the matching ledger.
Definition LedgerIndex.hpp:31
uint32_t ledgerIndex
Sequence of the matching ledger.
Definition LedgerIndex.hpp:30
Result type used to return responses or error statuses to the Webserver subsystem.
Definition Types.hpp:132