MySQL 9.3.0
Source Code Documentation
db_object_endpoint.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2024, 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_MYSQL_REST_SERVICE_SRC_MRS_ENDPOINT_DB_OBJECT_ENDPOINT_H_
27#define ROUTER_SRC_MYSQL_REST_SERVICE_SRC_MRS_ENDPOINT_DB_OBJECT_ENDPOINT_H_
28
29#include <memory>
30
34
35namespace mrs {
36namespace endpoint {
37
38class DbSchemaEndpoint;
39
41 public:
44 using DbObjectPtr = std::shared_ptr<DbObject>;
45 using HandlerFactoryPtr = std::shared_ptr<mrs::interface::HandlerFactory>;
47
48 public:
51 HandlerFactoryPtr factory);
52
53 UniversalId get_id() const override;
54 UniversalId get_parent_id() const override;
55 std::optional<std::string> get_options() const override;
56
57 const DbObjectPtr get() const;
58 void set(const DbObject &entry, EndpointBasePtr parent);
59 bool is_index() const;
60
61 private:
62 void update() override;
63 void activate_public() override;
64 void deactivate() override;
66 bool does_this_node_require_authentication() const override;
67 std::string get_my_url_path_part() const override;
68 std::string get_my_url_part() const override;
69
70 bool is_index_{false};
72 std::vector<HandlerPtr> url_handlers_;
73};
74
75} // namespace endpoint
76} // namespace mrs
77
78#endif // ROUTER_SRC_MYSQL_REST_SERVICE_SRC_MRS_ENDPOINT_DB_OBJECT_ENDPOINT_H_
Definition: db_object_endpoint.h:40
DbObject DataType
Definition: db_object_endpoint.h:46
bool does_this_node_require_authentication() const override
Definition: db_object_endpoint.cc:119
std::string get_my_url_path_part() const override
Definition: db_object_endpoint.cc:123
void deactivate() override
Definition: db_object_endpoint.cc:57
UniversalId get_id() const override
Definition: db_object_endpoint.cc:46
std::shared_ptr< mrs::interface::HandlerFactory > HandlerFactoryPtr
Definition: db_object_endpoint.h:45
void update() override
Definition: db_object_endpoint.cc:52
std::shared_ptr< DbObject > DbObjectPtr
Definition: db_object_endpoint.h:44
std::optional< std::string > get_options() const override
Definition: db_object_endpoint.cc:130
DbObjectPtr entry_
Definition: db_object_endpoint.h:71
void activate_public() override
Definition: db_object_endpoint.cc:62
const DbObjectPtr get() const
Definition: db_object_endpoint.cc:113
DbObjectEndpoint(const DbObject &entry, EndpointConfigurationPtr configuration, HandlerFactoryPtr factory)
Definition: db_object_endpoint.cc:40
std::string get_my_url_part() const override
Definition: db_object_endpoint.cc:126
void set(const DbObject &entry, EndpointBasePtr parent)
Definition: db_object_endpoint.cc:104
bool is_index() const
Definition: db_object_endpoint.cc:111
UniversalId get_parent_id() const override
Definition: db_object_endpoint.cc:48
mrs::database::entry::DbObject DbObject
Definition: db_object_endpoint.h:43
EnabledType get_this_node_enabled_level() const override
Definition: db_object_endpoint.cc:115
std::vector< HandlerPtr > url_handlers_
Definition: db_object_endpoint.h:72
bool is_index_
Definition: db_object_endpoint.h:70
Definition: option_endpoint.h:39
OptionEndpoint(UniversalId service_id, EndpointConfigurationPtr configuration, HandlerFactoryPtr factory)
Definition: option_endpoint.cc:37
mrs::database::entry::EnabledType EnabledType
Definition: endpoint_base.h:59
std::shared_ptr< EndpointBase > EndpointBasePtr
Definition: endpoint_base.h:60
mrs::database::entry::UniversalId UniversalId
Definition: endpoint_base.h:61
std::shared_ptr< EndpointConfiguration > EndpointConfigurationPtr
Definition: endpoint_base.h:64
DbObjectEndpoint::DbObject DbObject
Definition: db_object_endpoint.cc:35
Definition: authorize_manager.h:48
required string configuration
Definition: replication_asynchronous_connection_failover.proto:49
Definition: completion_hash.h:35