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 Namespace Reference

Namespaces

namespace  cmd
 
namespace  http
 
namespace  native
 
namespace  parse
 
namespace  utils
 

Classes

class  AuthManager
 
class  EVM
 
class  EVMStorage
 
class  Keccak256
 
class  Registry
 A class that represents a registry of features, transformations, and conditions. More...
 
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...
 
class  Session
 
class  SessionManager
 

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.
 
using SessionID = std::string
 
using UserID = std::string
 

Enumerations

enum class  AuthenticationError : std::uint8_t {
  Unknown = 0 , MissingCookie , InvalidCookie , MissingToken ,
  InvalidToken , InvalidSignature , InvalidNonce , InvalidAddress
}
 
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

asio::awaitable< std::expected< evmc::address, AuthenticationError > > authenticate (const http::Request &request, const AuthManager &auth_manager)
 
asio::awaitable< http::ResponseGET_version (const http::Request &, std::vector< RouteArg >, QueryArgsList, const std::string &build_timestamp)
 
asio::awaitable< http::ResponseHEAD_ServeFile (const http::Request &, std::vector< RouteArg >, QueryArgsList)
 
asio::awaitable< http::ResponseOPTIONS_ServeFile (const http::Request &, std::vector< RouteArg >, QueryArgsList)
 
asio::awaitable< http::ResponseGET_ServeFile (const http::Request &, std::vector< RouteArg >, QueryArgsList, const std::string mime_type, const std::string &file_content)
 
asio::awaitable< http::ResponseGET_ServeBinaryFile (const http::Request &, std::vector< RouteArg >, QueryArgsList, const std::string mime_type, const std::vector< std::byte > &file_content)
 
asio::awaitable< http::ResponseGET_nonce (const http::Request &, std::vector< RouteArg >, QueryArgsList, AuthManager &)
 Handle a GET request to /auth/nonce.
 
asio::awaitable< http::ResponsePOST_auth (const http::Request &, std::vector< RouteArg >, QueryArgsList, AuthManager &)
 Handles a POST request to /auth.
 
asio::awaitable< http::ResponsePOST_refresh (const http::Request &, std::vector< RouteArg >, QueryArgsList, AuthManager &)
 Handles a POST request to /auth/refresh.
 
asio::awaitable< http::ResponseGET_accountInfo (const http::Request &, std::vector< RouteArg >, QueryArgsList, Registry &registry)
 
asio::awaitable< http::ResponseOPTIONS_feature (const http::Request &, std::vector< RouteArg >, QueryArgsList)
 
asio::awaitable< http::ResponseGET_feature (const http::Request &, std::vector< RouteArg >, QueryArgsList, Registry &registry, EVM &evm)
 Returns the newest feature by name or a specific feature by name and id if the id is provided in the url.
 
asio::awaitable< http::ResponsePOST_feature (const http::Request &, std::vector< RouteArg >, QueryArgsList, AuthManager &auth_manager, Registry &registry, EVM &evm)
 Handle a POST request to /features.
 
asio::awaitable< http::ResponseOPTIONS_transformation (const http::Request &, std::vector< RouteArg >, QueryArgsList)
 
asio::awaitable< http::ResponseGET_transformation (const http::Request &, std::vector< RouteArg > args, QueryArgsList, Registry &registry, EVM &evm)
 
asio::awaitable< http::ResponsePOST_transformation (const http::Request &, std::vector< RouteArg > args, QueryArgsList, AuthManager &auth_manager, Registry &registry, EVM &evm)
 
asio::awaitable< http::ResponseGET_execute (const http::Request &request, std::vector< RouteArg > args, QueryArgsList, const AuthManager &auth_manager, const Registry &registry, EVM &evm)
 
asio::awaitable< http::ResponseGET_condition (const http::Request &)
 
asio::awaitable< http::ResponsePOST_condition (const http::Request &)
 
asio::awaitable< std::expected< std::vector< std::uint8_t >, evmc_status_code > > fetchOwner (EVM &evm, const evmc::address &address)
 
std::vector< std::uint8_t > constructFunctionSelector (std::string signature)
 
template<class T >
std::vector< std::uint8_t > encodeAsArg (const T &val)
 
template<>
std::vector< std::uint8_t > encodeAsArg< evmc::address > (const evmc::address &address)
 
template<>
std::vector< std::uint8_t > encodeAsArg< std::uint32_t > (const std::uint32_t &value)
 
template<>
std::vector< std::uint8_t > encodeAsArg< std::vector< std::uint32_t > > (const std::vector< std::uint32_t > &vec)
 
template<>
std::vector< std::uint8_t > encodeAsArg< std::vector< std::tuple< std::uint32_t, std::uint32_t > > > (const std::vector< std::tuple< std::uint32_t, std::uint32_t > > &vec)
 
template<>
std::vector< std::uint8_t > encodeAsArg< std::string > (const std::string &str)
 
template<class T >
T decodeReturnedValue (const std::vector< std::uint8_t > &bytes)
 
template<>
std::vector< std::vector< std::uint32_t > > decodeReturnedValue (const std::vector< std::uint8_t > &bytes)
 
template<>
evmc::address decodeReturnedValue (const std::vector< std::uint8_t > &bytes)
 
template<>
std::vector< SamplesdecodeReturnedValue (const std::vector< uint8_t > &bytes)
 
template<typename H >
H AbslHashValue (H h, const evmc::address &addr)
 
template<>
std::vector< std::uint8_t > encodeAsArg< evmc::address > (const evmc::address &address)
 
template<>
std::vector< std::uint8_t > encodeAsArg< std::uint32_t > (const std::uint32_t &value)
 
template<>
std::vector< std::uint8_t > encodeAsArg< std::vector< std::uint32_t > > (const std::vector< std::uint32_t > &vec)
 
template<>
std::vector< std::uint8_t > encodeAsArg< std::vector< std::tuple< std::uint32_t, std::uint32_t > > > (const std::vector< std::tuple< std::uint32_t, std::uint32_t > > &vec)
 
template<>
std::vector< std::uint8_t > encodeAsArg< std::string > (const std::string &str)
 
template<>
std::vector< std::vector< uint32_t > > decodeReturnedValue (const std::vector< std::uint8_t > &bytes)
 
template<>
evmc::address decodeReturnedValue (const std::vector< std::uint8_t > &bytes)
 
template<>
std::vector< SamplesdecodeReturnedValue (const std::vector< std::uint8_t > &bytes)
 
void setBinPath (std::filesystem::path bin_path)
 Set the BIN_PATH variable to the path of the binary directory.
 
std::filesystem::path getBinPath ()
 
std::filesystem::path getStoragePath ()
 
std::filesystem::path getResourcesPath ()
 
std::filesystem::path getLogsPath ()
 
std::filesystem::path getPTPath ()
 
std::optional< std::string > loadTextFile (std::filesystem::path path)
 
std::optional< std::vector< std::byte > > loadBinaryFile (std::filesystem::path path)
 
asio::awaitable< booldeployFeature (EVM &evm, Registry &registry, FeatureRecord feature)
 
asio::awaitable< booldeployTransformation (EVM &evm, Registry &registry, TransformationRecord transformation)
 
asio::awaitable< boolloadStoredTransformations (EVM &evm, Registry &registry)
 
asio::awaitable< boolloadStoredFeatures (EVM &evm, Registry &registry)
 
template<typename H >
H AbslHashValue (H h, const Condition &c)
 Combines hash values for a Condition object.
 
template<typename H >
H AbslHashValue (H h, const TransformationDef &td)
 Combines hash values for a TransformationDef object.
 
template<typename H >
H AbslHashValue (H h, const Dimension &d)
 Combines hash values for a Dimension object.
 
template<typename H >
H AbslHashValue (H h, const Feature &f)
 Combines hash values for a Feature object.
 
std::string constructFeatureSolidityCode (const Feature &feature)
 
template<typename H >
H AbslHashValue (H h, const Transformation &t)
 Combines hash values for a Transformation object.
 
std::string constructTransformationSolidityCode (const Transformation &transformation)
 
template<typename H >
H AbslHashValue (H h, const RouteKey &route_key)
 Combines hash values for a RouteKey object.
 

