Namespaced entries with index pages #45
Labels
No Label
Kind/Bug
Kind/Enhancement
Kind/Feature
Project/Lander
Project/Landerctl
idea
invalid
question
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Chewing_Bever/lander#45
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
An interesting concept I think would be introducing grouped entries that have a common index page. Here, the user would first add the namespace as a new entry type (perhaps with a
-N
flag in landerctl), e.g./n/test
. To add entries to this namespace, one would then simply prependtest_
to the entries' keys, e.g.test_1
,test_something
etc./test
would then return a list of all entries that have this same prefix. With this design, we could start hosting groups of files easily, with an index page so users can see all the related files. This page would then be generated dynamically so that it always contains the full list of entries.To support this efficiently, the LSM store would need to support returning a list of entries with a given prefix. I don't think this would be too hard to implement, as this would come down to traversing the tree down to where the prefix ends, and then recursively finding all entries in that subtree.
The index endpoint should probably also listen to the Accept header, e.g. for browsers we would return a simple HTML page, while the CLI tool would retrieve a simple list of links.
We could add it so that
POST
-ing to a namespace URL automatically adds a new entry to the namespace with a randomized key. This way, the CLI tool could first create the namespace and then populate it with a list of given files byPOST
-ing them to the namespace URL one by one.Instead of making the namespace routes
POST
-able, it might be better to add anamespace
orn
query param to the existing routes. For example, doingPOST /s/?n=test
would create a random key prefixed withtest_
.