Categorygithub.com/jeremyschlatter/firebase
modulepackage
0.0.0-20181027073148-aaaaf8af17bb
Repository: https://github.com/jeremyschlatter/firebase.git
Documentation: pkg.go.dev

# README

firebase

import "github.com/jeremyschlatter/firebase"

Overview

Package firebase wraps the official Firebase client with an interface that can be faked in tests.

This package is designed to be close to a drop-in replacement for firebase.google.org/go, though it only implements a very small subset of that interface.

Index

Package files

fake.go firebase.go real.go

type App

type App interface {
    Database(context.Context) (db.Client, error)
}

App mirrors https://godoc.org/firebase.google.com/go#App

func NewApp

func NewApp(ctx context.Context, config *Config, opts ...option.ClientOption) (App, error)

NewApp mirrors https://godoc.org/firebase.google.com/go#NewApp

It returns a real Firebase client that implements App.

func NewFake

func NewFake() App

NewFake returns a fake implementation of App. The fake implementation provides an in-memory database.

type Config

type Config = firebase.Config

Generated by godoc2md

# Packages

Package db wraps https://godoc.org/firebase.google.com/go/db with an interface that can be faked in tests.

# Functions

NewApp mirrors https://godoc.org/firebase.google.com/go#NewApp It returns a real Firebase client that implements App.
NewFake returns a fake implementation of App.

# Interfaces

App mirrors https://godoc.org/firebase.google.com/go#App.

# Type aliases

No description provided by the author