Skip to content

Update CLI interface semantics and verbs #79

@panchoh

Description

@panchoh
  • Global changes (already implemented, but left here for reference)
    • Env var KAPOW_URL is split into KAPOW_DATA_URL and KAPOW_CONTROL_URL.
    • The --url param present in some commands is also split in two: --data-url and --control-url
  • Data Interface
    • Rename kapow set to kapow write, in order to better hint that no overwriting is done.
    • Rename kapow get to kapow read.
    • Eventually, we'll add:
      • kapow set, which will overwrite the content of the given resource .
      • kapow delete, which will remove the content of the given resource.
  • Control Interface
    • Drop the concept of index in favour of ID. This precludes any chance of race conditions ocurring.
    • Replace kapow route subcommands with iptables's syntax:
      • add replaced by --append | -A
      • remove replaced by --delete | -D
      • list replaced by --list | -L
      • frobnicate replaced by--dont-cross-the-streams | -X
  • User interface (already implemented, but left here as reference)
    • Only one init file (was: .pow file) is provided to kapow server. If more are needed, they chan trivially included via the shell trick <(cat *.pow), or, from within the .pow file with a source.

The output of the --help should look something like:

Usage: kapow [OPTIONS] COMMAND [ARGS]...

  Start aiohttp app.

Options:
  --help  Show this message and exit.

Commands:
  route   Manage current server HTTP routes
  server  Start a Kapow! server

  read    Get data from the current context     (GET)
  write   Append data from the current context  (POST)
  set     Set data from the current context     (PUT)
  delete  Remove data from the current context  (DELETE)

@nilp0inter, (no hurries at all!), can you review the contents of this issue sometime to ensure that they match your original email? Domo!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions