Class: Google::Cloud::Datastore::Credentials

Inherits:
V1::Credentials
  • Object
show all
Defined in:
lib/google/cloud/datastore/credentials.rb

Overview

Credentials

Represents the authentication and authorization used to connect to the Datastore API.

Examples:

require "google/cloud/datastore"

keyfile = "/path/to/keyfile.json"
creds = Google::Cloud::Datastore::Credentials.new keyfile

datastore = Google::Cloud::Datastore.new(
  project_id: "my-todo-project",
  credentials: creds
)

datastore.project_id #=> "my-todo-project"

Constant Summary

Constants inherited from V1::Credentials

V1::Credentials::DEFAULT_PATHS, V1::Credentials::JSON_ENV_VARS, V1::Credentials::PATH_ENV_VARS, V1::Credentials::SCOPE