#pragma once #include using namespace seastar; using namespace httpd; #include class Database { seastar::httpd::http_server_control& srv; public: explicit Database(seastar::httpd::http_server_control& srv) : srv(srv) {} seastar::future stop(); }; class GetHandler : public handler_base { public: explicit GetHandler(Database& db); future> handle(const sstring& path, std::unique_ptr req, std::unique_ptr rep) override; private: Database& db; }; class PutHandler : public handler_base { public: explicit PutHandler(Database& db); future> handle(const sstring& path, std::unique_ptr req, std::unique_ptr rep) override; private: Database& db; }; class DeleteHandler : public handler_base { public: explicit DeleteHandler(Database& db); future> handle(const sstring& path, std::unique_ptr req, std::unique_ptr rep) override; private: Database& db; };