Skip to main content

Module namespace

Module namespace 

Source
Expand description

The storage namespace convention (ADR-0019).

Every record lives in a namespace, and the namespace decides who owns the data and when it may be removed. Three shapes, no exceptions:

origin.<area>                      platform data, not tied to an account
                                   origin.settings · origin.accounts

acct.<connector>.<account>.<area>  anything belonging to one connected account
                                   acct.github.a1b2.notifications · …sync

app.<module>.<area>                product data with no account behind it
                                   app.planning.templates

The account prefix is what makes disconnecting an account a mechanical operation: Storage::clear_prefix removes everything below it, without any module having to declare which namespaces it wrote.

Functions§

account
Namespace for data belonging to one account of one connector.
account_prefix
Prefix covering every namespace of one account.
module
Namespace for product data that is not tied to an account.
platform
Namespace for platform-owned data.