google-cloud-storage-control 1.4.1 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +0 -1
- data/lib/google/cloud/storage/control/version.rb +1 -1
- data/lib/google/cloud/storage/control.rb +12 -3
- metadata +6 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4a0496e8c5a082da9c3e3b461cdc6cc5f1f30e1509d9741cbbdbb07e07f02d13
|
|
4
|
+
data.tar.gz: c102b712bfe47c31e9022f3d113da079aaae02b43038ddb1f58a3ee9c39a7612
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e5f628ca31c02a500a745d78862a8d3affdcc21d1328c009d75bccaa9bfb12d01cf9b5b5f3261ce3544a728a5b663e9d759f845eec94cb1cbd5803caa38b93aa
|
|
7
|
+
data.tar.gz: abf25079021c7586d5e9ce375496465a138ccb65411ee2a4f6277d20dc862806970628781801af6a48b1cb19acdccfc66b4de16f462be0c205608c89b334b316
|
data/README.md
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
The Storage Control API lets you perform metadata-specific, control plane, and long-running operations. The Storage Control API creates one space to perform metadata-specific, control plane, and long-running operations apart from the Storage API. Separating these operations from the Storage API improves API standardization and lets you run faster releases.
|
|
4
4
|
|
|
5
|
-
The Google Cloud Storage API allows applications to read and write data through the abstractions of buckets and objects, which are similar to directories and files except that buckets cannot contain other buckets, and directory-level operations (like directory rename) are not supported. Buckets share a single global namespace, and each bucket belongs to a specific project that has an associated owner that pays for the data stored in the bucket. This API is accessed using standard gRPC requests.
|
|
6
5
|
|
|
7
6
|
Actual client classes for the various versions of this API are defined in
|
|
8
7
|
_versioned_ client gems, with names of the form `google-cloud-storage-control-v*`.
|
|
@@ -56,9 +56,11 @@ module Google
|
|
|
56
56
|
# `version` parameter. If the StorageControl service is
|
|
57
57
|
# supported by that API version, and the corresponding gem is available, the
|
|
58
58
|
# appropriate versioned client will be returned.
|
|
59
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
|
60
|
+
# the `transport` parameter.
|
|
59
61
|
#
|
|
60
62
|
# Raises an exception if the currently installed versioned client gem for the
|
|
61
|
-
# given API version does not support the StorageControl service.
|
|
63
|
+
# given API version does not support the given transport of the StorageControl service.
|
|
62
64
|
# You can determine whether the method will succeed by calling
|
|
63
65
|
# {Google::Cloud::Storage::Control.storage_control_available?}.
|
|
64
66
|
#
|
|
@@ -68,9 +70,10 @@ module Google
|
|
|
68
70
|
#
|
|
69
71
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
70
72
|
# Defaults to `:v2`.
|
|
73
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
|
71
74
|
# @return [::Object] A client object for the specified version.
|
|
72
75
|
#
|
|
73
|
-
def self.storage_control version: :v2, &block
|
|
76
|
+
def self.storage_control version: :v2, transport: :grpc, &block
|
|
74
77
|
require "google/cloud/storage/control/#{version.to_s.downcase}"
|
|
75
78
|
|
|
76
79
|
package_name = Google::Cloud::Storage::Control
|
|
@@ -78,6 +81,7 @@ module Google
|
|
|
78
81
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
79
82
|
.first
|
|
80
83
|
service_module = Google::Cloud::Storage::Control.const_get(package_name).const_get(:StorageControl)
|
|
84
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
|
81
85
|
service_module.const_get(:Client).new(&block)
|
|
82
86
|
end
|
|
83
87
|
|
|
@@ -90,9 +94,10 @@ module Google
|
|
|
90
94
|
#
|
|
91
95
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
92
96
|
# Defaults to `:v2`.
|
|
97
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
|
93
98
|
# @return [boolean] Whether the service is available.
|
|
94
99
|
#
|
|
95
|
-
def self.storage_control_available? version: :v2
|
|
100
|
+
def self.storage_control_available? version: :v2, transport: :grpc
|
|
96
101
|
require "google/cloud/storage/control/#{version.to_s.downcase}"
|
|
97
102
|
package_name = Google::Cloud::Storage::Control
|
|
98
103
|
.constants
|
|
@@ -102,6 +107,10 @@ module Google
|
|
|
102
107
|
service_module = Google::Cloud::Storage::Control.const_get package_name
|
|
103
108
|
return false unless service_module.const_defined? :StorageControl
|
|
104
109
|
service_module = service_module.const_get :StorageControl
|
|
110
|
+
if transport == :rest
|
|
111
|
+
return false unless service_module.const_defined? :Rest
|
|
112
|
+
service_module = service_module.const_get :Rest
|
|
113
|
+
end
|
|
105
114
|
service_module.const_defined? :Client
|
|
106
115
|
rescue ::LoadError
|
|
107
116
|
false
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: google-cloud-storage-control
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.4.
|
|
4
|
+
version: 1.4.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Google LLC
|
|
@@ -43,13 +43,11 @@ dependencies:
|
|
|
43
43
|
- - "<"
|
|
44
44
|
- !ruby/object:Gem::Version
|
|
45
45
|
version: 2.a
|
|
46
|
-
description: The
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
owner that pays for the data stored in the bucket. This API is accessed using standard
|
|
52
|
-
gRPC requests.
|
|
46
|
+
description: The Storage Control API lets you perform metadata-specific, control plane,
|
|
47
|
+
and long-running operations. The Storage Control API creates one space to perform
|
|
48
|
+
metadata-specific, control plane, and long-running operations apart from the Storage
|
|
49
|
+
API. Separating these operations from the Storage API improves API standardization
|
|
50
|
+
and lets you run faster releases.
|
|
53
51
|
email: googleapis-packages@google.com
|
|
54
52
|
executables: []
|
|
55
53
|
extensions: []
|