Decentralised Art Server
High-performance C++ backend that exposes HTML interface and a secure REST API for managing Performative Transactions entities
 
Loading...
Searching...
No Matches
dcn::server Namespace Reference

Classes

class  RouteArg
 A class representing a route argument. More...
 
struct  RouteArgDef
 A pair of RouteArgType and RouteArgRequirement. More...
 
class  RouteHandlerFunc
 A class representing a route handler function. More...
 
class  RouteKey
 A class representing a route key, which is a combination of a HTTP method and a URL. More...
 
class  Router
 A class representing a router for handling HTTP requests. More...
 
class  Server
 A class representing a server for handling HTTP requests. More...
 

Typedefs

using QueryArgsList = absl::flat_hash_map< std::string, RouteArg >
 
using HandlerDefinition = std::function< asio::awaitable< dcn::http::Response >(const dcn::http::Request &, std::vector< RouteArg >, QueryArgsList)>
 Type representing a route handler function.
 

Enumerations

enum class  RouteArgType {
  Unknown = 0 , character , unsigned_integer , base58 ,
  string , array , object
}
 Enum to represent the type of a route argument. More...
 
enum class  RouteArgRequirement { Unknown = 0 , optional , required }
 Enum to represent the requirement of a route argument. More...
 

Functions

template<typename H >
H AbslHashValue (H h, const RouteKey &route_key)
 Combines hash values for a RouteKey object.
 

Typedef Documentation

◆ HandlerDefinition

Type representing a route handler function.

◆ QueryArgsList

using dcn::server::QueryArgsList = typedef absl::flat_hash_map<std::string, RouteArg>

Enumeration Type Documentation

◆ RouteArgRequirement

Enum to represent the requirement of a route argument.

This enum represents the possible requirements of a route argument.

Enumerator
Unknown 
optional 
required 

◆ RouteArgType

Enum to represent the type of a route argument.

This enum represents the possible types of a route argument.

Enumerator
Unknown 
character 
unsigned_integer 
base58 
string 
array 
object 

Function Documentation

◆ AbslHashValue()

template<typename H >
H dcn::server::AbslHashValue ( H  h,
const RouteKey route_key 
)
inline

Combines hash values for a RouteKey object.

Template Parameters
HThe hash state type.
Parameters
hThe initial hash state.
route_keyThe RouteKey object whose attributes will be hashed.
Returns
A combined hash state incorporating the HTTP method and path of the RouteKey.