Fire
Fetch an object from Firebase RTDB.
Usage
To use fire
, create two environment variables with the following data:
- Set
FIRE_ACCOUNT
to the fully qualified path to a serviceAccount.json file
- Set
FIRE_URL
to the database url https://your-app.firebaseio.com
To fetch an object:
fire path/to/obj`
Flags
-a prepend path to key (used with [-k])
-k shallow, one key per line
-p pretty print
-s fetch shallow
NOTES
- The sort order from
-k
is indeterminate (a feature of Go maps), but you could always pipe the results to sort: fire -k accounts | sort
.
Build
If adding features or just playing around:
go run main.go -p path/to/some/object
Install to your GOPATH
go build -o ~/go/bin/fire main.go
Examples
Once installed, just run fire:
fire -p account/types
fire -s versions
fire -k some/deep/nested/object