Базовый контроллер собран

This commit is contained in:
Антон
2025-08-23 21:38:53 +03:00
parent 8121534981
commit 823c6ccfe9
8 changed files with 92 additions and 86 deletions
@@ -1,7 +0,0 @@
#include "AuthController.h"
namespace uad
{
}
-9
View File
@@ -1,9 +0,0 @@
namespace uad
{
template <class Body, class Allocator, class Send>
class AuthController
{
public:
virtual ~AuthController() = default;
};
}
+20
View File
@@ -0,0 +1,20 @@
#pragma once
#include <boost/beast.hpp>
#include "./IController.h"
namespace uad
{
template <class Body, class Allocator, class ResponseType>
class Controller : IController<Body, Allocator, ResponseType>
{
public:
std::optional<std::unique_ptr<IExecutor<Body, Allocator, ResponseType>>> FindExecutor(
boost::beast::http::verb method
) const override
{
return std::nullopt;
}
};
}
+26
View File
@@ -0,0 +1,26 @@
#pragma once
#include <boost/beast.hpp>
namespace uad
{
template <class Body, class Allocator, class ResponseType>
class IExecutor
{
public:
virtual boost::beast::http::response<ResponseType> operator ()(
boost::beast::http::request<Body, boost::beast::http::basic_fields<Allocator>>&& req
) = 0;
virtual ~IExecutor() = default;
};
template <class Body, class Allocator, class ResponseType>
class IController
{
public:
virtual std::optional<std::unique_ptr<IExecutor<Body, Allocator, ResponseType>>> FindExecutor(
boost::beast::http::verb method
) const = 0;
virtual ~IController() = default;
};
}