9#ifndef MANTISBASE_TYPES_H
10#define MANTISBASE_TYPES_H
13#include <nlohmann/json.hpp>
19 class MantisContentReader;
22 class EntitySchemaField;
24 namespace fs = std::filesystem;
32 using json = nlohmann::json;
57#define REQUEST_HANDLED HandlerResponse::Handled;
58#define REQUEST_PENDING HandlerResponse::Unhandled;
Middleware shorthand for the content reader
Definition http.h:552
A wrapper class around httplib::Request offering a consistent API and allowing for easy wrapper metho...
Definition http.h:42
Wrapper around httplib::Response for consistent API.
Definition http.h:318
router.h
Definition auth.h:15
std::pair< Method, Path > RouteKey
Shorthand notation for the request's method, path pair.
Definition types.h:55
std::vector< MiddlewareFn > Middlewares
Middleware function arrays
Definition types.h:46
std::string Path
Syntactic sugar for request path which is a std::string
Definition types.h:52
std::function< HandlerResponse(MantisRequest &, MantisResponse &)> MiddlewareFn
Middleware shorthand for the function
Definition types.h:43
std::function< void(MantisRequest &, MantisResponse &, MantisContentReader &)> HandlerWithContentReaderFn
Route Handler function with content reader shorthand
Definition types.h:40
httplib::Server::HandlerResponse HandlerResponse
Definition types.h:33
std::function< void(MantisRequest &, MantisResponse &)> HandlerFn
Route Handler function shorthand
Definition types.h:36
std::string Method
Syntactic sugar for request method which is a std::string
Definition types.h:49
nlohmann::json json
Shorten JSON namespace.
Definition context_store.h:18