Class: Google::Cloud::Spanner::Credentials

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

Overview

Credentials

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

Examples:

require "google/cloud/spanner"

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

spanner = Google::Cloud::Spanner.new(
  project_id: "my-project",
  credentials: creds
)

spanner.project_id #=> "my-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