go: firebase.google.com/go Index | Files | Directories

package firebase

import "firebase.google.com/go"

Package firebase is the entry point to the Firebase Admin SDK. It provides functionality for initializing App instances, which serve as the central entities that provide access to various other Firebase services exposed from the SDK.

Index

Package Files

firebase.go

Constants

const Version = "2.2.1"

Version of the Firebase Go Admin SDK.

type App Uses

type App struct {
    // contains filtered or unexported fields
}

An App holds configuration and state common to all Firebase services that are exposed from the SDK.

func NewApp Uses

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

NewApp creates a new App from the provided config and client options.

If the client options contain a valid credential (a service account file, a refresh token file or an oauth2.TokenSource) the App will be authenticated using that credential. Otherwise, NewApp attempts to authenticate the App with Google application default credentials.

func (*App) Auth Uses

func (a *App) Auth(ctx context.Context) (*auth.Client, error)

Auth returns an instance of auth.Client.

func (*App) Firestore Uses

func (a *App) Firestore(ctx context.Context) (*firestore.Client, error)

Firestore returns a new firestore.Client instance from the https://godoc.org/cloud.google.com/go/firestore package.

func (*App) Storage Uses

func (a *App) Storage(ctx context.Context) (*storage.Client, error)

Storage returns a new instance of storage.Client.

type Config Uses

type Config struct {
    ProjectID     string
    StorageBucket string
}

Config represents the configuration used to initialize an App.

Directories

PathSynopsis
authPackage auth contains functions for minting custom authentication tokens, and verifying Firebase ID tokens.
internalPackage internal contains functionality that is only accessible from within the Admin SDK.
storagePackage storage provides functions for accessing Google Cloud Storge buckets.

Package firebase imports 10 packages (graph). Updated 2017-12-14. Refresh now. Tools for package owners.