API endpoints for creating, updating and deleting images at runtime
Design
New manifest namespace in DB
This namespace contains all the required information on imported manifests. It will replace the current images
namespace.
Folders:
name | description |
---|---|
uid | A unique identifier built from the hash of the manifest URI |
uri | URI of the manifest |
label | Manifest's label |
body | Manifest body |
timestamp | Timestamp of last DB entry change |
status | Import status. One of pending , ok , error(err_msg) , deleted
|
images | UIDs of referenced images |
manifest_hash | Hash of imported manifest |
Manifest import / update workflow
- Download manifest
- Create hash from manifest
- If manifest is already in DB and hash is the same, abort. Otherwise:
- Parse manifest
- Register manifest in DB (set status to
pending
) - Create puzzles in
puzzles/
directory - Update root
index.json
based on information from DB entry
Manifest deletion workflow
- Delete respective image folder in
puzzles/
directory - Set status to
deleted
in DB, remove content inbody
,manifest_hash
andimages
- Update root
index.json
TODOs
-
Set up manifest
DB namespace and replaceimages
namespace -
Implement create manifest workflow -
Implement update manifest workflow -
Implement delete manifest workflow
Edited by Sebastian Schüpbach