summaryrefslogtreecommitdiffstats
path: root/doc/shopfs.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/shopfs.md')
-rw-r--r--doc/shopfs.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/shopfs.md b/doc/shopfs.md
new file mode 100644
index 0000000..6e1e199
--- /dev/null
+++ b/doc/shopfs.md
@@ -0,0 +1,17 @@
+
+# 9P files served by the `shopfs` daemon
+
+`carts/`
+ `<username>/`
+ `<sku>`
+
+`/carts/<username>/<sku>` (rw)
+Creating the file `<sku>` adds a single item of `<sku>` (stock keeping
+unit) to user `<username>`'s cart. The initial quantity is 1 unit.
+Read returns the number of items of that type in the user's cart, in
+text form (`[1-9][0-9]*`). Writing a number to the file adds or
+removes the specified number of items to/from the cart
+(`[+-]?[1-9][0-9]*`). Removing the file removes (all units of) the
+item from the cart.
+
+TODO: checkout