Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

cosn/firebase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Firebase

Summary

Helper library for invoking the Firebase REST API.

Installation

Build

go get github.com/cosn/firebase

Test

Edit the firebase_test.go file and set the testUrl and testKey variables to match your Firebase account.

Then run:

go test github.com/cosn/firebase...

Usage

First import the package into your code:

import (
    "github.com/cosn/firebase"
)

To use the client, initialize it and make requests similarly to the Firebase docs:

firebase := new(firebase.Client)
firebase.Init("https://<TBD>.firebase.com", "<optional authentication token>", nil)

n := &Name { First: "Jack", Last: "Sparrow" }
jack, err_ := firebase.Child("users/jack", nil, nil).Set("name", n, nil)

Currently, the following methods are supported:

Child(path)
Push(value)
Set(path, value)
Update(path, value)
Remove(path)
Value()
Rules()
SetRules(rules)

For more details about this library, see the GoDoc documentation.

For more details about the Firebase APIs, see the Firebase official documentation.

About

Firebase Go REST SDK

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages