24#ifndef KEYRING_FILE_BACKEND_INCLUDED
25#define KEYRING_FILE_BACKEND_INCLUDED
Sensitive data storage.
Definition: data.h:40
Definition: json_writer.h:45
size_t num_elements() const
Number of elements stored.
Definition: json_writer.cc:151
Keyring operations A class to perform operations on keyring.
Definition: operations.h:483
std::string keyring_file_name_
Keyring file.
Definition: backend.h:135
~Keyring_file_backend()=default
bool load_cache(keyring_common::operations::Keyring_operations< Keyring_file_backend > &operations)
Populate cache.
Definition: backend.cc:81
size_t size() const
Get number of elements stored in backend.
Definition: backend.h:114
bool store(const keyring_common::meta::Metadata &metadata, keyring_common::data::Data &data)
Store data.
Definition: backend.cc:105
keyring_common::json_data::Json_writer json_writer_
In memory cache for keyring data.
Definition: backend.h:141
bool generate(const keyring_common::meta::Metadata &metadata, keyring_common::data::Data &data, size_t length)
Generate random data and store it.
Definition: backend.cc:127
bool write_to_file()
Write existing data to file.
Definition: backend.cc:142
bool get(const keyring_common::meta::Metadata &metadata, keyring_common::data::Data &data) const
Fetch data.
Definition: backend.cc:100
void create_file_if_missing(std::string file_name)
Create data file if missing.
Definition: backend.cc:148
bool read_only_
Read only flag.
Definition: backend.h:138
size_t maximum_data_length() const
Maximum data length supported.
Definition: backend.h:111
bool erase(const keyring_common::meta::Metadata &metadata, keyring_common::data::Data &data)
Erase data located at given key.
Definition: backend.cc:116
bool valid() const
Validity.
Definition: backend.h:117
Keyring_file_backend(const std::string keyring_file_name, bool read_only)
Definition: backend.cc:53
bool valid_
Validity.
Definition: backend.h:144
constexpr value_type read_only
Definition: classic_protocol_constants.h:213
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:76
Definition: backend.cc:37
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