MySQL 9.3.0
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
handler_factory.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2022, 2025, Oracle and/or its affiliates.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License, version 2.0,
6 as published by the Free Software Foundation.
7
8 This program is designed to work with certain software (including
9 but not limited to OpenSSL) that is licensed under separate terms,
10 as designated in a particular file or component or in included license
11 documentation. The authors of MySQL hereby grant you an additional
12 permission to link the program and your derivative works with the
13 separately licensed software that they have either included with
14 the program or referenced in the documentation.
15
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24*/
25
26#ifndef ROUTER_SRC_REST_MRS_SRC_MRS_INTERFACE_HANDLER_FACTORY_H_
27#define ROUTER_SRC_REST_MRS_SRC_MRS_INTERFACE_HANDLER_FACTORY_H_
28
29#include <memory>
30
31#include "http/base/uri.h"
32#include "mrs/gtid_manager.h"
37
39
40namespace mrs {
41namespace interface {
42
44 public:
46 using EndpointBasePtr = std::shared_ptr<EndpointBase>;
51
52 virtual ~HandlerFactory() = default;
53
54 virtual std::shared_ptr<mrs::endpoint::handler::PersistentDataContentFile>
56 const OptionalIndexNames &index_names) = 0;
57
58 virtual std::shared_ptr<Handler> create_db_schema_metadata_catalog_handler(
59 EndpointBasePtr db_schema_endpoint) = 0;
60 virtual std::shared_ptr<Handler> create_db_schema_metadata_handler(
61 EndpointBasePtr db_schema_endpoint) = 0;
62 virtual std::shared_ptr<Handler> create_db_object_metadata_handler(
63 EndpointBasePtr db_object_endpoint) = 0;
64 virtual std::shared_ptr<Handler> create_db_service_debug_handler(
65 EndpointBasePtr db_service_endpoint) = 0;
66 virtual std::shared_ptr<Handler> create_db_service_metadata_handler(
67 EndpointBasePtr db_service_endpoint) = 0;
68
69 virtual std::shared_ptr<Handler> create_db_schema_openapi_handler(
70 EndpointBasePtr db_schema_endpoint) = 0;
71 virtual std::shared_ptr<Handler> create_db_service_openapi_handler(
72 EndpointBasePtr db_service_endpoint) = 0;
73 virtual std::shared_ptr<Handler> create_db_object_openapi_handler(
74 EndpointBasePtr db_object_endpoint) = 0;
75
76 virtual std::shared_ptr<Handler> create_db_object_handler(
77 EndpointBasePtr db_object_endpoint) = 0;
78 virtual std::shared_ptr<Handler> create_content_file(
79 EndpointBasePtr db_object_endpoint,
80 std::shared_ptr<mrs::endpoint::handler::PersistentDataContentFile>) = 0;
81 virtual std::shared_ptr<Handler> create_authentication_login(
82 EndpointBasePtr db_service_endpoint) = 0;
83 virtual std::shared_ptr<Handler> create_authentication_logout(
84 EndpointBasePtr db_service_endpoint) = 0;
85 virtual std::shared_ptr<Handler> create_authentication_completed(
86 EndpointBasePtr db_service_endpoint) = 0;
87 virtual std::shared_ptr<Handler> create_authentication_user(
88 EndpointBasePtr db_service_endpoint) = 0;
89 virtual std::shared_ptr<Handler> create_authentication_auth_apps(
90 EndpointBasePtr db_service_endpoint) = 0;
91 virtual std::shared_ptr<Handler> create_authentication_status(
92 EndpointBasePtr db_service_endpoint) = 0;
93
94 virtual std::shared_ptr<Handler> create_string_handler(
95 EndpointBasePtr endpoint, const UniversalId &service_id,
96 bool requires_authentication, const Uri &url, const std::string &path,
97 const std::string &file_name, const std::string &file_content,
98 bool is_index) = 0;
99 virtual std::shared_ptr<Handler> create_redirection_handler(
100 EndpointBasePtr endpoint, const UniversalId &service_id,
101 bool requires_authentication, const Uri &url, const std::string &path,
102 const std::string &file_name, const std::string &redirection_path,
103 const bool pernament) = 0;
104};
105
106} // namespace interface
107} // namespace mrs
108
109#endif // ROUTER_SRC_REST_MRS_SRC_MRS_INTERFACE_HANDLER_FACTORY_H_
Definition: uri.h:40
Definition: authorize_manager.h:58
Definition: endpoint_base.h:57
std::optional< std::vector< std::string > > OptionalIndexNames
Definition: endpoint_base.h:68
Definition: handler_factory.h:43
EndpointBase::OptionalIndexNames OptionalIndexNames
Definition: handler_factory.h:50
virtual std::shared_ptr< Handler > create_db_object_handler(EndpointBasePtr db_object_endpoint)=0
virtual std::shared_ptr< Handler > create_db_schema_metadata_catalog_handler(EndpointBasePtr db_schema_endpoint)=0
virtual std::shared_ptr< Handler > create_authentication_user(EndpointBasePtr db_service_endpoint)=0
std::shared_ptr< EndpointBase > EndpointBasePtr
Definition: handler_factory.h:46
virtual std::shared_ptr< Handler > create_db_object_openapi_handler(EndpointBasePtr db_object_endpoint)=0
virtual std::shared_ptr< Handler > create_string_handler(EndpointBasePtr endpoint, const UniversalId &service_id, bool requires_authentication, const Uri &url, const std::string &path, const std::string &file_name, const std::string &file_content, bool is_index)=0
virtual std::shared_ptr< Handler > create_authentication_completed(EndpointBasePtr db_service_endpoint)=0
virtual std::shared_ptr< Handler > create_db_object_metadata_handler(EndpointBasePtr db_object_endpoint)=0
virtual std::shared_ptr< Handler > create_db_service_debug_handler(EndpointBasePtr db_service_endpoint)=0
virtual std::shared_ptr< Handler > create_authentication_logout(EndpointBasePtr db_service_endpoint)=0
virtual std::shared_ptr< Handler > create_authentication_auth_apps(EndpointBasePtr db_service_endpoint)=0
virtual std::shared_ptr< Handler > create_content_file(EndpointBasePtr db_object_endpoint, std::shared_ptr< mrs::endpoint::handler::PersistentDataContentFile >)=0
virtual std::shared_ptr< Handler > create_authentication_status(EndpointBasePtr db_service_endpoint)=0
virtual std::shared_ptr< mrs::endpoint::handler::PersistentDataContentFile > create_persisten_content_file(EndpointBasePtr conent_file_endpoint, const OptionalIndexNames &index_names)=0
virtual std::shared_ptr< Handler > create_db_service_metadata_handler(EndpointBasePtr db_service_endpoint)=0
virtual std::shared_ptr< Handler > create_db_schema_metadata_handler(EndpointBasePtr db_schema_endpoint)=0
virtual ~HandlerFactory()=default
virtual std::shared_ptr< Handler > create_redirection_handler(EndpointBasePtr endpoint, const UniversalId &service_id, bool requires_authentication, const Uri &url, const std::string &path, const std::string &file_name, const std::string &redirection_path, const bool pernament)=0
virtual std::shared_ptr< Handler > create_db_service_openapi_handler(EndpointBasePtr db_service_endpoint)=0
virtual std::shared_ptr< Handler > create_db_schema_openapi_handler(EndpointBasePtr db_schema_endpoint)=0
virtual std::shared_ptr< Handler > create_authentication_login(EndpointBasePtr db_service_endpoint)=0
Definition: rest_handler.h:135
static char * path
Definition: mysqldump.cc:150
Request::Uri Uri
Definition: request.cc:36
std::string file_name(Log_file_id file_id)
Provides name of the log file with the given file id, e.g.
Definition: log0pre_8_0_30.cc:94
mrs::interface::EndpointBase EndpointBase
Definition: handler_factory.cc:61
Definition: authorize_manager.h:48
mrs::database::entry::UniversalId UniversalId
Definition: universal_id.h:33