endpoints

command
v0.0.0-...-1fac7cf Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

README

Google Cloud Endpoints sample for Google App Engine flexible environment

Deploying the backend

Update the swagger.yaml configuration file

Edit the swagger.yaml file and replace YOUR-PROJECT-ID with your project ID.

The backend can be secured with several authentication schemes:

  • Firebase Auth
  • Google ID token
  • Google JWT (e.g. service account)
  • Auth0

Each of those require further configuration. See the documentation (currently under whitelist) for more information.

Deploy

First, install aedeploy:

go get -u google.golang.org/appengine/cmd/aedeploy

Deploy the application:

aedeploy gcloud beta app deploy

Running the client

Send an echo request using an API key

First, create a project API key.

Then, run:

go run client/main.go -api-key=AIza.... -host=https://my-app.appspot.com -echo message
Send a request using JWT authentication

First, download a Service Account JSON key file.

Then, run:

go run client/main.go -host=https://my-app.appspot.com -service-account=path_to_service_account.json

Documentation

Overview

Sample endpoints demonstrates a Cloud Endpoints API.

Directories

Path Synopsis
Command client performs authenticated requests against an Endpoints API server.
Command client performs authenticated requests against an Endpoints API server.

Jump to

Keyboard shortcuts

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