Variables

const asio::ip::port_type DEFAULT_PORT = 54321
 
const asio::ip::port_type DEFAULT_TLS_PORT = 54322
 
const short int MAJOR_VERSION = 0
 
const short int MINOR_VERSION = 0
 
const short int PATCH_VERSION = 1
 

Typedef Documentation

◆ HandlerDefinition

Type representing a route handler function.

◆ QueryArgsList

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

◆ SessionID

using dcn::SessionID = typedef std::string

◆ UserID

using dcn::UserID = typedef std::string

Enumeration Type Documentation

◆ AuthenticationError

enum class dcn::AuthenticationError : std::uint8_t
strong
Enumerator
Unknown 
MissingCookie 
InvalidCookie 
MissingToken 
InvalidToken 
InvalidSignature 
InvalidNonce 
InvalidAddress 

◆ 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() [1/7]

template<typename H >
H dcn::AbslHashValue ( H  h,
const Condition c 
)
inline

Combines hash values for a Condition object.

Template Parameters
HThe hash state type.
Parameters
hThe initial hash state.
cThe Condition object whose attributes will be hashed.
Returns
A combined hash state incorporating the name and solution source of the Condition.

◆ AbslHashValue() [2/7]

template<typename H >
H dcn::AbslHashValue ( H  h,
const Dimension d 
)
inline

Combines hash values for a Dimension object.

Template Parameters
HThe hash state type.
Parameters
hThe initial hash state.
dThe Dimension object whose attributes will be hashed.
Returns
A combined hash state incorporating the feature name and all transformation names of the Dimension.

◆ AbslHashValue() [3/7]

template<typename H >
H dcn::AbslHashValue ( H  h,
const evmc::address &  addr 
)
inline

◆ AbslHashValue() [4/7]

template<typename H >
H dcn::AbslHashValue ( H  h,
const Feature f 
)
inline

Combines hash values for a Feature object.

Template Parameters
HThe hash state type.
Parameters
hThe initial hash state.
fThe Feature object whose attributes will be hashed.
Returns
A combined hash state incorporating the name and dimensions of the Feature.

◆ AbslHashValue() [5/7]

template<typename H >
H dcn::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.

◆ AbslHashValue() [6/7]

template<typename H >
H dcn::AbslHashValue ( H  h,
const Transformation t 
)
inline

Combines hash values for a Transformation object.

Template Parameters
HThe hash state type.
Parameters
hThe initial hash state.
tThe Transformation object whose attributes will be hashed.
Returns
A combined hash state incorporating the name and source of the Transformation.

◆ AbslHashValue() [7/7]

template<typename H >
H dcn::AbslHashValue ( H  h,
const TransformationDef td 
)
inline

Combines hash values for a TransformationDef object.

Template Parameters
HThe hash state type.
Parameters
hThe initial hash state.
tdThe TransformationDef object whose attributes will be hashed.
Returns
A combined hash state incorporating the feature name and all transformation names of the TransformationDef.

◆ authenticate()

asio::awaitable< std::expected< evmc::address, AuthenticationError > > dcn::authenticate ( const http::Request request,
const AuthManager auth_manager 
)

◆ constructFeatureSolidityCode()

std::string dcn::constructFeatureSolidityCode ( const Feature feature)

◆ constructFunctionSelector()

std::vector< std::uint8_t > dcn::constructFunctionSelector ( std::string  signature)

◆ constructTransformationSolidityCode()

std::string dcn::constructTransformationSolidityCode ( const Transformation transformation)

◆ decodeReturnedValue() [1/7]

template<class T >
T dcn::decodeReturnedValue ( const std::vector< std::uint8_t > &  bytes)

◆ decodeReturnedValue() [2/7]

template<>
std::vector< std::vector< std::uint32_t > > dcn::decodeReturnedValue ( const std::vector< std::uint8_t > &  bytes)

◆ decodeReturnedValue() [3/7]

template<>
evmc::address dcn::decodeReturnedValue ( const std::vector< std::uint8_t > &  bytes)

◆ decodeReturnedValue() [4/7]

template<>
std::vector< std::vector< uint32_t > > dcn::decodeReturnedValue ( const std::vector< std::uint8_t > &  bytes)

