7#include <llhttp/llhttp.h>
56 std::variant<ErrorDetails, RedirectDetails, nlohmann::json>;
58 nlohmann::json
get_json_params(
const std::shared_ptr<ccf::RpcContext>& ctx);
66 nlohmann::json&& result_payload);
68 const nlohmann::json& result_payload);
std::function< void(CommandEndpointContext &args)> CommandEndpointFunction
Definition endpoint_context.h:52
std::function< void(ReadOnlyEndpointContext &args)> ReadOnlyEndpointFunction
Definition endpoint_context.h:80
std::function< void(EndpointContext &args)> EndpointFunction
Definition endpoint_context.h:63
void set_response(JsonAdapterResponse &&res, std::shared_ptr< ccf::RpcContext > &ctx)
Definition json_handler.cpp:37
std::variant< ErrorDetails, RedirectDetails, nlohmann::json > JsonAdapterResponse
Definition json_handler.h:56
nlohmann::json get_json_params(const std::shared_ptr< ccf::RpcContext > &ctx)
Definition json_handler.cpp:19
Definition app_interface.h:14
std::function< jsonhandler::JsonAdapterResponse(endpoints::ReadOnlyEndpointContext &ctx, nlohmann::json &¶ms)> ReadOnlyHandlerWithJson
Definition json_handler.h:83
std::function< jsonhandler::JsonAdapterResponse(endpoints::CommandEndpointContext &ctx, nlohmann::json &¶ms)> CommandHandlerWithJson
Definition json_handler.h:88
jsonhandler::JsonAdapterResponse make_redirect(ccf::http_status status)
Definition json_handler.cpp:123
jsonhandler::JsonAdapterResponse make_success()
Definition json_handler.cpp:99
endpoints::CommandEndpointFunction json_command_adapter(const CommandHandlerWithJson &f)
Definition json_handler.cpp:145
std::function< jsonhandler::JsonAdapterResponse(endpoints::EndpointContext &ctx, nlohmann::json &¶ms)> HandlerJsonParamsAndForward
Definition json_handler.h:77
llhttp_status http_status
Definition http_status.h:9
endpoints::ReadOnlyEndpointFunction json_read_only_adapter(const ReadOnlyHandlerWithJson &f)
Definition json_handler.cpp:136
endpoints::EndpointFunction json_adapter(const HandlerJsonParamsAndForward &f)
Definition json_handler.cpp:128
jsonhandler::JsonAdapterResponse make_error(ccf::http_status status, const std::string &code, const std::string &msg)
Definition json_handler.cpp:115
Definition endpoint_context.h:24
Definition endpoint_context.h:55
Definition endpoint_context.h:70