Previously, a new protocol for raw data entries was added. Extend the
MonKeyStoreEntry to meet this protocol so that it can be used to retain
raw text/data blobs.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
"""Get the deserialized store entry value."""
return json.loads(self._store._get_val(self._key))
+ def set_data(self, data: str) -> None:
+ """Set the store entry value to the given data."""
+ self._store._set_val(self._key, data)
+
+ def get_data(self) -> str:
+ """Get the stored data value."""
+ return self._store._get_val(self._key)
+
def remove(self) -> bool:
"""Remove the current entry from the store."""
return self._store.remove(self.full_key)