firebase_db

package
v0.0.0-...-a558ee2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2017 License: MIT Imports: 9 Imported by: 0

README

Go Bindings for the Firebase Realtime Database

go test \
    --credentials=/path/to/Google/credentials.json \
    --project=some-string-project-id \
    --test_root=/deletable/db/node

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EVENT_TYPE_LOOKUP map[EventType]string = map[EventType]string{
	PUT:          "put",
	PATCH:        "patch",
	KEEP_ALIVE:   "keep-alive",
	CANCEL:       "cancel",
	AUTH_REVOKED: "auth_revoked",
}
View Source
var EVENT_TYPE_REVERSE_LOOKUP map[string]EventType = map[string]EventType{}

EVENT_TYPE_REVERSE_LOOKUP is dynamically generated.

Functions

func Delete

func Delete(
	c *http.Client,
	path string,
	x_firebase_etag bool,
	if_match string,
	query_parameters map[string]string) ([]byte, int, string, error)

func Get

func Get(
	c *http.Client,
	path string,
	x_firebase_etag bool,
	query_parameters map[string]string,
	v interface{}) ([]byte, int, string, error)

func NewGoogleClient

func NewGoogleClient(credentials string) (*http.Client, error)

func Patch

func Patch(
	c *http.Client,
	path string,
	data []byte,
	query_parameters map[string]string,
	v interface{}) ([]byte, int, string, error)

func Post

func Post(
	c *http.Client,
	path string,
	data []byte,
	x_firebase_etag bool,
	query_parameters map[string]string,
	v interface{}) ([]byte, int, string, error)

func Put

func Put(
	c *http.Client,
	path string,
	data []byte,
	x_firebase_etag bool,
	if_match string,
	query_parameters map[string]string,
	v interface{}) ([]byte, int, string, error)

Types

type EventType

type EventType int
const (
	PUT EventType = iota
	PATCH
	KEEP_ALIVE
	CANCEL
	AUTH_REVOKED
)

type FirebaseDBEventData

type FirebaseDBEventData struct {
	Path string `json:"path"`
	Data []byte `json:"data"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL