Hydrilla on-disk data format » History » Revision 19
« Previous |
Revision 19/22
(diff)
| Next »
koszko, 12/24/2021 02:40 PM
fix heading level
Hydrilla on-disk data format¶
This page explains the upcoming format for built Hydrilla site content stored in the filesystem. It refers to the upcoming Hydrilla 1.0 release.
You might also want to read about the format of Hydrilla source packages or about Hydrilla HTTP JSON API.
- Table of contents
- Hydrilla on-disk data format
How Hydrilla loads content¶
Hydrilla expects a content directory to be specified in its configuration file (under the key "content-dir"). It then processes the following of its subdirectories.
files/
subdirectory¶
All files used by resources (either directly or as part of their source packages' license info) are stored under files
with names of the format sha256-<file's_sha256_sum>
sources/
subdirectory¶
Every resource and mapping in Hydrilla gets built from a source package. During building of each such source package a JSON description of it gets generated. All descriptions are stored under sources
with filenames of the format <source_package_identifier>.json
.
JSON descriptions of sources have structure as presented in the API description. They are served directly from disk files. In the future they will be accompanied by cryptographic signatures.
Additionally, for each source package a zip archive with its contents is expected to be present under sources
with filename of the format <source_package_identifier>.zip
.
resources/
subdirectory¶
All resource JSON descriptions are stored under resources
with filenames of the format <resource_identifier>/<resource_version_without_revision>.json
. For example, definitions of versions 0.1.0-4
and 0.1.1-1
of resource hello
would be stored as hello/0.1.json
and hello/0.1.1.json
, respectively. Both would be under subdirectory hello
of resources
.
JSON definitions of resources have structure as presented in the API description. They are served directly from disk files. In the future they will be accompanied by cryptographic signatures.
mappings/
subdirectory¶
All mappings JSON descriptions are stored under mappings
with filenames of the format <mapping_identifier>/<mapping_version>.json
. For example, definitions of versions 0.1.0
and 0.1.1
of resource hello
would be stored as hello/0.1.json
and hello/0.1.1.json
, respectively. Both would be under subdirectory hello
of mappings
.
JSON descriptions of mappings have structure as presented in the API description. They are served directly from disk files. In the future they will be accompanied by cryptographic signatures.
Populating Hydrilla content directory¶
Hydrilla package builder writes generated files in a way they are suitable to be loaded by Hydrilla. Given multiple already-populated content directories, it is also possible to recursively copy one's all contents into the other. In this case the user is responsible for avoiding clashes in identifiers of resources, mappings and sources.
Updated by koszko over 1 year ago · 19 revisions