gce

command
v0.0.0-...-a9cfc41 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2018 License: MIT Imports: 3 Imported by: 0

README

About gce

This example shows how to use the firebase package with Google Compute Service credentials, using Google's standard oauth2/google auth token providers.

Projects and Scopes

Please note that when using google.ComputeTokenSource, you must create an instance that has the appropriate scopes for Firebase's v3+ API, either by creating a custom service account credential in the IAM console or when creating the compute instance.

The scopes needed for Firebase v3+ are:

Scopes can be passed via the gcloud cli tool using the --scopes option:

# this uses the short-hand notation available for the userinfo.email scope
$ gcloud compute instances create <INSTANCE_NAME> --scopes userinfo-email,https://www.googleapis.com/auth/firebase.database

You can see what scopes are assigned to an instance using this command:

$ gcloud compute instances describe <INSTANCE_NAME>

Documentation

Overview

example/gce/gce.go

Jump to

Keyboard shortcuts

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