mjolnir

command module
v0.0.0-...-5e6f555 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2017 License: GPL-3.0 Imports: 9 Imported by: 0

README

Go Report Card

Mjolnir

Mjolnir is a simple command-line utility to work with BoltDB from the CLI. I wrote this as I found myself wanting to make quick entries on my terminal without having to work with golang directly.

The default output for Mjolnir is markdown to stdout.

Installation

go get -u github.com/shellfu/mjolnir

Examples

Show Buckets

shellfu@shellfu:~$ mjolnir -f foobar.db -p
|-------------|
| BUCKET NAME |
|-------------|
| barBucket   |
| fooBucket   |
|-------------|
 total buckets: 2

Print entire bucket to stdout

shellfu@shellfu:~$ mjolnir -f foobar.db -b fooBucket -p
|  KEY   |       VALUE       |
|--------|-------------------|
| barKey | "barValue"        |
| fooKey | { "foo" : "bar" } |
 database: foobar.db | bucket: fooBucket | total records: 2

Add a Key Value Pair

shellfu@shellfu:~$ mjolnir -f foobar.db -b fooBucket -a -key fooKey -value '{ "foo" : "bar" }'
|  KEY   |     VALUE     |
|--------|---------------|
| fooKey | {"foo":"bar"} |

Delete a Key Value Pair

shellfu@shellfu:~$ mjolnir -f foobar.db -b fooBucket -d -key fooKey

Read a Key Value Pair

shellfu@shellfu-mac:~$ mjolnir -f foobar.db -b fooBucket -r -key fooKey
|  KEY   |   VALUE    |
|--------|------------|
| fooKey | "fooValue" |

Update a Key Value Pair

shellfu@shellfu:~$ mjolnir -f foobar.db -b fooBucket -u -key fooKey -value fooValue
|  KEY   |   VALUE    |
|--------|------------|
| fooKey | "fooValue" |

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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