MySQL 8.0.40
Source Code Documentation
rest_api_plugin.cc File Reference
#include "rest_api_plugin.h"
#include <array>
#include <string>
#include "mysql/harness/config_option.h"
#include "mysql/harness/config_parser.h"
#include "mysql/harness/loader.h"
#include "mysql/harness/logging/logging.h"
#include "mysql/harness/plugin.h"
#include "mysql/harness/plugin_config.h"
#include "mysql/harness/utility/string.h"
#include "mysqlrouter/http_server_component.h"
#include "mysqlrouter/rest_api_utils.h"
#include "rest_api.h"

Classes

class  RestApiPluginConfig
 

Macros

#define GET_OPTION_CHECKED(option, section, name, value)
 
#define DLLEXPORT
 

Functions

static void init (mysql_harness::PluginFuncEnv *env)
 
static void start (mysql_harness::PluginFuncEnv *env)
 
static void deinit (mysql_harness::PluginFuncEnv *)
 

Variables

static const char kSectionName [] {"rest_api"}
 REST API plugin. More...
 
static constexpr std::array< const char *, 1 > supported_options {"require_realm"}
 
std::string require_realm_api
 
static std::shared_ptr< RestApirest_api
 
static const std::array< const char *, 2 > plugin_requires
 
mysql_harness::Plugin DLLEXPORT harness_plugin_rest_api
 

Macro Definition Documentation

◆ DLLEXPORT

#define DLLEXPORT

◆ GET_OPTION_CHECKED

#define GET_OPTION_CHECKED (   option,
  section,
  name,
  value 
)
Value:
option = get_option(section, name, value);
static std::string get_option(const mysql_harness::ConfigSection *section, const std::string &key, const std::string &def_value)
Definition: metadata_cache_plugin.cc:107
constexpr bool str_in_collection(const T &t, const std::string_view &k)
Definition: string.h:157
static constexpr std::array< const char *, 1 > supported_options
Definition: rest_api_plugin.cc:49
case opt name
Definition: sslopt-case.h:33

Function Documentation

◆ deinit()

static void deinit ( mysql_harness::PluginFuncEnv )
static

◆ init()

static void init ( mysql_harness::PluginFuncEnv env)
static

◆ start()

static void start ( mysql_harness::PluginFuncEnv env)
static

Variable Documentation

◆ harness_plugin_rest_api

mysql_harness::Plugin DLLEXPORT harness_plugin_rest_api
Initial value:
= {
mysql_harness::PLUGIN_ABI_VERSION,
mysql_harness::ARCHITECTURE_DESCRIPTOR,
"REST_API",
VERSION_NUMBER(0, 0, 1),
0,
nullptr,
init,
nullptr,
true,
}
static void init(mysql_harness::PluginFuncEnv *env)
Definition: rest_api_plugin.cc:78
static const std::array< const char *, 2 > plugin_requires
Definition: rest_api_plugin.cc:279
static void start(mysql_harness::PluginFuncEnv *env)
Definition: rest_api_plugin.cc:237
static void deinit(mysql_harness::PluginFuncEnv *)
Definition: rest_api_plugin.cc:267

◆ kSectionName

const char kSectionName[] {"rest_api"}
static

REST API plugin.

◆ plugin_requires

const std::array<const char *, 2> plugin_requires
static
Initial value:
= {{
"http_server",
"logger",
}}

◆ require_realm_api

std::string require_realm_api

◆ rest_api

std::shared_ptr<RestApi> rest_api
static

◆ supported_options

constexpr std::array<const char *, 1> supported_options {"require_realm"}
staticconstexpr