angelos.facade.storage.mail¶
Vault.
-
class
angelos.facade.storage.mail.MailStorage(facade: Facade, home_dir: pathlib.Path, secret: bytes, delete=<Delete.HARD: 2>)¶ Bases:
angelos.facade.facade.StorageFacadeExtensionMail box interface.
Mail is the archive that is used to store messages on the server. Clients will push and pull their messages to the server for routing within the community.
-
ATTRIBUTE= ('mail',)¶
-
CONCEAL= ('mail.ar7',)¶
-
INIT_HIERARCHY= ()¶
-
USEFLAG= (109,)¶
-
delete(filename: pathlib.PurePosixPath)¶ Remove a document at a certain location.
- Parameters
filename –
Returns:
-
issuer(issuer, path: pathlib.PurePosixPath = PurePosixPath('/'), limit=1)¶ Search a folder for documents by issuer.
-
receive_iter(owner: uuid.UUID)¶ Iterator that iterates over files belonging to an owner.
-
save(filename: pathlib.PurePosixPath, document, document_file_id_match=True) → uuid.UUID¶ Save a document at a certain location.
- Parameters
filename –
document –
document_file_id_match –
Returns:
-
search(pattern: unicode = '/', modified: datetime.datetime = None, created: datetime.datetime = None, owner: uuid.UUID = None, link: bool = False, limit: int = 0, deleted: Optional[bool] = None, fields: Callable = <cyfunction MailStorage.search.<locals>.<lambda>>) → Dict[uuid.UUID, Any]¶ Searches for a files in the storage.
- Parameters
pattern (str) – Path search pattern.
modified (datetime.datetime) – Files modified since.
created (datetime.datetime) – Files created since.
owner (uuid.UUID) – Files belonging to owner.
link (bool) – Include links in result.
limit (int) – Max number of hits (0 is unlimited).
deleted (bool) – Search for deleted files.
fields (lambda) – Lambda function that compiles the result row.
- Returns (Dict[uuid.UUID, Any]):
Returns a dictionary with a custom resultset indexed by file ID.
-
update(filename: pathlib.PurePosixPath, document) → uuid.UUID¶ Update a document on file.
- Parameters
filename –
document –
Returns:
-