github.com/sgreben/gopass-jsonapi-encode

reads JSON on stdin and writes gopass JSONAPI messages on stdout. single binary, no dependencies. linux, osx, windows. #golang


Keywords
api, create, gopass, import, json, query
License
Unlicense
Install
go get github.com/sgreben/gopass-jsonapi-encode

Documentation

gopass-jsonapi-encode

Encode JSON as gopass JSONAPI messages.

gopass-jsonapi-encode reads JSON on stdin and writes JSONAPI messages on stdout.

Contents

Examples

$ jq -n '{"type":"query","query":"github.com"}' | gopass-jsonapi-encode | gopass jsonapi listen

_["github.com/example"]
$ jq -n '{"type":"create","entry_name":"127.0.0.1/admin","login":"admin","password":"hunter2"}' | gopass-jsonapi-encode | gopass jsonapi listen

_{"username":"admin","password":"hunter2"}

Get it

Using go get

go get -u github.com/sgreben/gopass-jsonapi-encode

Pre-built binary

Or download a binary from the releases page, or from the shell:

# Linux
curl -L https://github.com/sgreben/gopass-jsonapi-encode/releases/download/0.0.3/gopass-jsonapi-encode_0.0.3_linux_x86_64.tar.gz | tar xz

# OS X
curl -L https://github.com/sgreben/gopass-jsonapi-encode/releases/download/0.0.3/gopass-jsonapi-encode_0.0.3_osx_x86_64.tar.gz | tar xz

# Windows
curl -LO https://github.com/sgreben/gopass-jsonapi-encode/releases/download/0.0.3/gopass-jsonapi-encode_0.0.3_windows_x86_64.zip
unzip gopass-jsonapi-encode_0.0.3_windows_x86_64.zip