MySQL 8.0.40
Source Code Documentation
Gcs_ip_allowlist_entry Class Referenceabstract

Base abstract class for the allowlist entries. More...

#include <gcs_xcom_networking.h>

Inheritance diagram for Gcs_ip_allowlist_entry:
[legend]

Public Member Functions

 Gcs_ip_allowlist_entry (std::string addr, std::string mask)
 Constructor. More...
 
virtual ~Gcs_ip_allowlist_entry ()=default
 
virtual bool init_value ()=0
 Entry initialization. More...
 
virtual std::vector< std::pair< std::vector< unsigned char >, std::vector< unsigned char > > > * get_value ()=0
 Virtual Method that implements value retrieval for this entry. More...
 
std::string get_addr () const
 Getters. More...
 
std::string get_mask () const
 

Private Attributes

std::string m_addr
 
std::string m_mask
 

Detailed Description

Base abstract class for the allowlist entries.

This is the base class for the Allowlist entries. Any derived class must implement its two abstract methods:

  • init_value();
  • get_value();

Constructor & Destructor Documentation

◆ Gcs_ip_allowlist_entry()

Gcs_ip_allowlist_entry::Gcs_ip_allowlist_entry ( std::string  addr,
std::string  mask 
)

Constructor.

Parameters
[in]addrIP address or hostname of this entry
[in]maskNetwork mask of this entry.

◆ ~Gcs_ip_allowlist_entry()

virtual Gcs_ip_allowlist_entry::~Gcs_ip_allowlist_entry ( )
virtualdefault

Member Function Documentation

◆ get_addr()

std::string Gcs_ip_allowlist_entry::get_addr ( ) const
inline

Getters.

◆ get_mask()

std::string Gcs_ip_allowlist_entry::get_mask ( ) const
inline

◆ get_value()

virtual std::vector< std::pair< std::vector< unsigned char >, std::vector< unsigned char > > > * Gcs_ip_allowlist_entry::get_value ( )
pure virtual

Virtual Method that implements value retrieval for this entry.

The returned value must be a list of std::pairs that contains both the address and the mask in network octet value. This is in list format because in the case of allowlist names, we can have multiple value for the same entry

Returns
an std::vector of std::pair with ip and mask in network octet form

Implemented in Gcs_ip_allowlist_entry_ip, and Gcs_ip_allowlist_entry_hostname.

◆ init_value()

virtual bool Gcs_ip_allowlist_entry::init_value ( )
pure virtual

Entry initialization.

If one needs to initialize internal values, it should be done in this method.

Returns
false on success, true otherwise

Implemented in Gcs_ip_allowlist_entry_ip, and Gcs_ip_allowlist_entry_hostname.

Member Data Documentation

◆ m_addr

std::string Gcs_ip_allowlist_entry::m_addr
private

◆ m_mask

std::string Gcs_ip_allowlist_entry::m_mask
private

The documentation for this class was generated from the following files: