... # pragma: no cover
-class ConfigEntry(Protocol):
+class BaseEntry(Protocol):
+ """Base protocol class for Entry objects. Entry objects are stored
+ peristently and can by identified by an internal key or URI.
+ """
+
+ def remove(self) -> bool:
+ ... # pragma: no cover
+
+ def exists(self) -> bool:
+ ... # pragma: no cover
+
+ @property
+ def uri(self) -> str:
+ ... # pragma: no cover
+
+ @property
+ def full_key(self) -> EntryKey:
+ ... # pragma: no cover
+
+
+class ConfigEntry(BaseEntry, Protocol):
"""A protocol for describing a configuration object that can be kept within
a configuration store. Has the ability to identify itself either by a
relative key or by a global URI value.
def set(self, obj: Simplified) -> None:
... # pragma: no cover
- def remove(self) -> bool:
- ... # pragma: no cover
- def exists(self) -> bool:
- ... # pragma: no cover
+class RawConfigEntry(BaseEntry, Protocol):
+ """Like a ConfigEntry but for opaque data blobs."""
- @property
- def uri(self) -> str:
+ def get_data(self) -> str:
... # pragma: no cover
- @property
- def full_key(self) -> EntryKey:
+ def set_data(self, obj: Simplified) -> None:
... # pragma: no cover