a simple key-value storage solution for ship-global values
Go to file
2024-10-04 16:53:18 -05:00
desk Separate front end state from versioned state. 2023-12-17 20:32:01 -05:00
.gitignore Post working w/o subs. 2023-11-09 10:47:04 -06:00
LICENSE Post 1.0.0 2023-11-09 13:36:27 -06:00
README.md Update README.md 2024-10-04 16:53:18 -05:00

%gs general store

a simple key-value storage solution for ship-global values

"making people behave like they care about integration by giving them easier inroads" (~rabsef-bicrym)

%gs intends to solve the problem of ship-wide configuration and settings without any json compatibility overhead

it's simply a map for desks and keys to vases of values.

(formerly “global store”)

some things you could use it for:

  • localization settings
  • visual preferences (dark mode)
  • secret keys (pending hardened urbit security)
  • profile features beyond %groups

just set and scry (or subscribe)

pokes
  • %put - put a value with a key onto a desk's kvs
  • %del - delete a key in a desk's kvs (rm)
  • %lop - delete keys in a desk's kvs (rm -r) ::
  • %enroll - put an arena on the roll
  • %unroll - remove an arena from the roll
  • %lockdown - set only self to read-write perms for a desk
peeks
  • /x/desk/[desk]
  • /x/desk/key/[desk]/[key]
  • /x/u/desk/[desk] existence check
  • /x/u/desk/key/[desk]/[key] existence check
subscriptions
  • /desk/[desk]
  • /desk/key/[desk]/[key]
  • /u/desk/[desk]
  • /u/desk/key/[desk]/[key]
perms

right now you can set perms by:

  • %moon - moons if you're a planet
  • %orbit - moons under same parent (if you're a moon)
  • %kids - sponsees (azimuth sense)
  • %public - free for all
  • %ship - whitelist

set types:

  • %r - read
  • %w - write
some useful snippets
=gs -build-file /=gs=/sur/gs/hoon
::
:gs|put       ::  :gs|put %desk /key/to noun+!>(42)
:gs|del       ::  :gs|del %desk /key/to
:gs|lop       ::  :gs|lop %desk /key/to
::
:gs|enroll    ::  :gs|enroll %desk /key/to arena perm
:gs|unroll    ::  :gs|unroll %desk /key/to arena :gs|lockdown  ::  :gs|lockdown %desk
::
:gs +dbug
changelog
  • [1 0 0] first public release, pokes/peeks/subs

  • [1 1 0] added a rudimentary mast front-end at /gs

  • todo: clean up and add deletion