Resource Use Vocabulary
A requires/supports entry may declare which features of the resource the app uses (see Resource uses). Each type that has a use vocabulary lists its tokens here, with the properties each registers under $<resource>.<use>.<property>:
| Resource | Use | Registers | Repeatable | Meaning |
|---|---|---|---|---|
redis |
db |
url, index |
yes | One logical database (keyspace) on the instance, selected by index: url is redis://[user:password@]host:port/<index>, index the integer |
redis |
pubsub |
— | no | Publish/subscribe channels. Pub/sub ignores database numbers, so isolated channels need an instance the app does not share channels on |
redis |
server |
— | no | The whole server: keyspace notifications, CONFIG, SELECT across databases, FLUSHALL, modules — anything that assumes the app owns the instance |
postgres |
database |
url, name |
yes | One database on the server: url is the standard connection URL with /<name> as its path, name the database name |
postgres |
server |
— | no | The whole server: superuser access, CREATE DATABASE, server-wide settings |
mysql |
database |
url, name |
yes | One database on the server: url is the standard connection URL with /<name> as its path, name the database name |
mysql |
server |
— | no | The whole server: root access, CREATE DATABASE, server-wide settings |
A repeatable use may occur more than once on one entry, each occurrence named as a single-key map (- db: cache) and addressed as $<resource>.<use>.<name>.<property>; a name on a non-repeatable use is a validation error (see Resource uses). A use that registers nothing (—) is addressed through the entry's instance properties. The entry-level properties ($url, $host, $port, $password, $name) are unchanged by any declared use.
This vocabulary is published in machine-readable form under the uses key of schema/resource-properties.json, a sibling of types: these are features an author declares, not properties a provider publishes. It is open in the same way the property vocabulary is: a token outside the table is an advisory validate warning, never a validation error. It is not open at deploy time — a provider refuses a requires entry declaring a token it does not recognise, because no provider can claim to cover a use it does not know. A type absent from the table has no use vocabulary; its tokens are provider-defined and draw no warning.