Hydrilla on-disk data format » History » Revision 20
« Previous |
Revision 20/22
(diff)
| Next »
koszko, 01/19/2022 06:19 PM
change directory names from plural to singular
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.
file/
subdirectory¶
All files used by resources (either directly or as part of their source packages' license info) are stored under file
with names of the format sha256-<file's_sha256_sum>
source/
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 source
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 source
with filename of the format <source_package_identifier>.zip
.
resource/
subdirectory¶
All resource JSON descriptions are stored under resource
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 resource
.
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.
mapping/
subdirectory¶
All mappings JSON descriptions are stored under mapping
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 mapping
.
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 · 20 revisions