keitaro1020 / datastore-tools

CLI for Google Cloud Datastore

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Google Cloud Datastore Tools

CLI for Google Cloud Datastore

Before you begin

  1. Create a service account.(roles: datastore.user)
  2. Save JSON key file

Installing the tools

go get github.com/keitaro1020/datastore-tools
cd $GOPATH/src/github.com/keitaro1020/datastore-tools
make
make install

Or download binaries from the releases page(Linux/Windows/macOS).

Using the tools

  • select
Usage:
  datastore-tools select [flags]

Flags:
  -p, --project string     datastore project id [required]
  -k, --kind string        datastore kind [required]
  -n, --namespace string   datastore namespace
  -f, --key-file string    gcp service account JSON key file
  -t, --table              output table view
  -c, --count              count only
  -w, --filter string      filter query (Property=Value)
  • truncate
Usage:
  datastore-tools truncate [flags]

Flags:
  -p, --project string     datastore project id [required]
  -k, --kind string        datastore kind [required]
  -n, --namespace string   datastore namespace
  -f, --key-file string    gcp service account JSON key file
  • update
Usage:
  datastore-tools update [flags]

Flags:
  -p, --project string     datastore project id [required]
  -k, --kind string        datastore kind [required]
  -n, --namespace string   datastore namespace
  -f, --key-file string    gcp service account JSON key file
  -w, --filter string      filter query (Property=Value)
  -s, --set string         set update value (Property=Value)

License

This project is licensed under the MIT License - see the LICENSE file for details

Inspiration

https://github.com/boiyaa/datastore-tools

About

CLI for Google Cloud Datastore

License:MIT License


Languages

Language:Go 89.5%Language:Makefile 10.5%