firebase

package
v0.0.0-...-64e57e2 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package firebase provides wrapper functions for Firebase App initialisers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Credentials string `env:"GOOGLE_APPLICATION_CREDENTIALS"`
}

Config represents the configuration settings for the Firebase app.

func NewConfig

func NewConfig() (cfg Config, err error)

NewConfig reads Firebase configuration settings from environment variables.

type FirebaseApp

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

func NewApp

func NewApp(cfg Config) (*FirebaseApp, error)

NewApp creates a Firebase app with given configuration. If the Config Credentials field is non-empty, the field is used as the credentials file path. Otherwise, Google application default credentials are used.

func (*FirebaseApp) NewAuth

func (f *FirebaseApp) NewAuth() (*auth.Client, error)

NewAuth returns instance of Firebase authentication client.

func (*FirebaseApp) NewMessaging

func (f *FirebaseApp) NewMessaging() (*messaging.Client, error)

NewMessaging returns instance of Firebase Messaging client.

Jump to

Keyboard shortcuts

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