◆ decodeReturnedValue() [5/7]

template<>
evmc::address dcn::decodeReturnedValue ( const std::vector< std::uint8_t > &  bytes)

◆ decodeReturnedValue() [6/7]

template<>
std::vector< Samples > dcn::decodeReturnedValue ( const std::vector< std::uint8_t > &  bytes)

◆ decodeReturnedValue() [7/7]

template<>
std::vector< Samples > dcn::decodeReturnedValue ( const std::vector< uint8_t > &  bytes)

◆ deployFeature()

asio::awaitable< bool > dcn::deployFeature ( EVM evm,
Registry registry,
FeatureRecord  feature 
)

◆ deployTransformation()

asio::awaitable< bool > dcn::deployTransformation ( EVM evm,
Registry registry,
TransformationRecord  transformation 
)

◆ encodeAsArg()

template<class T >
std::vector< std::uint8_t > dcn::encodeAsArg ( const T val)

◆ encodeAsArg< evmc::address >() [1/2]

template<>
std::vector< std::uint8_t > dcn::encodeAsArg< evmc::address > ( const evmc::address &  address)

◆ encodeAsArg< evmc::address >() [2/2]

template<>
std::vector< std::uint8_t > dcn::encodeAsArg< evmc::address > ( const evmc::address &  address)

◆ encodeAsArg< std::string >() [1/2]

template<>
std::vector< std::uint8_t > dcn::encodeAsArg< std::string > ( const std::string &  str)

◆ encodeAsArg< std::string >() [2/2]

template<>
std::vector< std::uint8_t > dcn::encodeAsArg< std::string > ( const std::string &  str)

◆ encodeAsArg< std::uint32_t >() [1/2]

template<>
std::vector< std::uint8_t > dcn::encodeAsArg< std::uint32_t > ( const std::uint32_t &  value)

◆ encodeAsArg< std::uint32_t >() [2/2]

template<>
std::vector< std::uint8_t > dcn::encodeAsArg< std::uint32_t > ( const std::uint32_t &  value)

◆ encodeAsArg< std::vector< std::tuple< std::uint32_t, std::uint32_t > > >() [1/2]

template<>
std::vector< std::uint8_t > dcn::encodeAsArg< std::vector< std::tuple< std::uint32_t, std::uint32_t > > > ( const std::vector< std::tuple< std::uint32_t, std::uint32_t > > &  vec)

◆ encodeAsArg< std::vector< std::tuple< std::uint32_t, std::uint32_t > > >() [2/2]

template<>
std::vector< std::uint8_t > dcn::encodeAsArg< std::vector< std::tuple< std::uint32_t, std::uint32_t > > > ( const std::vector< std::tuple< std::uint32_t, std::uint32_t > > &  vec)

◆ encodeAsArg< std::vector< std::uint32_t > >() [1/2]

template<>
std::vector< std::uint8_t > dcn::encodeAsArg< std::vector< std::uint32_t > > ( const std::vector< std::uint32_t > &  vec)

◆ encodeAsArg< std::vector< std::uint32_t > >() [2/2]

template<>
std::vector< std::uint8_t > dcn::encodeAsArg< std::vector< std::uint32_t > > ( const std::vector< std::uint32_t > &  vec)

◆ fetchOwner()

asio::awaitable< std::expected< std::vector< std::uint8_t >, evmc_status_code > > dcn::fetchOwner ( EVM evm,
const evmc::address &  address 
)

◆ GET_accountInfo()

asio::awaitable< http::Response > dcn::GET_accountInfo ( const http::Request request,
std::vector< RouteArg args,
QueryArgsList  query_args,
Registry registry 
)

◆ GET_condition()

asio::awaitable< http::Response > dcn::GET_condition ( const http::Request )

◆ GET_execute()

asio::awaitable< http::Response > dcn::GET_execute ( const http::Request request,
std::vector< RouteArg args,
QueryArgsList  ,
const AuthManager auth_manager,
const Registry registry,
EVM evm 
)

◆ GET_feature()

