MySQL 9.4.0
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
mrs::endpoint::handler Namespace Reference

Namespaces

namespace  anonymous_namespace{handler_content_file.cc}
 
 
namespace  anonymous_namespace{handler_db_object_openapi.cc}
 
namespace  anonymous_namespace{handler_db_object_script.cc}
 
 
 
namespace  anonymous_namespace{handler_db_schema_openapi.cc}
 
namespace  anonymous_namespace{handler_db_service_debug.cc}
 
 
namespace  anonymous_namespace{handler_db_service_openapi.cc}
 

Classes

class  HandlerAuthorizeAuthApps
 
class  HandlerAuthorizeBase
 
class  HandlerAuthorizeCompleted
 
class  HandlerAuthorizeLogin
 
class  HandlerAuthorizeLogout
 
class  HandlerAuthorizeStatus
 
class  HandlerAuthorizeUser
 
class  HandlerCallback
 
class  HandlerContentFile
 
class  HandlerDbObjectFunction
 
class  HandlerDbObjectMetadata
 
class  HandlerDbObjectOpenAPI
 
class  HandlerDbObjectScript
 
class  HandlerDbObjectSP
 
class  HandlerDbObjectTable
 
class  HandlerDbSchemaMetadata
 
class  HandlerDbSchemaMetadataCatalog
 
class  HandlerDbSchemaOpenAPI
 
class  HandlerDbServiceDebug
 
class  HandlerDbServiceMetadata
 
class  HandlerDbServiceOpenAPI
 
class  HandlerDebug
 
class  HandlerRedirection
 
class  HandlerString
 
class  PersistentDataContentFile
 

Typedefs

using HttpResult = HandlerAuthorizeAuthApps::HttpResult
 
using Session = HandlerAuthorizeLogin::Session
 
using Url = helper::http::Url
 
using CachedObject = collector::MysqlCacheManager::CachedObject
 
using Authorization = mrs::rest::Handler::Authorization
 
using Request = mrs::rest::RequestContext::Request
 
using ResultSets = mrs::database::entry::ResultSets
 
using Fields = std::vector< mrs::database::entry::Field >
 
using MysqlCacheManager = collector::MysqlCacheManager
 
using MySQLConnection = collector::MySQLConnection
 
using MediaType = helper::MediaType
 
using Protocols = std::set< std::string >
 
using FetchedFile = PersistentDataContentFile::FetchedFile
 
using MySQLSession = collector::MysqlCacheManager::Object
 

Enumerations

enum  Protocol { k_protocolHttp , k_protocolHttps }
 
enum  UsedProtocol { k_usedProtocolNone , k_usedProtocolHttp , k_usedProtocolHttps }
 

Functions

static void append_no_referrer (::http::base::Headers *headers)
 
static const char * get_authentication_status (HttpStatusCode::key_type code)
 
static std::string impl_get_json_response (const HttpStatusCode::key_type k_status, const char *message)
 
static HttpResult get_json_response_ok ()
 
template<typename T >
static std::string as_string (const std::vector< T > &v)
 
template<typename T >
static std::string as_string (const std::vector< T > &v)
 
auto path_schema_catalog (const std::string &service_schema_path)
 
std::string url_sch_metadata_catalog (const ::http::base::Uri &uri)
 
auto path_service_debug (const std::string &service_path)
 
auto path_service_metadata (const std::string &service_path)
 
auto path_schema_metadata (const std::string &service_schema_path)
 
auto path_object_metadata (const std::string &service_schema_path, const std::string &obj_name)
 
auto path_obj_openapi_swagger (const std::string &service_schema_path, const std::string &obj_name)
 
auto path_schema_openapi_swagger (const std::string &service_schema_path)
 
auto path_schema_openapi_swagger_alias (const std::string &service_name, const std::string &schema_name)
 
auto path_service_openapi_swagger (const std::string &service_path)
 
auto path_db_object_with_index (const std::string &object_path, const std::string &service_schema_path, const bool is_index)
 
auto path_file (std::string service_schema_path, const std::string &object_path, bool is_index)
 
std::string remove_leading_slash_from_path (const std::string &path)
 
auto path_content_file (const std::string &service_schema_path)
 
template<typename Type >
std::shared_ptr< Typelock_or_throw_unavail (std::weak_ptr< Type > &endpoint)
 
template<typename Type >
std::shared_ptr< Typelock (const std::weak_ptr< Type > &endpoint)
 
template<typename Type >
const std::shared_ptr< Type > & lock (std::shared_ptr< Type > &endpoint)
 
std::string get_endpoint_host (const ::http::base::Uri &url)
 
std::string get_endpoint_host (std::weak_ptr< mrs::interface::EndpointBase > wp)
 
std::shared_ptr< DbSchemaEndpointlock_parent (const std::shared_ptr< DbObjectEndpoint > &endpoint)
 
std::shared_ptr< DbServiceEndpointlock_parent (const std::shared_ptr< DbSchemaEndpoint > &endpoint)
 
std::shared_ptr< ContentSetEndpointlock_parent (ContentFileEndpoint *endpoint)
 
std::shared_ptr< ContentSetEndpointlock_parent (const std::shared_ptr< ContentFileEndpoint > &endpoint)
 
std::shared_ptr< DbServiceEndpointlock_parent (const std::shared_ptr< ContentSetEndpoint > &endpoint)
 
std::optional< std::string > merge_options (std::optional< std::string > options, std::optional< std::string > parent_options)
 
std::optional< std::string > get_endpoint_options (const std::shared_ptr< DbServiceEndpoint > &endpoint)
 
std::optional< std::string > get_endpoint_options (const std::shared_ptr< DbSchemaEndpoint > &endpoint)
 
std::optional< std::string > get_endpoint_options (const std::shared_ptr< DbObjectEndpoint > &endpoint)
 
std::optional< std::string > get_endpoint_options (const std::shared_ptr< ContentSetEndpoint > &endpoint)
 
std::optional< std::string > get_endpoint_options (const std::shared_ptr< ContentFileEndpoint > &endpoint)
 
Protocols get_endpoint_protocol (std::shared_ptr< DbServiceEndpoint > &endpoint)
 
template<typename Endpoint >
Protocols get_endpoint_protocol (std::shared_ptr< Endpoint > &endpoint)
 
UsedProtocol get_properly_configured_used_protocol (const std::set< std::string > &protocols, const mrs::interface::EndpointConfiguration *configuration)
 
Protocol get_properly_configured_protocol (const std::set< std::string > &protocols, const mrs::interface::EndpointConfiguration *configuration)
 
void add_protocol_to_host (UsedProtocol protocol, ::http::base::Uri *uri)
 
template<typename EndpointPtr >
Protocol get_protocol (EndpointPtr endpoint)
 
static CachedObject get_session (MySQLSession session, MysqlCacheManager *cache_manager, MySQLConnection type=MySQLConnection::kMySQLConnectionMetadataRO)
 
std::string get_endpoint_url (std::weak_ptr< mrs::endpoint::DbObjectEndpoint > &wp)
 
std::string get_path_after_object_name (const ::http::base::Uri &base_uri, const ::http::base::Uri &requests_uri)
 
std::string get_path_after_object_name (std::weak_ptr< mrs::endpoint::DbObjectEndpoint > &wp, const ::http::base::Uri &requests_uri)
 
HttpResult handler_mysqlerror (const mysqlrouter::MySQLSession::Error &e, const char *sql_state)
 
mysqlrouter::sqlstring get_user_id (rest::RequestContext *ctxt, bool required)
 
std::string get_user_name (rest::RequestContext *ctxt)
 
void check_input_parameters (const std::vector< database::entry::Field > &param_fields, const rapidjson::Document &doc)
 

Variables

const std::string k_page_content_default
 
const ::http::base::UriPathMatcher g_matcher {"/debug", false, false}
 
const std::string k_slash {"/"}
 
const std::string k_http = "HTTP"
 
const std::string k_https = "HTTPS"
 
const std::string k_openapi_catalog = "/open-api-catalog"
 
const std::string k_path_metadata_catalog = "metadata-catalog"
 
const std::string k_metadata = "_metadata"
 
const std::string k_debug = "_debug"
 
const uint64_t k_default_items_on_page = 25
 

Typedef Documentation

◆ Authorization

◆ CachedObject

◆ FetchedFile

◆ Fields

◆ HttpResult

◆ MediaType

◆ MysqlCacheManager

◆ MySQLConnection

◆ MySQLSession

◆ Protocols

using mrs::endpoint::handler::Protocols = typedef std::set<std::string>

◆ Request

◆ ResultSets

◆ Session

◆ Url

Enumeration Type Documentation

◆ Protocol

Enumerator
k_protocolHttp 
k_protocolHttps 

◆ UsedProtocol

Enumerator
k_usedProtocolNone 
k_usedProtocolHttp 
k_usedProtocolHttps 

Function Documentation

◆ add_protocol_to_host()

void mrs::endpoint::handler::add_protocol_to_host ( UsedProtocol  protocol,
::http::base::Uri uri 
)
inline

◆ append_no_referrer()

static void mrs::endpoint::handler::append_no_referrer ( ::http::base::Headers headers)
static

◆ as_string() [1/2]

template<typename T >
static std::string mrs::endpoint::handler::as_string ( const std::vector< T > &  v)
static

◆ as_string() [2/2]

