rippled
Loading...
Searching...
No Matches
xrpld
rpc
Context.h
1
#pragma once
2
3
#include <xrpld/rpc/Role.h>
4
5
#include <xrpl/beast/utility/Journal.h>
6
#include <xrpl/core/JobQueue.h>
7
#include <xrpl/server/InfoSub.h>
8
9
namespace
xrpl
{
10
11
class
Application;
12
class
NetworkOPs;
13
class
LedgerMaster;
14
15
namespace
RPC {
16
18
struct
Context
19
{
20
beast::Journal
const
j
;
21
Application
&
app
;
22
Resource::Charge
&
loadType
;
23
NetworkOPs
&
netOps
;
24
LedgerMaster
&
ledgerMaster
;
25
Resource::Consumer
&
consumer
;
26
Role
role
;
27
std::shared_ptr<JobQueue::Coro>
coro
{};
28
InfoSub::pointer
infoSub
{};
29
unsigned
int
apiVersion
;
30
};
31
32
struct
JsonContext
:
public
Context
33
{
37
struct
Headers
38
{
39
std::string_view
user
;
40
std::string_view
forwardedFor
;
41
};
42
43
Json::Value
params
;
44
45
Headers
headers
{};
46
};
47
48
template
<
class
RequestType>
49
struct
GRPCContext
:
public
Context
50
{
51
RequestType
params
;
52
};
53
54
}
// namespace RPC
55
}
// namespace xrpl
std::string_view
Json::Value
Represents a JSON value.
Definition
json_value.h:130
beast::Journal
A generic endpoint for log messages.
Definition
Journal.h:40
xrpl::Application
Definition
Application.h:95
xrpl::LedgerMaster
Definition
LedgerMaster.h:32
xrpl::NetworkOPs
Provides server functionality for clients.
Definition
NetworkOPs.h:71
xrpl::Resource::Charge
A consumption charge.
Definition
Charge.h:10
xrpl::Resource::Consumer
An endpoint that consumes resources.
Definition
Consumer.h:16
xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:5
xrpl::Role
Role
Indicates the level of administrative permission to grant.
Definition
Role.h:24
std::shared_ptr
xrpl::RPC::Context
The context of information needed to call an RPC.
Definition
Context.h:19
xrpl::RPC::Context::j
beast::Journal const j
Definition
Context.h:20
xrpl::RPC::Context::app
Application & app
Definition
Context.h:21
xrpl::RPC::Context::infoSub
InfoSub::pointer infoSub
Definition
Context.h:28
xrpl::RPC::Context::loadType
Resource::Charge & loadType
Definition
Context.h:22
xrpl::RPC::Context::consumer
Resource::Consumer & consumer
Definition
Context.h:25
xrpl::RPC::Context::role
Role role
Definition
Context.h:26
xrpl::RPC::Context::apiVersion
unsigned int apiVersion
Definition
Context.h:29
xrpl::RPC::Context::ledgerMaster
LedgerMaster & ledgerMaster
Definition
Context.h:24
xrpl::RPC::Context::netOps
NetworkOPs & netOps
Definition
Context.h:23
xrpl::RPC::Context::coro
std::shared_ptr< JobQueue::Coro > coro
Definition
Context.h:27
xrpl::RPC::GRPCContext
Definition
Context.h:50
xrpl::RPC::GRPCContext::params
RequestType params
Definition
Context.h:51
xrpl::RPC::JsonContext::Headers
Data passed in from HTTP headers.
Definition
Context.h:38
xrpl::RPC::JsonContext::Headers::forwardedFor
std::string_view forwardedFor
Definition
Context.h:40
xrpl::RPC::JsonContext::Headers::user
std::string_view user
Definition
Context.h:39
xrpl::RPC::JsonContext
Definition
Context.h:33
xrpl::RPC::JsonContext::params
Json::Value params
Definition
Context.h:43
xrpl::RPC::JsonContext::headers
Headers headers
Definition
Context.h:45
Generated by
1.9.8