mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
code: user,rpc,hpp (1 files)
This commit is contained in:
46
dbal/cpp/src/daemon/rpc_user_actions.hpp
Normal file
46
dbal/cpp/src/daemon/rpc_user_actions.hpp
Normal file
@@ -0,0 +1,46 @@
|
||||
#ifndef DBAL_RPC_USER_ACTIONS_HPP
|
||||
#define DBAL_RPC_USER_ACTIONS_HPP
|
||||
|
||||
#include <functional>
|
||||
#include <json/json.h>
|
||||
|
||||
#include "dbal/core/client.hpp"
|
||||
|
||||
namespace dbal {
|
||||
namespace daemon {
|
||||
namespace rpc {
|
||||
|
||||
using ResponseSender = std::function<void(const Json::Value&)>;
|
||||
using ErrorSender = std::function<void(const std::string&, int)>;
|
||||
|
||||
void handle_user_list(Client& client,
|
||||
const Json::Value& options,
|
||||
ResponseSender send_success,
|
||||
ErrorSender send_error);
|
||||
|
||||
void handle_user_read(Client& client,
|
||||
const std::string& id,
|
||||
ResponseSender send_success,
|
||||
ErrorSender send_error);
|
||||
|
||||
void handle_user_create(Client& client,
|
||||
const Json::Value& payload,
|
||||
ResponseSender send_success,
|
||||
ErrorSender send_error);
|
||||
|
||||
void handle_user_update(Client& client,
|
||||
const std::string& id,
|
||||
const Json::Value& payload,
|
||||
ResponseSender send_success,
|
||||
ErrorSender send_error);
|
||||
|
||||
void handle_user_delete(Client& client,
|
||||
const std::string& id,
|
||||
ResponseSender send_success,
|
||||
ErrorSender send_error);
|
||||
|
||||
} // namespace rpc
|
||||
} // namespace daemon
|
||||
} // namespace dbal
|
||||
|
||||
#endif // DBAL_RPC_USER_ACTIONS_HPP
|
||||
Reference in New Issue
Block a user