#include <backend.h>
◆ Keyring_file_backend()
keyring_file::backend::Keyring_file_backend::Keyring_file_backend |
( |
const std::string & |
keyring_file_name, |
|
|
bool |
read_only |
|
) |
| |
|
explicit |
◆ ~Keyring_file_backend()
keyring_file::backend::Keyring_file_backend::~Keyring_file_backend |
( |
| ) |
|
|
default |
◆ create_file_if_missing()
void keyring_file::backend::Keyring_file_backend::create_file_if_missing |
( |
const std::string & |
file_name | ) |
|
|
private |
Create data file if missing.
◆ erase()
Erase data located at given key.
- Parameters
-
[in] | metadata | Key |
[in] | data | Value - not used. |
- Returns
- Status of erase operation
- Return values
-
false | Data deleted |
true | Could not find or delete data |
◆ generate()
Generate random data and store it.
- Parameters
-
[in] | metadata | Key |
[out] | data | Generated value |
[in] | length | Length of data to be generated |
- Returns
- Status of generate + store operation
- Return values
-
false | Data generated and stored successfully |
true | Error |
◆ get()
Fetch data.
- Parameters
-
[in] | metadata | Key |
[out] | data | Value |
- Returns
- Status of find operation
- Return values
-
false | Entry found. Check data. |
true | Entry missing. |
◆ load_cache()
Populate cache.
- Parameters
-
[in] | operations | Handle to operations class |
- Returns
- status of cache insertion
- Return values
-
◆ maximum_data_length()
size_t keyring_file::backend::Keyring_file_backend::maximum_data_length |
( |
| ) |
const |
|
inline |
Maximum data length supported.
◆ size()
size_t keyring_file::backend::Keyring_file_backend::size |
( |
| ) |
const |
|
inline |
Get number of elements stored in backend.
◆ store()
Store data.
- Parameters
-
[in] | metadata | Key |
[in,out] | data | Value |
- Returns
- Status of store operation
- Return values
-
false | Entry stored successfully |
true | Failure |
◆ valid()
bool keyring_file::backend::Keyring_file_backend::valid |
( |
| ) |
const |
|
inline |
◆ write_to_file()
bool keyring_file::backend::Keyring_file_backend::write_to_file |
( |
| ) |
|
|
private |
Write existing data to file.
This function overwrites existing data stored in the file.
- Returns
- Status of write operation.
- Return values
-
false | Successfully written data to file |
true | Error writing data to file |
◆ json_writer_
In memory cache for keyring data.
◆ keyring_file_name_
std::string keyring_file::backend::Keyring_file_backend::keyring_file_name_ |
|
private |
◆ read_only_
bool keyring_file::backend::Keyring_file_backend::read_only_ |
|
private |
◆ valid_
bool keyring_file::backend::Keyring_file_backend::valid_ |
|
private |
The documentation for this class was generated from the following files:
- components/keyrings/keyring_file/backend/backend.h
- components/keyrings/keyring_file/backend/backend.cc