https://github.com/qiwihui/boltcli
view and update boltdb file in your terminal (now support DBShield db file)
https://github.com/qiwihui/boltcli
Last synced: 4 months ago
JSON representation
view and update boltdb file in your terminal (now support DBShield db file)
- Host: GitHub
- URL: https://github.com/qiwihui/boltcli
- Owner: qiwihui
- Created: 2017-09-20T10:20:02.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-17T02:58:47.000Z (about 7 years ago)
- Last Synced: 2025-04-02T21:17:17.930Z (6 months ago)
- Language: Go
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
```
boltcli - view and update boltdb file in your terminalVERSION:
1.0.0USAGE:
boltcli [global options]GLOBAL OPTIONS:
--file FILE, -f FILE boltdb FILE to view and update
--config value, -c value DBShield config file
--action value, -t value action to update boltdb: get(default), set, delete
--bucket BUCKET, -b BUCKET boltdb BUCKET to view
--key KEY, -k KEY boltdb KEY to view
--value VALUE, -r VALUE boltdb VALUE to set
--help, -h show help
--version, -v print the version
INSTALLATION:
go get github.com/qiwihui/boltcli
EXAMPLES:
Please install jq first.
1. $GOPATH/bin/boltcli -c /etc/dbshield.yml -t get | jq
{
"return_code": 0,
"message": "success",
"data": [
"abnormal",
"pattern",
"state"
]
}2. $GOPATH/bin/boltcli -c /etc/dbshield.yml -t get -b pattern | jq
{
"return_code": 0,
"message": "success",
"data": [
{
"key": "0x0000e0030000002a0000e0076669727374",
"value": "select * from first"
},
{
"key": "0x0000e0030000002a0000e00766697273740000e0086e616d650000003c0000e023",
"value": "select * from first where name<100"
},
{
"key": "0x0000e003404076657273696f6e5f636f6d6d656e740000e00d0000e023",
"value": "select @@version_comment limit 1"
}
]
}3. $GOPATH/bin/boltcli -c /etc/dbshield.yml -t get -b pattern -k 0x0000e0030000002a0000e0076669727374 | jq
{
"return_code": 0,
"message": "success",
"data": "select * from first"
}4. $GOPATH/bin/boltcli -c /etc/dbshield.yml -t set -b pattern -k 0x0000e0030000002a0000e0076669727374 -r "select * from first;" | jq
{
"return_code": 0,
"message": "success",
"data": null
}5. $GOPATH/bin/boltcli -c /etc/dbshield.yml -t delete -b pattern -k 0x0000e0030000002a0000e0076669727374 | jq
{
"return_code": 0,
"message": "success",
"data": null
}
AUTHOR:
qiwihui
```