code: user,rpc,hpp (1 files)

This commit is contained in:
2025-12-26 05:49:07 +00:00
parent 25128b3d85
commit 34633029d8

View 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