etcdjson

command module
v0.0.0-...-4682b79 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2015 License: Apache-2.0 Imports: 8 Imported by: 0

README

etcdjson

What

This is a pretty simple tool that provides a CLI tool to edit JSON that's stored in Etcd with a JSONPath-like interface.

Why

Because I got tired of getting JSON data from Etcd, storing it in a file, editing it, and then setting the new data.

Details

This tool has get and set. It's not concurrency safe for a key, so use it from 1 node at a time to edit some JSON stored in a key.

Commands

Assuming this JSON is stored in /config/json in Etcd

{
  "a": {
    "b": "c"
  }
}
get

etcdjson get /config/json a.b returns c

Set

etcdjson set /config/json a.b d returns success and makes the JSON look like this:

{
  "a": {
    "b": "d"
  }
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Godeps
_workspace/src/github.com/arschles/assert
package assert provides convenience assert methods to complement the built in go testing library.
package assert provides convenience assert methods to complement the built in go testing library.
_workspace/src/github.com/codegangsta/cli
Package cli provides a minimal framework for creating and organizing command line Go applications.
Package cli provides a minimal framework for creating and organizing command line Go applications.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL