3#include "data/BackendInterface.hpp"
4#include "rpc/common/SpecBackend.hpp"
5#include "rpc/common/Types.hpp"
7#include <boost/json/object.hpp>
8#include <boost/json/value.hpp>
9#include <rpcspec/handlers/ledger_entry/Types.hpp>
26 std::shared_ptr<BackendInterface> sharedPtrBackend_;
39 std::optional<boost::json::object>
node;
62 : sharedPtrBackend_(std::move(sharedPtrBackend))
84 tag_invoke(boost::json::value_from_tag, boost::json::value& jv, Output
const& output);
HandlerReturnType< Output > Result
The result type of the command: either the Output or an error status.
Definition LedgerEntry.hpp:54
LedgerEntryHandler(std::shared_ptr< BackendInterface > sharedPtrBackend)
Construct a new LedgerEntryHandler object.
Definition LedgerEntry.hpp:61
friend void tag_invoke(boost::json::value_from_tag, boost::json::value &jv, Output const &output)
Convert the Output to a JSON object.
Definition LedgerEntry.cpp:485
Result process(Input const &input, Context const &ctx) const
Process the LedgerEntry command.
Definition LedgerEntry.cpp:426
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 LedgerEntry.hpp:32
std::optional< uint32_t > deletedLedgerIndex
Ledger in which the object was deleted, if any.
Definition LedgerEntry.hpp:47
bool validated
Whether the ledger is validated.
Definition LedgerEntry.hpp:48
uint32_t ledgerIndex
Sequence of the ledger used.
Definition LedgerEntry.hpp:34
std::optional< std::string > nodeBinary
Hex-encoded ledger object, if binary was requested.
Definition LedgerEntry.hpp:43
std::string index
Hex-encoded key of the ledger object.
Definition LedgerEntry.hpp:33
std::optional< boost::json::object > node
Ledger object as JSON, unless binary was requested.
Definition LedgerEntry.hpp:39
std::string ledgerHash
Hash of the ledger used.
Definition LedgerEntry.hpp:35
Result type used to return responses or error statuses to the Webserver subsystem.
Definition Types.hpp:132