package
0.0.0-20180403234405-3be5551c975d
Repository: https://github.com/guregodevo/golang-samples.git
Documentation: pkg.go.dev
# README
Google Cloud Endpoints Sample for Go
This sample demonstrates how to use Google Cloud Endpoints using Go.
For a complete walkthrough showing how to run this sample in different environments, see the Google Cloud Endpoints Quickstarts.
Running the backend locally
Simply run the backend using go run
:
go run app.go
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
# Packages
Command client performs authenticated requests against an Endpoints API server.