firebase

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2021 License: MIT Imports: 7 Imported by: 0

README

#firebase

Create a new auth.Client by simply calling one method and setting one env variable.

Need

  • json file that contains your firebase token
  • set FIREBASE_KEY_PATH = "path to your json file"

Code

package main 

import "github.com/alvarios/wireframe/firebase"
import "fmt"

func main(){
    client := firebase.SetupFirebaseFromEnv()
    fmt.Printf("This is my new client %v" , client)
}

The setup function panic if it's fail to init the nex firebase client.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupFirebase

func SetupFirebase(keyPath string) *auth.Client

SetupFirebase create a new *auth.Client. keyPath is the path to the wireframe json file.

func SetupFirebaseFromEnv

func SetupFirebaseFromEnv() *auth.Client

SetupFirebaseFromEnv create a new *auth.Client, using env variable You must init FIREBASE_KEY_PATH environment variable to the "root directory path" to the credentials file

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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