[WIP] KVS
Key Value Services is a cli tools that help to you create your Key-Value store services.
Motivation
I want to create a content sharing tool that is managed by only one person and readable by many people in a secure network environment, so that I can use some common content in the terminal.
Install
TODO
Usage
- Start kvs in your server
> kvs
- Login the kvs services from client
> kvs
- Create a private key value
> kvs create foo "hello world"
default, kvs will encrypt the value use your priv_key in local. Remote just judge the key's owner. The decryption process needs to be completed by the client itself.
- Read a key
> kvs read foo
hello world
- Create a public key value
> kvs create priv_foo "priv hello world" -p
If you just do. kvs will send the value and save value as plaintext in remote.
- Read a private key
> kvs cat priv_foo
priv hello world
- Delete a Key
> kvs delete priv_foo
You just can delete key that owner is you.
- Update a Key
kvs create priv_foo "this is change data"
kvs read priv_foo
this is change data
Example
Your team have a big list of resource id.
# important_resource_id.txt
Some times, the team member need create the url by the big list.
# important_resource_urls.txt
Let's assume we have written a command line tool named transform to handle this case.
cat important_resource_urls.txt | transform
The question is, how do I share important_resource_urls.txt with other team members.
Granted, there are many ways to share it. But you can fast finish it if you use the kvs.
# create the key
# and then, other team member can use it.
|
Road Map
- [*] add
setandgetcommand to config some value in client local - add
uploadcommand to upload all file in current directory and use the relative directory as key. - add
setcommand to set the config in client local.