asio::awaitable< http::Response > dcn::GET_feature ( const http::Request ,
std::vector< RouteArg args,
QueryArgsList  ,
Registry registry,
EVM evm 
)

Returns the newest feature by name or a specific feature by name and id if the id is provided in the url.

The url must be in one of the following formats:

  • /features/<feature_name>
  • /features/<feature_name>/<feature_id>

◆ GET_nonce()

asio::awaitable< http::Response > dcn::GET_nonce ( const http::Request request,
std::vector< RouteArg args,
QueryArgsList  ,
AuthManager auth_manager 
)

Handle a GET request to /auth/nonce.

The url must be in the following format:

  • /auth/nonce/<nonce>

The response body will be a json string with the following format:

{ "nonce": "<nonce>" }

Where <nonce> is the generated nonce.

◆ GET_ServeBinaryFile()

asio::awaitable< http::Response > dcn::GET_ServeBinaryFile ( const http::Request ,
std::vector< RouteArg ,
QueryArgsList  ,
const std::string  mime_type,
const std::vector< std::byte > &  file_content 
)

◆ GET_ServeFile()

asio::awaitable< http::Response > dcn::GET_ServeFile ( const http::Request ,
std::vector< RouteArg ,
QueryArgsList  ,
const std::string  mime_type,
const std::string &  file_content 
)

Handles GET requests for a simple form by returning the form content.

Parameters
requestThe incoming HTTP request (not used in this implementation)
routeArgsRoute arguments (not used in this implementation)
simple_formThe content of the simple form to be returned
Returns
An HTTP response with the simple form content

◆ GET_transformation()

asio::awaitable< http::Response > dcn::GET_transformation ( const http::Request request,
std::vector< RouteArg args,
QueryArgsList  ,
Registry registry,
EVM evm 
)

Handles GET requests for the transformation endpoint.

Retrieves a transformation by name and optional ID, and returns it as JSON.

Parameters
requestThe incoming HTTP request
argsRoute arguments (transformation name and optional ID)
registryRegistry instance for retrieving transformations
Returns
An HTTP response with the transformation data as JSON, or an error response if invalid input or not found

◆ GET_version()

asio::awaitable< http::Response > dcn::GET_version ( const http::Request ,
std::vector< RouteArg ,
QueryArgsList  ,
const std::string &  build_timestamp 
)

◆ getBinPath()

std::filesystem::path dcn::getBinPath ( )

◆ getLogsPath()

std::filesystem::path dcn::getLogsPath ( )

◆ getPTPath()

std::filesystem::path dcn::getPTPath ( )

◆ getResourcesPath()

std::filesystem::path dcn::getResourcesPath ( )

◆ getStoragePath()

std::filesystem::path dcn::getStoragePath ( )

◆ HEAD_ServeFile()

asio::awaitable< http::Response > dcn::HEAD_ServeFile ( const http::Request ,
std::vector< RouteArg ,
QueryArgsList   
)

Handles HEAD requests for a simple form by returning a response with CORS headers.

Parameters
requestThe incoming HTTP request (not used in this implementation)
routeArgsRoute arguments (not used in this implementation)
Returns
An HTTP response with CORS headers for the simple form

◆ loadBinaryFile()

std::optional< std::vector< std::byte > > dcn::loadBinaryFile ( std::filesystem::path  path)

◆ loadStoredFeatures()

asio::awaitable< bool > dcn::loadStoredFeatures ( EVM evm,
Registry registry 
)

◆ loadStoredTransformations()

asio::awaitable< bool > dcn::loadStoredTransformations ( EVM evm,
Registry registry 
)

◆ loadTextFile()

std::optional< std::string > dcn::loadTextFile ( std::filesystem::path  path)

◆ OPTIONS_feature()

asio::awaitable< http::Response > dcn::OPTIONS_feature ( const http::Request ,
std::vector< RouteArg ,
QueryArgsList   
)

Handles OPTIONS requests by returning a response with CORS headers.

Parameters
requestThe incoming HTTP request (not used in this implementation)
routeArgsRoute arguments (not used in this implementation)
Returns
An HTTP response with CORS headers

◆ OPTIONS_ServeFile()

asio::awaitable< http::Response > dcn::OPTIONS_ServeFile ( const http::Request ,
std::vector< RouteArg ,
QueryArgsList   
)

Handles OPTIONS requests for a simple form by returning a response with CORS headers.

Parameters
requestThe incoming HTTP request (not used in this implementation)
routeArgsRoute arguments (not used in this implementation)
Returns
An HTTP response with CORS headers for the simple form

◆ OPTIONS_transformation()

asio::awaitable< http::Response > dcn::OPTIONS_transformation ( const http::Request ,
std::vector< RouteArg ,
QueryArgsList   
)

Handles OPTIONS requests for the transformation endpoint by returning a response with CORS headers.

Parameters
requestThe incoming HTTP request (not used in this implementation)
routeArgsRoute arguments (not used in this implementation)
Returns
An HTTP response with CORS headers for the transformation endpoint

◆ POST_auth()

asio::awaitable< http::Response > dcn::POST_auth ( const http::Request request,
std::vector< RouteArg args,
QueryArgsList  ,
AuthManager auth_manager 
)

Handles a POST request to /auth.

The url must be in the following format:

  • /auth

The request body must be a json string in format

{ "address": "<address>", "signature": "<signature>", "message": "<message>" }

Where <address> is the address of the user who is trying to authenticate, <signature> is the signature of the message by the user, and <message> is the nonce generated by the server.

The response body will be a json string in format

{ "success": "true/false", }

Parameters
requestThe request object
argsThe arguments of the request
auth_managerThe authentication manager
Returns
http::Response The response object

◆ POST_condition()

asio::awaitable< http::Response > dcn::POST_condition ( const http::Request )

◆ POST_feature()

asio::awaitable< http::Response > dcn::POST_feature ( const http::Request request,
std::vector< RouteArg args,
QueryArgsList  ,
AuthManager auth_manager,
Registry registry,
EVM evm 
)

Handle a POST request to /features.

The url must be in the following format:

  • /features

The request body must be a json string representing a hm::Feature object.

The response body will be a json string with the following format:

{ "name": "<name>", "version": "<version>" }

Where <name> is the name of the feature and <version> is the hash of the feature.

◆ POST_refresh()

asio::awaitable< http::Response > dcn::POST_refresh ( const http::Request request,
std::vector< RouteArg args,
QueryArgsList  ,
AuthManager auth_manager 
)

Handles a POST request to /auth/refresh.

The url must be in the following format:

  • /auth/refresh

The request body must be a json string in format

{ "refresh_token": "<refresh_token>" }

Where <refresh_token> is the refresh token of the user who is trying to refresh their access token.

The response body will be a json string in format

{ "success": "true/false" }

Parameters
requestThe request object
argsThe arguments of the request
auth_managerThe authentication manager
Returns
http::Response The response object

◆ POST_transformation()

asio::awaitable< http::Response > dcn::POST_transformation ( const http::Request request,
std::vector< RouteArg args,
QueryArgsList  ,
AuthManager auth_manager,
Registry registry,
EVM evm 
)

Handles POST requests for the transformation endpoint.

Verifies the access token in the cookie header, then adds a new transformation to the registry.

Parameters
requestThe incoming HTTP request with the transformation data in the body
argsRoute arguments (not used in this implementation)
auth_managerAuthentication manager instance for verifying access tokens
registryRegistry instance for adding transformations
Returns
An HTTP response with the added transformation data as JSON, or an error response if invalid input or authentication failure

◆ setBinPath()

void dcn::setBinPath ( std::filesystem::path  bin_path)

Set the BIN_PATH variable to the path of the binary directory.

Parameters
bin_pathThe path of the binary directory.

Variable Documentation

◆ DEFAULT_PORT

const asio::ip::port_type dcn::DEFAULT_PORT = 54321

◆ DEFAULT_TLS_PORT

const asio::ip::port_type dcn::DEFAULT_TLS_PORT = 54322

◆ MAJOR_VERSION

const short int dcn::MAJOR_VERSION = 0

◆ MINOR_VERSION

const short int dcn::MINOR_VERSION = 0

◆ PATCH_VERSION

const short int dcn::PATCH_VERSION = 1