MySQL 8.3.0
Source Code Documentation
mysql_harness::Keyring Class Referenceabstract

Keyring interface. More...

#include <keyring.h>

Inheritance diagram for mysql_harness::Keyring:
[legend]

Public Member Functions

 Keyring ()=default
 
 Keyring (const Keyring &)=default
 
Keyringoperator= (const Keyring &)=default
 
virtual ~Keyring ()=default
 
virtual void store (const std::string &uid, const std::string &attribute, const std::string &value)=0
 Stores an attribute value in an entry. More...
 
virtual std::string fetch (const std::string &uid, const std::string &attribute) const =0
 Retrieves attribute value from an entry. More...
 
virtual bool remove (const std::string &uid)=0
 Removes an entry. More...
 
virtual bool remove_attribute (const std::string &uid, const std::string &attribute)=0
 Removes an attribute from an entry. More...
 

Detailed Description

Keyring interface.

Keyrings are responsible for storage and retrieval of sensitive data (such as login credentials).

Constructor & Destructor Documentation

◆ Keyring() [1/2]

mysql_harness::Keyring::Keyring ( )
explicitdefault

◆ Keyring() [2/2]

mysql_harness::Keyring::Keyring ( const Keyring )
explicitdefault

◆ ~Keyring()

virtual mysql_harness::Keyring::~Keyring ( )
virtualdefault

Member Function Documentation

◆ fetch()

virtual std::string mysql_harness::Keyring::fetch ( const std::string &  uid,
const std::string &  attribute 
) const
pure virtual

Retrieves attribute value from an entry.

Parameters
[in]uidEntry id.
[in]attributeAttribute id.
Returns
Attribute value.
Exceptions
std::out_of_rangeAttribute not found.

Implemented in mysql_harness::KeyringMemory.

◆ operator=()

Keyring & mysql_harness::Keyring::operator= ( const Keyring )
default

◆ remove()

virtual bool mysql_harness::Keyring::remove ( const std::string &  uid)
pure virtual

Removes an entry.

Parameters
[in]uidEntry id.
Returns
success
Return values
trueuid removed
falseuid not removed

Implemented in mysql_harness::KeyringMemory.

◆ remove_attribute()

virtual bool mysql_harness::Keyring::remove_attribute ( const std::string &  uid,
const std::string &  attribute 
)
pure virtual

Removes an attribute from an entry.

Parameters
[in]uidEntry id.
[in]attributeAttribute id.
Returns
success
Return values
trueuid removed
falseuid not removed

Implemented in mysql_harness::KeyringMemory.

◆ store()

virtual void mysql_harness::Keyring::store ( const std::string &  uid,
const std::string &  attribute,
const std::string &  value 
)
pure virtual

Stores an attribute value in an entry.

Parameters
[in]uidEntry id.
[in]attributeAttribute id.
[in]valueAttribute value.

Implemented in mysql_harness::KeyringMemory.


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