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
Context & operator= (Context &&)=default
Public Member Functions inherited from util::Taggable
 Taggable (Taggable &&)=default
Taggable & operator= (Taggable &&)=default
BaseTagDecorator const & tag () const
 Getter for tag decorator.

Public Attributes

boost::asio::yield_context yield
 The coroutine context the request is handled in.
std::string method
 The method/command requested.
std::uint32_t apiVersion
 The api_version parsed from the request.
boost::json::object params
 Request's parameters/data as a JSON object.
SubscriptionContextPtr session
 The subscription context of the connection.
data::LedgerRange range
 The ledger range available at the time of the request.
std::string clientIp
 IP of the peer.
bool isAdmin
 Whether the peer has admin privileges.

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: