MySQL 9.3.0
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
handler_redirection.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2021, 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_HANDLER_HANDLER_REDIRECTION_H_
27#define ROUTER_SRC_MYSQL_REST_SERVICE_SRC_MRS_ENDPOINT_HANDLER_HANDLER_REDIRECTION_H_
28
31#include "mrs/rest/handler.h"
32
33namespace mrs {
34namespace endpoint {
35namespace handler {
36
38 public:
39 HandlerRedirection(const Protocol protocol, const UniversalId &service_id,
40 const std::string &service_path,
41 bool requires_authentication, const std::string &url_host,
42 const std::string &path, const std::string &file_name,
43 const std::string &file_new_location,
45 bool pernament);
46
47 UniversalId get_service_id() const override;
48 UniversalId get_schema_id() const override;
49 UniversalId get_db_object_id() const override;
50 const std::string &get_service_path() const override;
51 const std::string &get_schema_path() const override;
52 const std::string &get_db_object_path() const override;
53
54 uint32_t get_access_rights() const override;
56
57 void authorization(rest::RequestContext *ctxt) override;
58
62 const std::vector<uint8_t> &document) override;
64
65 private:
68 const std::string service_path_;
70 std::string path_;
71 std::string file_name_;
72 std::string file_new_location_;
74};
75
76} // namespace handler
77} // namespace endpoint
78} // namespace mrs
79
80#endif // ROUTER_SRC_MYSQL_REST_SERVICE_SRC_MRS_ENDPOINT_HANDLER_HANDLER_REDIRECTION_H_
Definition: protocol.h:33
The handler class is the interface for dynamically loadable storage engines.
Definition: handler.h:4618
Definition: handler_redirection.h:37
mrs::interface::RestHandler::HttpResult::Type type_
Definition: handler_redirection.h:66
std::string file_new_location_
Definition: handler_redirection.h:72
HttpResult handle_put(rest::RequestContext *ctxt) override
Definition: handler_redirection.cc:112
const std::string & get_schema_path() const override
Definition: handler_redirection.cc:77
std::string file_name_
Definition: handler_redirection.h:71
HandlerRedirection(const Protocol protocol, const UniversalId &service_id, const std::string &service_path, bool requires_authentication, const std::string &url_host, const std::string &path, const std::string &file_name, const std::string &file_new_location, mrs::interface::AuthorizeManager *auth_manager, bool pernament)
Definition: handler_redirection.cc:51
const std::string service_path_
Definition: handler_redirection.h:68
UniversalId get_schema_id() const override
Definition: handler_redirection.cc:69
std::string path_
Definition: handler_redirection.h:70
const std::string & get_db_object_path() const override
Definition: handler_redirection.cc:81
HttpResult handle_post(rest::RequestContext *ctxt, const std::vector< uint8_t > &document) override
Definition: handler_redirection.cc:107
UniversalId service_id_
Definition: handler_redirection.h:67
UniversalId get_service_id() const override
Definition: handler_redirection.cc:67
HttpResult handle_delete(rest::RequestContext *ctxt) override
Definition: handler_redirection.cc:102
uint32_t get_access_rights() const override
Definition: handler_redirection.cc:91
bool pernament_
Definition: handler_redirection.h:73
HttpResult handle_get(rest::RequestContext *ctxt) override
Definition: handler_redirection.cc:97
const std::string & get_service_path() const override
Definition: handler_redirection.cc:73
void authorization(rest::RequestContext *ctxt) override
Definition: handler_redirection.cc:95
UniversalId get_db_object_id() const override
Definition: handler_redirection.cc:71
Authorization requires_authentication() const override
Definition: handler_redirection.cc:85
bool requires_authentication_
Definition: handler_redirection.h:69
Definition: authorize_manager.h:58
Authorization
Definition: rest_handler.h:142
Definition: handler.h:42
static char * path
Definition: mysqldump.cc:150
MediaType
Definition: media_type.h:33
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
ContentFileEndpoint::UniversalId UniversalId
Definition: content_file_endpoint.cc:39
Definition: authorize_manager.h:48
Definition: http_result.h:37
Definition: request_context.h:47