Module: Google::Cloud
- Defined in:
- lib/google-cloud-storage.rb,
lib/google/cloud/storage.rb,
lib/google/cloud/storage/file.rb,
lib/google/cloud/storage/bucket.rb,
lib/google/cloud/storage/errors.rb,
lib/google/cloud/storage/policy.rb,
lib/google/cloud/storage/convert.rb,
lib/google/cloud/storage/project.rb,
lib/google/cloud/storage/service.rb,
lib/google/cloud/storage/version.rb,
lib/google/cloud/storage/file/acl.rb,
lib/google/cloud/storage/hmac_key.rb,
lib/google/cloud/storage/file/list.rb,
lib/google/cloud/storage/bucket/acl.rb,
lib/google/cloud/storage/bucket/cors.rb,
lib/google/cloud/storage/bucket/list.rb,
lib/google/cloud/storage/credentials.rb,
lib/google/cloud/storage/post_object.rb,
lib/google/cloud/storage/notification.rb,
lib/google/cloud/storage/file/verifier.rb,
lib/google/cloud/storage/hmac_key/list.rb,
lib/google/cloud/storage/file/signer_v2.rb,
lib/google/cloud/storage/file/signer_v4.rb,
lib/google/cloud/storage/policy/binding.rb,
lib/google/cloud/storage/policy/bindings.rb,
lib/google/cloud/storage/bucket/lifecycle.rb,
lib/google/cloud/storage/policy/condition.rb
Defined Under Namespace
Modules: Storage
Class Method Summary collapse
-
.storage(project_id = nil, credentials = nil, scope: nil, retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil) ⇒ Google::Cloud::Storage::Project
Creates a new object for connecting to the Storage service.
Instance Method Summary collapse
-
#storage(scope: nil, retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil) ⇒ Google::Cloud::Storage::Project
Creates a new object for connecting to the Storage service.
Class Method Details
.storage(project_id = nil, credentials = nil, scope: nil, retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil) ⇒ Google::Cloud::Storage::Project
Creates a new object for connecting to the Storage service. Each call creates a new connection.
For more information on connecting to Google Cloud see the Authentication Guide.
120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/google-cloud-storage.rb', line 120 def self.storage project_id = nil, credentials = nil, scope: nil, retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil require "google/cloud/storage" Google::Cloud::Storage.new project_id: project_id, credentials: credentials, scope: scope, retries: retries, timeout: timeout, open_timeout: (open_timeout || timeout), read_timeout: (read_timeout || timeout), send_timeout: (send_timeout || timeout) end |
Instance Method Details
#storage(scope: nil, retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil) ⇒ Google::Cloud::Storage::Project
Creates a new object for connecting to the Storage service. Each call creates a new connection.
For more information on connecting to Google Cloud see the Authentication Guide.
71 72 73 74 75 76 77 78 |
# File 'lib/google-cloud-storage.rb', line 71 def storage scope: nil, retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil Google::Cloud.storage @project, @keyfile, scope: scope, retries: (retries || @retries), timeout: (timeout || @timeout), open_timeout: (open_timeout || timeout), read_timeout: (read_timeout || timeout), send_timeout: (send_timeout || timeout) end |