xrpld
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/json/json_value.h>
8
#include <xrpl/resource/Charge.h>
9
#include <xrpl/resource/Consumer.h>
10
#include <xrpl/server/InfoSub.h>
11
12
#include <
memory
>
13
#include <
string_view
>
14
15
namespace
xrpl
{
16
17
class
Application
;
18
class
NetworkOPs
;
19
class
LedgerMaster
;
20
21
namespace
rpc
{
22
26
struct
Context
27
{
28
beast::Journal
const
j
;
29
Application
&
app
;
30
resource::Charge
&
loadType
;
31
NetworkOPs
&
netOps
;
32
LedgerMaster
&
ledgerMaster
;
33
resource::Consumer
&
consumer
;
34
Role
role
;
35
std::shared_ptr<JobQueue::Coro>
coro
;
36
InfoSub::pointer
infoSub
;
37
unsigned
int
apiVersion
;
38
};
39
40
struct
JsonContext
:
public
Context
41
{
45
struct
Headers
46
{
47
std::string_view
user
;
48
std::string_view
forwardedFor
;
49
};
50
51
json::Value
params
;
52
53
Headers
headers
{};
54
};
55
56
template
<
class
RequestType>
57
struct
GRPCContext
:
public
Context
58
{
59
RequestType
params
;
60
};
61
62
}
// namespace rpc
63
}
// namespace xrpl
std::string_view
beast::Journal
A generic endpoint for log messages.
Definition
Journal.h:44
json::Value
Represents a JSON value.
Definition
json_value.h:117
xrpl::Application
Definition
Application.h:94
xrpl::InfoSub::pointer
std::shared_ptr< InfoSub > pointer
Definition
InfoSub.h:91
xrpl::LedgerMaster
Definition
LedgerMaster.h:50
xrpl::NetworkOPs
Provides server functionality for clients.
Definition
NetworkOPs.h:82
xrpl::resource::Charge
A consumption charge.
Definition
Charge.h:13
xrpl::resource::Consumer
An endpoint that consumes resources.
Definition
Consumer.h:20
memory
xrpl::rpc
API version numbers used in later API versions.
Definition
ApiVersion.h:36
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:27
std::shared_ptr
string_view
xrpl::rpc::Context
The context of information needed to call an RPC.
Definition
Context.h:27
xrpl::rpc::Context::coro
std::shared_ptr< JobQueue::Coro > coro
Definition
Context.h:35
xrpl::rpc::Context::loadType
resource::Charge & loadType
Definition
Context.h:30
xrpl::rpc::Context::infoSub
InfoSub::pointer infoSub
Definition
Context.h:36
xrpl::rpc::Context::j
beast::Journal const j
Definition
Context.h:28
xrpl::rpc::Context::netOps
NetworkOPs & netOps
Definition
Context.h:31
xrpl::rpc::Context::role
Role role
Definition
Context.h:34
xrpl::rpc::Context::apiVersion
unsigned int apiVersion
Definition
Context.h:37
xrpl::rpc::Context::app
Application & app
Definition
Context.h:29
xrpl::rpc::Context::consumer
resource::Consumer & consumer
Definition
Context.h:33
xrpl::rpc::Context::ledgerMaster
LedgerMaster & ledgerMaster
Definition
Context.h:32
xrpl::rpc::GRPCContext
Definition
Context.h:58
xrpl::rpc::GRPCContext::params
RequestType params
Definition
Context.h:59
xrpl::rpc::JsonContext::Headers
Data passed in from HTTP headers.
Definition
Context.h:46
xrpl::rpc::JsonContext::Headers::forwardedFor
std::string_view forwardedFor
Definition
Context.h:48
xrpl::rpc::JsonContext::Headers::user
std::string_view user
Definition
Context.h:47
xrpl::rpc::JsonContext
Definition
Context.h:41
xrpl::rpc::JsonContext::params
json::Value params
Definition
Context.h:51
xrpl::rpc::JsonContext::headers
Headers headers
Definition
Context.h:53
Generated by
1.16.1