angelos.facade.facade¶
-
class
angelos.facade.facade.
ApiFacadeExtension
(facade: Facade)¶ Bases:
angelos.facade.facade.FacadeExtension
API extensions that let developers interact with the facade.
-
class
angelos.facade.facade.
ChurchClientFacade
(home_dir: pathlib.Path, secret: bytes, portfolio: angelos.portfolio.collection.PrivatePortfolio = None, role: int = None, server: bool = None)¶ Bases:
angelos.facade.facade.Facade
,angelos.facade.facade.ClientFacadeMixin
,angelos.facade.facade.ChurchFacadeMixin
Final facade for Church entity in a client.
-
class
angelos.facade.facade.
ChurchFacadeMixin
¶ Bases:
angelos.facade.facade.EntityFacadeMixin
Mixin for a Church Facade.
-
class
angelos.facade.facade.
ChurchServerFacade
(home_dir: pathlib.Path, secret: bytes, portfolio: angelos.portfolio.collection.PrivatePortfolio = None, role: int = None, server: bool = None)¶ Bases:
angelos.facade.facade.Facade
,angelos.facade.facade.ServerFacadeMixin
,angelos.facade.facade.ChurchFacadeMixin
Final facade for Church entity as a server.
-
class
angelos.facade.facade.
ClientFacadeMixin
¶ Bases:
angelos.facade.facade.TypeFacadeMixin
Mixin for a Church Facade.
-
APIS
= {'contact': ('angelos.facade.api.contact', 'ContactAPI'), 'mailbox': ('angelos.facade.api.mailbox', 'MailboxAPI'), 'replication': ('angelos.facade.api.replication', 'ReplicationAPI'), 'settings': ('angelos.facade.api.settings', 'SettingsAPI')}¶
-
DATAS
= {'client': ('angelos.facade.data.client', 'ClientData'), 'portfolio': ('angelos.facade.data.portfolio', 'PortfolioData'), 'prefs': ('angelos.facade.data.prefs', 'PreferencesData')}¶
-
STORAGES
= {'home': ('angelos.facade.storage.home', 'HomeStorage')}¶
-
TASKS
= {'contact_sync': ('angelos.facade.task.contact_sync', 'ContactPortfolioSyncTask'), 'network_index': ('angelos.facade.task.network_index', 'NetworkIndexerTask')}¶
-
-
class
angelos.facade.facade.
DataFacadeExtension
(facade: Facade)¶ Bases:
angelos.facade.facade.FacadeExtension
Archive extension to isolate the archives.
-
class
angelos.facade.facade.
EntityFacadeMixin
¶ Bases:
object
Abstract baseclass for Entities FacadeMixin’s.
-
class
angelos.facade.facade.
Facade
(home_dir: pathlib.Path, secret: bytes, portfolio: angelos.portfolio.collection.PrivatePortfolio = None, role: int = None, server: bool = None)¶ Bases:
object
-
property
api
¶ Exposes the mapped api extensions of the facade.
-
close
() → None¶ Close down the facade in a proper way.
-
property
closed
¶ Indicate if archive is closed.
-
property
data
¶ Exposes the data extensions of the facade.
-
property
path
¶ Property exposing the Facade home directory.
-
property
secret
¶ Property exposing the Facade encryption key.
-
property
storage
¶ Exposes the mapped archive extensions in the facade.
-
property
task
¶ Exposes the mapped task extensions on the facade.
-
property
-
exception
angelos.facade.facade.
FacadeError
¶ Bases:
RuntimeError
Thrown when error happens in or with a Facade.
-
EXTENSION_ATTR_MISMATCH
= ("The attribute and name didn't match.", '108')¶
-
EXTENSION_ATTR_OCCUPIED
= ('Extension attribute already occupied.', 100)¶
-
EXTENSION_ATTR_OCCUPIED_STORAGE
= ('Extension storage attribute already occupied.', 101)¶
-
EXTENSION_NOT_FOUND
= ('Facade extension not found within namespace.', 106)¶
-
EXTENSION_NO_TUPLE
= ('Expected a tuple configuration.', 107)¶
-
ILLEGAL_ROLE
= ('Illegal role', 103)¶
-
MISSING_ENTITY
= ('No entity present in portfolio', 104)¶
-
POST_INIT_DONE
= ('Post init already done', 102)¶
-
UNKNOWN_ENTITY_TYPE
= ('Entity in portfolio of unknown type', 105)¶
-
-
class
angelos.facade.facade.
FacadeExtension
(facade: Facade)¶ Bases:
angelos.facade.facade.FacadeFrozen
Base class for a facade service extension.
An extension is a class or service that adds functionality to the facade, a kind of plugin.
-
ATTRIBUTE
= ('',)¶
-
gather
(*aws: Awaitable) → List[Any]¶ Run multiple awaitables in asyncio.gather.
-
-
class
angelos.facade.facade.
FacadeFrozen
(facade: Facade)¶ Bases:
object
Base class for instances owned by the Facade.
All inheritors has a reference back to their owning Facade and can make use of the @internal decorator.
-
property
facade
¶ Expose a readonly weakref of the facade.
-
property
-
class
angelos.facade.facade.
FacadeMeta
¶ Bases:
type
-
class
angelos.facade.facade.
FacadeNamespace
(facade: Facade, config: dict, instances: dict = {})¶ Bases:
angelos.facade.facade.FacadeFrozen
Namespace for facade extensions.
-
class
angelos.facade.facade.
MinistryClientFacade
(home_dir: pathlib.Path, secret: bytes, portfolio: angelos.portfolio.collection.PrivatePortfolio = None, role: int = None, server: bool = None)¶ Bases:
angelos.facade.facade.Facade
,angelos.facade.facade.ClientFacadeMixin
,angelos.facade.facade.MinistryFacadeMixin
Final facade for Ministry entity in a client.
-
class
angelos.facade.facade.
MinistryFacadeMixin
¶ Bases:
angelos.facade.facade.EntityFacadeMixin
Mixin for a Ministry Facade.
-
class
angelos.facade.facade.
MinistryServerFacade
(home_dir: pathlib.Path, secret: bytes, portfolio: angelos.portfolio.collection.PrivatePortfolio = None, role: int = None, server: bool = None)¶ Bases:
angelos.facade.facade.Facade
,angelos.facade.facade.ServerFacadeMixin
,angelos.facade.facade.MinistryFacadeMixin
Final facade for Ministry entity as a server.
-
class
angelos.facade.facade.
PersonClientFacade
(home_dir: pathlib.Path, secret: bytes, portfolio: angelos.portfolio.collection.PrivatePortfolio = None, role: int = None, server: bool = None)¶ Bases:
angelos.facade.facade.Facade
,angelos.facade.facade.ClientFacadeMixin
,angelos.facade.facade.PersonFacadeMixin
Final facade for Person entity in a client.
-
class
angelos.facade.facade.
PersonFacadeMixin
¶ Bases:
angelos.facade.facade.EntityFacadeMixin
Mixin for a Person Facade.
-
class
angelos.facade.facade.
PersonServerFacade
(home_dir: pathlib.Path, secret: bytes, portfolio: angelos.portfolio.collection.PrivatePortfolio = None, role: int = None, server: bool = None)¶ Bases:
angelos.facade.facade.Facade
,angelos.facade.facade.ServerFacadeMixin
,angelos.facade.facade.PersonFacadeMixin
Final facade for Person entity as a server.
-
class
angelos.facade.facade.
ServerFacadeMixin
¶ Bases:
angelos.facade.facade.TypeFacadeMixin
Mixin for a Server Facade.
-
APIS
= {'contact': ('angelos.facade.api.contact', 'ContactAPI'), 'mailbox': ('angelos.facade.api.mailbox', 'MailboxAPI'), 'replication': ('angelos.facade.api.replication', 'ReplicationAPI'), 'settings': ('angelos.facade.api.settings', 'SettingsAPI')}¶
-
DATAS
= {'portfolio': ('angelos.facade.data.portfolio', 'PortfolioData'), 'prefs': ('angelos.facade.data.prefs', 'PreferencesData'), 'server': ('angelos.facade.data.server', 'ServerData')}¶
-
STORAGES
= {'ftp': ('angelos.facade.storage.ftp', 'FtpStorage'), 'mail': ('angelos.facade.storage.mail', 'MailStorage'), 'pool': ('angelos.facade.storage.pool', 'PoolStorage'), 'routing': ('angelos.facade.storage.routing', 'RoutingStorage')}¶
-
TASKS
= {'contact_sync': ('angelos.facade.task.contact_sync', 'ContactPortfolioSyncTask'), 'network_index': ('angelos.facade.task.network_index', 'NetworkIndexerTask')}¶
-
-
class
angelos.facade.facade.
StorageFacadeExtension
(facade: Facade, home_dir: pathlib.Path, secret: bytes, delete=<Delete.HARD: 2>)¶ Bases:
angelos.facade.facade.FacadeExtension
Archive extension to isolate the archives.
-
ATTRIBUTE
= ('',)¶
-
CONCEAL
= ('',)¶
-
INIT_FILES
= ()¶
-
INIT_HIERARCHY
= ()¶
-
USEFLAG
= (0,)¶
-
property
archive
¶ Property access to underlying storage.
-
close
()¶ Close the Archive.
-
property
closed
¶ Indicate if archive is closed.
-
classmethod
filename
(dir_name: pathlib.Path) → pathlib.Path¶
-
classmethod
setup
(facade: angelos.facade.facade.Facade, home_dir: pathlib.Path, secret: bytes, owner: uuid.UUID, node: uuid.UUID, domain: uuid.UUID, vault_type=None, vault_role=None)¶ Create and setup the whole Vault according to policy’s.
-
-
class
angelos.facade.facade.
TaskFacadeExtension
(facade: Facade)¶ Bases:
angelos.facade.facade.FacadeExtension
,angelos.lib.reactive.NotifierMixin
Task extension that runs as a background job in the facade.
-
ACTION_COMPLETE
= 2¶
-
ACTION_CRASH
= 3¶
-
ACTION_PROGRESS
= 4¶
-
ACTION_START
= 1¶
-
INVOKABLE
= (False,)¶
-
PERIODIC
= (False,)¶
-
SCHEDULABLE
= (False,)¶
-
cancel
() → None¶ Cancel a scheduled or periodic pending execution.
-
invoke
() → bool¶ Invoke the task directly.
Returns True if invocation went through. If invoking isn’t available returns False.
-
periodic
(period: datetime.timedelta, origin: datetime.datetime = datetime.datetime(2021, 1, 26, 12, 16, 18, 756005)) → bool¶ Execute task periodically until canceled.
Tell the period between executions and from when to count the start. Returns false if periodic execution isn’t available.
-
property
running
¶ Property exposing running state.
-
schedule
(when: datetime.datetime) → bool¶ Schedule a one-time execution of the task.
Tell when you want the task to be executed. Returns false if task scheduling isn’t available.
-
-
class
angelos.facade.facade.
TaskWaitress
¶ Bases:
angelos.lib.reactive.ObserverMixin
Observer that lets you wait for a facade extension task.
-
notify
(event: angelos.lib.reactive.Event) → None¶ Receive action-complete event.
-
wait
() → None¶ Halt execution and wait for event to happen.
-
wait_for
(notifier: angelos.lib.reactive.NotifierMixin) → None¶ Subscribe to, invoke, and wait for notifier.
-
-
class
angelos.facade.facade.
TypeFacadeMixin
¶ Bases:
object
Abstract baseclass for type FacadeMixin’s.
-
APIS
= {'contact': ('angelos.facade.api.contact', 'ContactAPI'), 'mailbox': ('angelos.facade.api.mailbox', 'MailboxAPI'), 'replication': ('angelos.facade.api.replication', 'ReplicationAPI'), 'settings': ('angelos.facade.api.settings', 'SettingsAPI')}¶
-
DATAS
= {'portfolio': ('angelos.facade.data.portfolio', 'PortfolioData'), 'prefs': ('angelos.facade.data.prefs', 'PreferencesData')}¶
-
STORAGES
= {}¶
-
TASKS
= {'contact_sync': ('angelos.facade.task.contact_sync', 'ContactPortfolioSyncTask'), 'network_index': ('angelos.facade.task.network_index', 'NetworkIndexerTask')}¶
-