Skip to content

Latest commit

 

History

History

fire

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Fire

Fetch an object from Firebase RTDB.

Usage

To use fire, create two environment variables with the following data:

  1. Set FIRE_ACCOUNT to the fully qualified path to a serviceAccount.json file
  2. 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