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

Go to the source code of this file.

Classes

class  sysio::test_control_api_plugin_impl
 
struct  sysio::async_result_visitor
 

Namespaces

namespace  sysio
 

Macros

#define CALL_WITH_API_400(api_name, api_handle, api_namespace, call_name, http_response_code, params_type)
 
#define TEST_CONTROL_RW_CALL(call_name, http_response_code, params_type)
 

Macro Definition Documentation

◆ CALL_WITH_API_400

#define CALL_WITH_API_400 ( api_name,
api_handle,
api_namespace,
call_name,
http_response_code,
params_type )
Value:
{std::string("/v1/" #api_name "/" #call_name), \
[api_handle](string, string body, url_response_callback cb) mutable { \
try { \
auto params = parse_params<api_namespace::call_name ## _params, params_type>(body);\
fc::variant result( api_handle.call_name( std::move(params) ) ); \
cb(http_response_code, std::move(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
account_query_db::get_accounts_by_authorizers_params params

Definition at line 34 of file test_control_api_plugin.cpp.

34#define CALL_WITH_API_400(api_name, api_handle, api_namespace, call_name, http_response_code, params_type) \
35{std::string("/v1/" #api_name "/" #call_name), \
36 [api_handle](string, string body, url_response_callback cb) mutable { \
37 try { \
38 auto params = parse_params<api_namespace::call_name ## _params, params_type>(body);\
39 fc::variant result( api_handle.call_name( std::move(params) ) ); \
40 cb(http_response_code, std::move(result)); \
41 } catch (...) { \
42 http_plugin::handle_exception(#api_name, #call_name, body, cb); \
43 } \
44 }}

◆ TEST_CONTROL_RW_CALL

#define TEST_CONTROL_RW_CALL ( call_name,
http_response_code,
params_type )
Value:
CALL_WITH_API_400(test_control, rw_api, test_control_apis::read_write, call_name, http_response_code, params_type)
#define CALL_WITH_API_400(api_name, api_handle, api_namespace, call_name, http_response_code, params_type)

Definition at line 46 of file test_control_api_plugin.cpp.