Clio  develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
web::Context Struct Reference

Context that is used by the Webserver to pass around information about an incoming request. More...

#include <Context.hpp>

Inheritance diagram for web::Context:
Collaboration diagram for web::Context:

Public Member Functions

 Context (boost::asio::yield_context yield, std::string command, std::uint32_t apiVersion, boost::json::object params, SubscriptionContextPtr subscriptionContext, util::TagDecoratorFactory const &tagFactory, data::LedgerRange const &range, std::string clientIp, bool isAdmin)
 Create a new Context instance.
 Context (Context &&)=default
Contextoperator= (Context &&)=default
Public Member Functions inherited from util::Taggable
 Taggable (Taggable &&)=default
Taggableoperator= (Taggable &&)=default
BaseTagDecorator const & tag () const
 Getter for tag decorator.

Public Attributes

boost::asio::yield_context yield
std::string method
std::uint32_t apiVersion
boost::json::object params
SubscriptionContextPtr session
data::LedgerRange range
std::string clientIp
bool isAdmin

Additional Inherited Members

Protected Member Functions inherited from util::Taggable
 Taggable (util::TagDecoratorFactory const &tagFactory)
 New Taggable from a specified factory.

Detailed Description

Context that is used by the Webserver to pass around information about an incoming request.

Constructor & Destructor Documentation

◆ Context()

web::Context::Context ( boost::asio::yield_context yield,
std::string command,
std::uint32_t apiVersion,
boost::json::object params,
SubscriptionContextPtr subscriptionContext,
util::TagDecoratorFactory const & tagFactory,
data::LedgerRange const & range,
std::string clientIp,
bool isAdmin )
inline

Create a new Context instance.

Parameters
yieldThe coroutine context
commandThe method/command requested
apiVersionThe api_version parsed from the request
paramsRequest's parameters/data as a JSON object
subscriptionContextThe subscription context of the connection
tagFactoryA factory that is used to generate tags to track requests and connections
rangeThe ledger range that is available at the time of the request
clientIpIP of the peer
isAdminWhether the peer has admin privileges

The documentation for this struct was generated from the following file: