Your Name ed5a9d99a3 Broken
2025-04-30 22:11:22 +12:00
2025-04-30 22:11:22 +12:00
.
2025-04-30 21:30:55 +12:00
.
2025-04-30 21:30:55 +12:00
.
2025-04-30 22:04:50 +12:00
.
2025-04-30 21:30:55 +12:00
.
2025-04-30 21:30:55 +12:00
2025-04-30 21:22:52 +12:00

Dropshell Template Registry

Introduction

The DropShell template registry is a very simple C++ webserver which provide a store of binary objects (the objects can be large), which are available over http.

Read access is public. Write access is controlled by tokens.

  • Objects are access via a label and tag, or via their hash. For example:
    • wget http://dtr.jde.nz/object/squashkiwi:latest
    • wget http://dtr.jde.nz/object/4528400792837739857
  • The hash is calculated using uint64_t hash_file(const std::string &path); in hash.hpp.
  • You can retrieve the hash for a given labvel and tag with, e.g.:
    • curl http://dtr.jde.nz/hash/squashkiwi:latest
  • you can get a full list of {label:tag,hash} entries (one tag per entry) with:
    • curl http://dtr.jde.nz/dir
  • a simple welcome page is served at /index.html for those browsing to the site.
  • to upload a file (via http put)
    • curl -T object_file http://dtr.jde.nz/WRITE_TOKEN/LABEL:TAG
    • the object_file is uploaded, hashed, added to the registry (if that hash doesn't already exist), and {label:tag,hash} is added to the directory index.
  • the server is configured via a configuration file which allows setting:
    • the list of write access tokens
    • the location for the object store (path on disk)

The C++ program is written so that it only uses standard libraries, and is built as a static executable with musl not glibc.

The C++ program is built with cmake.

A Dockerfile is included for conveniently running the C++ program inside docker.

Description
Simple object storage, for dropshell
Readme 9.7 MiB
Languages
C++ 61.1%
Shell 38.2%
CMake 0.7%