Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
net_api_plugin.cpp File Reference
Include dependency graph for net_api_plugin.cpp:

Go to the source code of this file.

Classes

struct  sysio::detail::net_api_plugin_empty
 

Namespaces

namespace  sysio
 
namespace  sysio::detail
 

Macros

#define CALL_WITH_400(api_name, api_handle, call_name, INVOKE, http_response_code)
 
#define INVOKE_R_R(api_handle, call_name, in_param)
 
#define INVOKE_R_V(api_handle, call_name)
 
#define INVOKE_V_R(api_handle, call_name, in_param)
 
#define INVOKE_V_V(api_handle, call_name)
 

Functions

 FC_REFLECT (sysio::detail::net_api_plugin_empty,)
 

Macro Definition Documentation

◆ CALL_WITH_400

#define CALL_WITH_400 ( api_name,
api_handle,
call_name,
INVOKE,
http_response_code )
Value:
{std::string("/v1/" #api_name "/" #call_name), \
[&api_handle](string, string body, url_response_callback cb) mutable { \
try { \
INVOKE \
cb(http_response_code, fc::variant(result)); \
} catch (...) { \
http_plugin::handle_exception(#api_name, #call_name, body, cb); \
} \
}}
stores null, int64, uint64, double, bool, string, std::vector<variant>, and variant_object's.
Definition variant.hpp:191

Definition at line 22 of file net_api_plugin.cpp.

22#define CALL_WITH_400(api_name, api_handle, call_name, INVOKE, http_response_code) \
23{std::string("/v1/" #api_name "/" #call_name), \
24 [&api_handle](string, string body, url_response_callback cb) mutable { \
25 try { \
26 INVOKE \
27 cb(http_response_code, fc::variant(result)); \
28 } catch (...) { \
29 http_plugin::handle_exception(#api_name, #call_name, body, cb); \
30 } \
31 }}

◆ INVOKE_R_R

#define INVOKE_R_R ( api_handle,
call_name,
in_param )
Value:
auto params = parse_params<in_param, http_params_types::params_required>(body);\
fc::variant result( api_handle.call_name( std::move(params) ) );
account_query_db::get_accounts_by_authorizers_params params

Definition at line 33 of file net_api_plugin.cpp.

33#define INVOKE_R_R(api_handle, call_name, in_param) \
34 auto params = parse_params<in_param, http_params_types::params_required>(body);\
35 fc::variant result( api_handle.call_name( std::move(params) ) );

◆ INVOKE_R_V

#define INVOKE_R_V ( api_handle,
call_name )
Value:
body = parse_params<std::string, http_params_types::no_params>(body); \
auto result = api_handle.call_name();

Definition at line 37 of file net_api_plugin.cpp.

37#define INVOKE_R_V(api_handle, call_name) \
38 body = parse_params<std::string, http_params_types::no_params>(body); \
39 auto result = api_handle.call_name();

◆ INVOKE_V_R

#define INVOKE_V_R ( api_handle,
call_name,
in_param )
Value:
auto params = parse_params<in_param, http_params_types::params_required>(body);\
api_handle.call_name( std::move(params) ); \

Definition at line 41 of file net_api_plugin.cpp.

41#define INVOKE_V_R(api_handle, call_name, in_param) \
42 auto params = parse_params<in_param, http_params_types::params_required>(body);\
43 api_handle.call_name( std::move(params) ); \
44 sysio::detail::net_api_plugin_empty result;

◆ INVOKE_V_V

#define INVOKE_V_V ( api_handle,
call_name )
Value:
body = parse_params<std::string, http_params_types::no_params_required>(body); \
api_handle.call_name(); \

Definition at line 46 of file net_api_plugin.cpp.

46#define INVOKE_V_V(api_handle, call_name) \
47 body = parse_params<std::string, http_params_types::no_params_required>(body); \
48 api_handle.call_name(); \
49 sysio::detail::net_api_plugin_empty result;

Function Documentation

◆ FC_REFLECT()