template<typename T >
static std::string mrs::endpoint::handler::as_string ( const std::vector< T > &  v)
static

◆ check_input_parameters()

void mrs::endpoint::handler::check_input_parameters ( const std::vector< database::entry::Field > &  param_fields,
const rapidjson::Document &  doc 
)
inline

◆ get_authentication_status()

static const char * mrs::endpoint::handler::get_authentication_status ( HttpStatusCode::key_type  code)
static

◆ get_endpoint_host() [1/2]

std::string mrs::endpoint::handler::get_endpoint_host ( const ::http::base::Uri url)
inline

◆ get_endpoint_host() [2/2]

std::string mrs::endpoint::handler::get_endpoint_host ( std::weak_ptr< mrs::interface::EndpointBase wp)
inline

◆ get_endpoint_options() [1/5]

std::optional< std::string > mrs::endpoint::handler::get_endpoint_options ( const std::shared_ptr< ContentFileEndpoint > &  endpoint)
inline

◆ get_endpoint_options() [2/5]

std::optional< std::string > mrs::endpoint::handler::get_endpoint_options ( const std::shared_ptr< ContentSetEndpoint > &  endpoint)
inline

◆ get_endpoint_options() [3/5]

std::optional< std::string > mrs::endpoint::handler::get_endpoint_options ( const std::shared_ptr< DbObjectEndpoint > &  endpoint)
inline

◆ get_endpoint_options() [4/5]

std::optional< std::string > mrs::endpoint::handler::get_endpoint_options ( const std::shared_ptr< DbSchemaEndpoint > &  endpoint)
inline

◆ get_endpoint_options() [5/5]

std::optional< std::string > mrs::endpoint::handler::get_endpoint_options ( const std::shared_ptr< DbServiceEndpoint > &  endpoint)
inline

◆ get_endpoint_protocol() [1/2]

Protocols mrs::endpoint::handler::get_endpoint_protocol ( std::shared_ptr< DbServiceEndpoint > &  endpoint)
inline

◆ get_endpoint_protocol() [2/2]

template<typename Endpoint >
Protocols mrs::endpoint::handler::get_endpoint_protocol ( std::shared_ptr< Endpoint > &  endpoint)

◆ get_endpoint_url()

std::string mrs::endpoint::handler::get_endpoint_url ( std::weak_ptr< mrs::endpoint::DbObjectEndpoint > &  wp)
inline

◆ get_json_response_ok()

static HttpResult mrs::endpoint::handler::get_json_response_ok ( )
static

◆ get_path_after_object_name() [1/2]

std::string mrs::endpoint::handler::get_path_after_object_name ( const ::http::base::Uri base_uri,
const ::http::base::Uri requests_uri 
)
inline

◆ get_path_after_object_name() [2/2]

std::string mrs::endpoint::handler::get_path_after_object_name ( std::weak_ptr< mrs::endpoint::DbObjectEndpoint > &  wp,
const ::http::base::Uri requests_uri 
)
inline

◆ get_properly_configured_protocol()

Protocol mrs::endpoint::handler::get_properly_configured_protocol ( const std::set< std::string > &  protocols,
const mrs::interface::EndpointConfiguration configuration 
)
inline

◆ get_properly_configured_used_protocol()

UsedProtocol mrs::endpoint::handler::get_properly_configured_used_protocol ( const std::set< std::string > &  protocols,
const mrs::interface::EndpointConfiguration configuration 
)
inline

◆ get_protocol()

template<typename EndpointPtr >
Protocol mrs::endpoint::handler::get_protocol ( EndpointPtr  endpoint)

◆ get_session()

static CachedObject mrs::endpoint::handler::get_session ( MySQLSession  session,
MysqlCacheManager cache_manager,
MySQLConnection  type = MySQLConnection::kMySQLConnectionMetadataRO 
)
static

◆ get_user_id()

mysqlrouter::sqlstring mrs::endpoint::handler::get_user_id ( rest::RequestContext ctxt,
bool  required 
)
inline

◆ get_user_name()

std::string mrs::endpoint::handler::get_user_name ( rest::RequestContext ctxt)
inline

◆ handler_mysqlerror()

HttpResult mrs::endpoint::handler::handler_mysqlerror ( const mysqlrouter::MySQLSession::Error e,
const char *  sql_state 
)
inline

◆ impl_get_json_response()

static std::string mrs::endpoint::handler::impl_get_json_response ( const HttpStatusCode::key_type  k_status,
const char *  message 
)
static

◆ lock() [1/2]

template<typename Type >
std::shared_ptr< Type > mrs::endpoint::handler::lock ( const std::weak_ptr< Type > &  endpoint)

◆ lock() [2/2]

template<typename Type >
const std::shared_ptr< Type > & mrs::endpoint::handler::lock ( std::shared_ptr< Type > &  endpoint)

◆ lock_or_throw_unavail()

template<typename Type >
std::shared_ptr< Type > mrs::endpoint::handler::lock_or_throw_unavail ( std::weak_ptr< Type > &  endpoint)

◆ lock_parent() [1/5]

std::shared_ptr< ContentSetEndpoint > mrs::endpoint::handler::lock_parent ( const std::shared_ptr< ContentFileEndpoint > &  endpoint)
inline

◆ lock_parent() [2/5]

std::shared_ptr< DbServiceEndpoint > mrs::endpoint::handler::lock_parent ( const std::shared_ptr< ContentSetEndpoint > &  endpoint)
inline

◆ lock_parent() [3/5]

std::shared_ptr< DbSchemaEndpoint > mrs::endpoint::handler::lock_parent ( const std::shared_ptr< DbObjectEndpoint > &  endpoint)
inline

◆ lock_parent() [4/5]

std::shared_ptr< DbServiceEndpoint > mrs::endpoint::handler::lock_parent ( const std::shared_ptr< DbSchemaEndpoint > &  endpoint)
inline

◆ lock_parent() [5/5]

std::shared_ptr< ContentSetEndpoint > mrs::endpoint::handler::lock_parent ( ContentFileEndpoint endpoint)
inline

◆ merge_options()

std::optional< std::string > mrs::endpoint::handler::merge_options ( std::optional< std::string >  options,
std::optional< std::string >  parent_options 
)
inline

◆ path_content_file()

auto mrs::endpoint::handler::path_content_file ( const std::string &  service_schema_path)
inline

◆ path_db_object_with_index()

auto mrs::endpoint::handler::path_db_object_with_index ( const std::string &  object_path,
const std::string &  service_schema_path,
const bool  is_index 
)
inline

◆ path_file()

auto mrs::endpoint::handler::path_file ( std::string  service_schema_path,
const std::string &  object_path,
bool  is_index 
)
inline

◆ path_obj_openapi_swagger()

auto mrs::endpoint::handler::path_obj_openapi_swagger ( const std::string &  service_schema_path,
const std::string &  obj_name 
)
inline

◆ path_object_metadata()

auto mrs::endpoint::handler::path_object_metadata ( const std::string &  service_schema_path,
const std::string &  obj_name 
)
inline

◆ path_schema_catalog()

auto mrs::endpoint::handler::path_schema_catalog ( const std::string &  service_schema_path)
inline

◆ path_schema_metadata()

auto mrs::endpoint::handler::path_schema_metadata ( const std::string &  service_schema_path)
inline

◆ path_schema_openapi_swagger()

auto mrs::endpoint::handler::path_schema_openapi_swagger ( const std::string &  service_schema_path)
inline

◆ path_schema_openapi_swagger_alias()

auto mrs::endpoint::handler::path_schema_openapi_swagger_alias ( const std::string &  service_name,
const std::string &  schema_name 
)
inline

◆ path_service_debug()

auto mrs::endpoint::handler::path_service_debug ( const std::string &  service_path)
inline

◆ path_service_metadata()

auto mrs::endpoint::handler::path_service_metadata ( const std::string &  service_path)
inline

◆ path_service_openapi_swagger()

auto mrs::endpoint::handler::path_service_openapi_swagger ( const std::string &  service_path)
inline

◆ remove_leading_slash_from_path()

std::string mrs::endpoint::handler::remove_leading_slash_from_path ( const std::string &  path)
inline

◆ url_sch_metadata_catalog()

std::string mrs::endpoint::handler::url_sch_metadata_catalog ( const ::http::base::Uri uri)
inline

Variable Documentation

◆ g_matcher

const ::http::base::UriPathMatcher mrs::endpoint::handler::g_matcher {"/debug", false, false}

◆ k_debug

const std::string mrs::endpoint::handler::k_debug = "_debug"

◆ k_default_items_on_page

const uint64_t mrs::endpoint::handler::k_default_items_on_page = 25

◆ k_http

const std::string mrs::endpoint::handler::k_http = "HTTP"

◆ k_https

const std::string mrs::endpoint::handler::k_https = "HTTPS"

◆ k_metadata

const std::string mrs::endpoint::handler::k_metadata = "_metadata"

◆ k_openapi_catalog

const std::string mrs::endpoint::handler::k_openapi_catalog = "/open-api-catalog"

◆ k_page_content_default

const std::string mrs::endpoint::handler::k_page_content_default

◆ k_path_metadata_catalog

const std::string mrs::endpoint::handler::k_path_metadata_catalog = "metadata-catalog"

◆ k_slash

const std::string mrs::endpoint::handler::k_slash {"/"}