google-cloud-bigtable 0.1.0

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.
Files changed (88) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +10 -0
  3. data/LICENSE +201 -0
  4. data/README.md +65 -0
  5. data/lib/google/bigtable/admin/v2/bigtable_instance_admin_pb.rb +139 -0
  6. data/lib/google/bigtable/admin/v2/bigtable_instance_admin_services_pb.rb +85 -0
  7. data/lib/google/bigtable/admin/v2/bigtable_table_admin_pb.rb +137 -0
  8. data/lib/google/bigtable/admin/v2/bigtable_table_admin_services_pb.rb +117 -0
  9. data/lib/google/bigtable/admin/v2/common_pb.rb +24 -0
  10. data/lib/google/bigtable/admin/v2/instance_pb.rb +72 -0
  11. data/lib/google/bigtable/admin/v2/table_pb.rb +88 -0
  12. data/lib/google/bigtable/v2/bigtable_pb.rb +109 -0
  13. data/lib/google/bigtable/v2/bigtable_services_pb.rb +67 -0
  14. data/lib/google/bigtable/v2/data_pb.rb +155 -0
  15. data/lib/google/cloud/bigtable/admin/credentials.rb +26 -0
  16. data/lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb +1417 -0
  17. data/lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client_config.json +123 -0
  18. data/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin_client.rb +1079 -0
  19. data/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin_client_config.json +109 -0
  20. data/lib/google/cloud/bigtable/admin/v2/credentials.rb +50 -0
  21. data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/bigtable_instance_admin.rb +279 -0
  22. data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/bigtable_table_admin.rb +353 -0
  23. data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/instance.rb +194 -0
  24. data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/table.rb +209 -0
  25. data/lib/google/cloud/bigtable/admin/v2/doc/google/iam/v1/iam_policy.rb +62 -0
  26. data/lib/google/cloud/bigtable/admin/v2/doc/google/iam/v1/policy.rb +127 -0
  27. data/lib/google/cloud/bigtable/admin/v2/doc/google/longrunning/operations.rb +92 -0
  28. data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/any.rb +124 -0
  29. data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/duration.rb +90 -0
  30. data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/empty.rb +28 -0
  31. data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/field_mask.rb +223 -0
  32. data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/timestamp.rb +106 -0
  33. data/lib/google/cloud/bigtable/admin/v2/doc/google/rpc/status.rb +83 -0
  34. data/lib/google/cloud/bigtable/admin/v2.rb +200 -0
  35. data/lib/google/cloud/bigtable/admin.rb +196 -0
  36. data/lib/google/cloud/bigtable/app_profile/job.rb +102 -0
  37. data/lib/google/cloud/bigtable/app_profile/list.rb +159 -0
  38. data/lib/google/cloud/bigtable/app_profile.rb +373 -0
  39. data/lib/google/cloud/bigtable/chunk_processor.rb +253 -0
  40. data/lib/google/cloud/bigtable/cluster/job.rb +92 -0
  41. data/lib/google/cloud/bigtable/cluster/list.rb +169 -0
  42. data/lib/google/cloud/bigtable/cluster.rb +264 -0
  43. data/lib/google/cloud/bigtable/column_family.rb +280 -0
  44. data/lib/google/cloud/bigtable/column_range.rb +186 -0
  45. data/lib/google/cloud/bigtable/convert.rb +75 -0
  46. data/lib/google/cloud/bigtable/credentials.rb +24 -0
  47. data/lib/google/cloud/bigtable/errors.rb +35 -0
  48. data/lib/google/cloud/bigtable/gc_rule.rb +215 -0
  49. data/lib/google/cloud/bigtable/instance/cluster_map.rb +70 -0
  50. data/lib/google/cloud/bigtable/instance/job.rb +97 -0
  51. data/lib/google/cloud/bigtable/instance/list.rb +159 -0
  52. data/lib/google/cloud/bigtable/instance.rb +921 -0
  53. data/lib/google/cloud/bigtable/longrunning_job.rb +105 -0
  54. data/lib/google/cloud/bigtable/mutation_entry.rb +244 -0
  55. data/lib/google/cloud/bigtable/mutation_operations.rb +338 -0
  56. data/lib/google/cloud/bigtable/policy.rb +163 -0
  57. data/lib/google/cloud/bigtable/project.rb +580 -0
  58. data/lib/google/cloud/bigtable/read_modify_write_rule.rb +129 -0
  59. data/lib/google/cloud/bigtable/read_operations.rb +345 -0
  60. data/lib/google/cloud/bigtable/row.rb +125 -0
  61. data/lib/google/cloud/bigtable/row_filter/chain_filter.rb +539 -0
  62. data/lib/google/cloud/bigtable/row_filter/condition_filter.rb +108 -0
  63. data/lib/google/cloud/bigtable/row_filter/interleave_filter.rb +570 -0
  64. data/lib/google/cloud/bigtable/row_filter/simple_filter.rb +273 -0
  65. data/lib/google/cloud/bigtable/row_filter.rb +593 -0
  66. data/lib/google/cloud/bigtable/row_range.rb +174 -0
  67. data/lib/google/cloud/bigtable/rows_mutator.rb +120 -0
  68. data/lib/google/cloud/bigtable/rows_reader.rb +196 -0
  69. data/lib/google/cloud/bigtable/sample_row_key.rb +82 -0
  70. data/lib/google/cloud/bigtable/service.rb +817 -0
  71. data/lib/google/cloud/bigtable/table/cluster_state.rb +93 -0
  72. data/lib/google/cloud/bigtable/table/column_family_map.rb +68 -0
  73. data/lib/google/cloud/bigtable/table/list.rb +147 -0
  74. data/lib/google/cloud/bigtable/table.rb +676 -0
  75. data/lib/google/cloud/bigtable/v2/bigtable_client.rb +579 -0
  76. data/lib/google/cloud/bigtable/v2/bigtable_client_config.json +65 -0
  77. data/lib/google/cloud/bigtable/v2/credentials.rb +45 -0
  78. data/lib/google/cloud/bigtable/v2/doc/google/bigtable/v2/bigtable.rb +286 -0
  79. data/lib/google/cloud/bigtable/v2/doc/google/bigtable/v2/data.rb +492 -0
  80. data/lib/google/cloud/bigtable/v2/doc/google/protobuf/any.rb +124 -0
  81. data/lib/google/cloud/bigtable/v2/doc/google/protobuf/wrappers.rb +89 -0
  82. data/lib/google/cloud/bigtable/v2/doc/google/rpc/status.rb +83 -0
  83. data/lib/google/cloud/bigtable/v2.rb +132 -0
  84. data/lib/google/cloud/bigtable/value_range.rb +175 -0
  85. data/lib/google/cloud/bigtable/version.rb +22 -0
  86. data/lib/google/cloud/bigtable.rb +223 -0
  87. data/lib/google-cloud-bigtable.rb +167 -0
  88. metadata +283 -0
@@ -0,0 +1,22 @@
1
+ # Copyright 2018 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+
16
+ module Google
17
+ module Cloud
18
+ module Bigtable
19
+ VERSION = "0.1.0".freeze
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,223 @@
1
+ # Copyright 2018 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+
16
+ require "google-cloud-bigtable"
17
+ require "google/cloud/env"
18
+ require "google/cloud/errors"
19
+ require "google/cloud/bigtable/credentials"
20
+ require "google/cloud/bigtable/project"
21
+
22
+ module Google
23
+ module Cloud
24
+ # Cloud Bigtable
25
+ #
26
+ # Ruby Client for Cloud Bigtable API ([Alpha](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
27
+ #
28
+ # [Cloud Bigtable API][Product Documentation]:
29
+ # API for reading and writing the contents of Bigtables associated with a
30
+ # cloud project.
31
+ # - [Product Documentation][]
32
+ #
33
+ # ## Quick Start
34
+ # In order to use this library, you first need to go through the following
35
+ # steps:
36
+ #
37
+ # 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
38
+ # 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
39
+ # 3. [Enable the Cloud Bigtable API.](https://console.cloud.google.com/apis/api/bigtable)
40
+ # 4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
41
+ #
42
+ # ### Next Steps
43
+ # - Read the [Cloud Bigtable API Product documentation][Product Documentation]
44
+ # to learn more about the product and see How-to Guides.
45
+ # - View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/README.md)
46
+ # to see the full list of Cloud APIs that we cover.
47
+ #
48
+ # ## Enabling Logging
49
+ #
50
+ # To enable logging for this library, set the logger for the underlying
51
+ # [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library. The
52
+ # logger that you set may be a Ruby stdlib
53
+ # [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html)
54
+ # as shown below, or a
55
+ # [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
56
+ # that will write logs to [Stackdriver
57
+ # Logging](https://cloud.google.com/logging/). See
58
+ # [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
59
+ # and the gRPC
60
+ # [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb)
61
+ # for additional information.
62
+ #
63
+ # Configuring a Ruby stdlib logger:
64
+ #
65
+ # ```ruby
66
+ # require "logger"
67
+ #
68
+ # module MyLogger
69
+ # LOGGER = Logger.new $stderr, level: Logger::WARN
70
+ # def logger
71
+ # LOGGER
72
+ # end
73
+ # end
74
+ #
75
+ # # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
76
+ # module GRPC
77
+ # extend MyLogger
78
+ # end
79
+ # ```
80
+ #
81
+ # [Product Documentation]: https://cloud.google.com/bigtable
82
+ #
83
+ module Bigtable
84
+ # Service for managing Bigtable instance, tables and reading from and
85
+ # writing to existing Bigtable tables.
86
+ #
87
+ # @param project_id [String]
88
+ # Project identifier for the Bigtable service you are connecting to.
89
+ # If not present, the default project for the credentials is used.
90
+ # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
91
+ # Provides the means for authenticating requests made by the client. This parameter can
92
+ # be many types.
93
+ # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
94
+ # authenticating requests made by this client.
95
+ # A `String` will be treated as the path to the keyfile to be used for the construction of
96
+ # credentials for this client.
97
+ # A `Hash` will be treated as the contents of a keyfile to be used for the construction of
98
+ # credentials for this client.
99
+ # A `GRPC::Core::Channel` will be used to make calls through.
100
+ # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
101
+ # should already be composed with a `GRPC::Core::CallCredentials` object.
102
+ # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
103
+ # metadata for requests, generally, to give OAuth credentials.
104
+ # @param scope [Array<String>]
105
+ # The OAuth 2.0 scopes controlling the set of resources and operations
106
+ # that the connection can access. See [Using OAuth 2.0 to Access Google
107
+ # APIs](https://developers.google.com/identity/protocols/OAuth2).
108
+ # The OAuth scopes for this service. This parameter is ignored if an
109
+ # updater_proc is supplied.
110
+ # @param client_config [Hash]
111
+ # A Hash for call options for each method.
112
+ # See Google::Gax#construct_settings for the structure of
113
+ # this data. Falls back to the default config if not specified
114
+ # or the specified config is missing data points.
115
+ # @param timeout [Integer]
116
+ # The default timeout, in seconds, for calls made through this client. Optional.
117
+ # @return [Google::Cloud::Bigtable::Project]
118
+ #
119
+ # @example
120
+ # require "google/cloud/bigtable"
121
+ #
122
+ # client = Google::Cloud::Bigtable.new
123
+
124
+ def self.new \
125
+ project_id: nil,
126
+ credentials: nil,
127
+ scope: nil,
128
+ client_config: nil,
129
+ timeout: nil
130
+ project_id = (project_id || default_project_id).to_s
131
+
132
+ raise InvalidArgumentError, "project_id is required" unless project_id
133
+
134
+ scope ||= configure.scope
135
+ timeout ||= configure.timeout
136
+ client_config ||= configure.client_config
137
+ credentials ||= default_credentials(scope: scope)
138
+
139
+ unless credentials.is_a? Google::Auth::Credentials
140
+ credentials = Bigtable::Credentials.new credentials, scope: scope
141
+ end
142
+
143
+ service = Bigtable::Service.new(
144
+ project_id,
145
+ credentials,
146
+ timeout: timeout,
147
+ client_config: client_config
148
+ )
149
+ Bigtable::Project.new(service)
150
+ end
151
+
152
+ # Configure the Google Cloud Bigtable library.
153
+ #
154
+ # The following Bigtable configuration parameters are supported:
155
+ #
156
+ # * `project_id` - (String) Identifier for a Bigtable project. (The
157
+ # parameter `project` is considered deprecated, but may also be used.)
158
+ # * `credentials` - (String, Hash, Google::Auth::Credentials,
159
+ # GRPC::Core::Channel, GRPC::Core::ChannelCredentials) The path to
160
+ # the keyfile as a String, the contents of the keyfile as a Hash, or a
161
+ # Google::Auth::Credentials object. (See {Bigtable::Credentials}) (The
162
+ # parameter `keyfile` is considered deprecated, but may also be used.)
163
+ # * `scope` - (String, Array<String>) The OAuth 2.0 scopes controlling
164
+ # the set of resources and operations that the connection can access.
165
+ # * `timeout` - (Integer) Default timeout to use in requests.
166
+ # * `client_config` - (Hash) A hash of values to override the default
167
+ # behavior of the API client.
168
+ #
169
+ # @return [Google::Cloud::Config] The configuration object the
170
+ # Google::Cloud::Bigtable library uses.
171
+
172
+ def self.configure
173
+ yield Google::Cloud.configure.bigtable if block_given?
174
+
175
+ Google::Cloud.configure.bigtable
176
+ end
177
+
178
+ # Configure the Google Cloud Bigtable library.
179
+ #
180
+ # The following Bigtable configuration parameters are supported:
181
+ #
182
+ # * `project_id` - (String) Identifier for a Bigtable project. (The
183
+ # parameter `project` is considered deprecated, but may also be used.)
184
+ # * `credentials` - (String, Hash, Google::Auth::Credentials,
185
+ # GRPC::Core::Channel, GRPC::Core::ChannelCredentials) The path to
186
+ # the keyfile as a String, the contents of the keyfile as a Hash, or a
187
+ # Google::Auth::Credentials object. (See {Bigtable::Credentials}) (The
188
+ # parameter `keyfile` is considered deprecated, but may also be used.)
189
+ # * `scope` - (String, Array<String>) The OAuth 2.0 scopes controlling
190
+ # the set of resources and operations that the connection can access.
191
+ # * `timeout` - (Integer) Default timeout to use in requests.
192
+ # * `client_config` - (Hash) A hash of values to override the default
193
+ # behavior of the API client.
194
+ #
195
+ # @return [Google::Cloud::Config] The configuration object the
196
+ # Google::Cloud::Bigtable library uses.
197
+
198
+ def self.configure
199
+ yield Google::Cloud.configure.bigtable if block_given?
200
+
201
+ Google::Cloud.configure.bigtable
202
+ end
203
+
204
+ # @private
205
+ # Default project.
206
+
207
+ def self.default_project_id
208
+ Google::Cloud.configure.bigtable.project_id ||
209
+ Google::Cloud.configure.project_id ||
210
+ Google::Cloud.env.project_id
211
+ end
212
+
213
+ # @private
214
+ # Default credentials.
215
+
216
+ def self.default_credentials scope: nil
217
+ Google::Cloud.configure.bigtable.credentials ||
218
+ Google::Cloud.configure.credentials ||
219
+ Bigtable::Credentials.default(scope: scope)
220
+ end
221
+ end
222
+ end
223
+ end
@@ -0,0 +1,167 @@
1
+ # Copyright 2018 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+
16
+ # This file is here to be autorequired by bundler, so that the
17
+ # Google::Cloud#bigtable method can be available,
18
+ # but the library and all dependencies won't be loaded until required and used.
19
+
20
+ gem "google-cloud-core"
21
+
22
+ require "googleauth"
23
+ require "grpc"
24
+ require "google/cloud"
25
+ require "google/cloud/config"
26
+
27
+ module Google
28
+ module Cloud
29
+ # Creates a new object for connecting to the Bigtable service.
30
+ #
31
+ # For more information on connecting to Google Cloud see the [Authentication
32
+ # Guide](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/guides/authentication).
33
+ #
34
+ # @param scope [Array<String>]
35
+ # The OAuth 2.0 scopes controlling the set of resources and operations
36
+ # that the connection can access. See [Using OAuth 2.0 to Access Google
37
+ # APIs](https://developers.google.com/identity/protocols/OAuth2).
38
+ # The OAuth scopes for this service. This parameter is ignored if an
39
+ # updater_proc is supplied.
40
+ # @param timeout [Integer]
41
+ # The default timeout, in seconds, for calls made through this client.
42
+ # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
43
+ # Provides the means for authenticating requests made by the client. This parameter can
44
+ # be many types.
45
+ # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
46
+ # authenticating requests made by this client.
47
+ # A `String` will be treated as the path to the keyfile to be used for the construction of
48
+ # credentials for this client.
49
+ # A `Hash` will be treated as the contents of a keyfile to be used for the construction of
50
+ # credentials for this client.
51
+ # A `GRPC::Core::Channel` will be used to make calls through.
52
+ # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
53
+ # should already be composed with a `GRPC::Core::CallCredentials` object.
54
+ # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
55
+ # metadata for requests, generally, to give OAuth credentials.
56
+ # @param client_config [Hash]
57
+ # A Hash for call options for each method.
58
+ # See Google::Gax#construct_settings for the structure of
59
+ # this data. Falls back to the default config if not specified
60
+ # or the specified config is missing data points.
61
+ # @return [Google::Cloud::Bigtable::Project]
62
+ #
63
+ # @example
64
+ # require "google/cloud"
65
+ #
66
+ # gcloud = Google::Cloud.new
67
+ #
68
+ # bigtable = gcloud.bigtable
69
+ #
70
+
71
+ def bigtable scope: nil, timeout: nil, credentials: nil, client_config: nil
72
+ Google::Cloud.bigtable(
73
+ project_id: @project,
74
+ credentials: (credentials || @keyfile),
75
+ scope: scope,
76
+ timeout: (timeout || @timeout),
77
+ client_config: client_config
78
+ )
79
+ end
80
+
81
+ # Create bigtable client instance for data, table admin and instance admin
82
+ # operartions.
83
+ #
84
+ # @param project_id [String]
85
+ # Project identifier for the Bigtable service you
86
+ # are connecting to. If not present, the default project for the
87
+ # credentials is used.
88
+ # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
89
+ # Provides the means for authenticating requests made by the client. This parameter can
90
+ # be many types.
91
+ # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
92
+ # authenticating requests made by this client.
93
+ # A `String` will be treated as the path to the keyfile to be used for the construction of
94
+ # credentials for this client.
95
+ # A `Hash` will be treated as the contents of a keyfile to be used for the construction of
96
+ # credentials for this client.
97
+ # A `GRPC::Core::Channel` will be used to make calls through.
98
+ # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
99
+ # should already be composed with a `GRPC::Core::CallCredentials` object.
100
+ # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
101
+ # metadata for requests, generally, to give OAuth credentials.
102
+ # @param scope [Array<String>]
103
+ # The OAuth 2.0 scopes controlling the set of resources and operations
104
+ # that the connection can access. See [Using OAuth 2.0 to Access Google
105
+ # APIs](https://developers.google.com/identity/protocols/OAuth2).
106
+ # The OAuth scopes for this service. This parameter is ignored if an
107
+ # updater_proc is supplied.
108
+ # @param timeout [Integer]
109
+ # The default timeout, in seconds, for calls made through this client.
110
+ # @param client_config [Hash]
111
+ # A Hash for call options for each method.
112
+ # See Google::Gax#construct_settings for the structure of
113
+ # this data. Falls back to the default config if not specified
114
+ # or the specified config is missing data points. Optional.
115
+ # @return [Google::Cloud::Bigtable::Project]
116
+ #
117
+ # @example
118
+ # require "google/cloud"
119
+ #
120
+ # bigtable = Google::Cloud.bigtable
121
+
122
+ def self.bigtable \
123
+ project_id: nil,
124
+ credentials: nil,
125
+ scope: nil,
126
+ timeout: nil,
127
+ client_config: nil
128
+ require "google/cloud/bigtable"
129
+ Google::Cloud::Bigtable.new(
130
+ project_id: project_id,
131
+ credentials: credentials,
132
+ scope: scope,
133
+ timeout: timeout,
134
+ client_config: client_config
135
+ )
136
+ end
137
+ end
138
+ end
139
+
140
+ # Set the default BIGTABLE configuration
141
+ Google::Cloud.configure.add_config! :bigtable do |config|
142
+ default_project = Google::Cloud::Config.deferred do
143
+ ENV["BIGTABLE_PROJECT"]
144
+ end
145
+ default_creds = Google::Cloud::Config.deferred do
146
+ Google::Cloud::Config.credentials_from_env(
147
+ "BIGTABLE_CREDENTIALS", "BIGTABLE_CREDENTIALS_JSON",
148
+ "BIGTABLE_KEYFILE", "BIGTABLE_KEYFILE_JSON"
149
+ )
150
+ end
151
+
152
+ config.add_field! :project_id, default_project, match: String, allow_nil: true
153
+ config.add_alias! :project, :project_id
154
+ config.add_field! :credentials, default_creds,
155
+ match: [
156
+ String,
157
+ Hash,
158
+ Google::Auth::Credentials,
159
+ GRPC::Core::Channel,
160
+ GRPC::Core::ChannelCredentials,
161
+ Proc
162
+ ],
163
+ allow_nil: true
164
+ config.add_field! :scope, nil, match: [String, Array]
165
+ config.add_field! :timeout, nil, match: Integer
166
+ config.add_field! :client_config, nil, match: Hash
167
+ end
metadata ADDED
@@ -0,0 +1,283 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: google-cloud-bigtable
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Google LLC
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-08-16 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: google-gax
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: grpc-google-iam-v1
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.6.9
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 0.6.9
41
+ - !ruby/object:Gem::Dependency
42
+ name: google-cloud-core
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.1'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.1'
55
+ - !ruby/object:Gem::Dependency
56
+ name: minitest
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '5.10'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '5.10'
69
+ - !ruby/object:Gem::Dependency
70
+ name: minitest-focus
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '1.1'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '1.1'
83
+ - !ruby/object:Gem::Dependency
84
+ name: minitest-rg
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '5.2'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '5.2'
97
+ - !ruby/object:Gem::Dependency
98
+ name: redcarpet
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '3.0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '3.0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rubocop
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 0.50.0
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 0.50.0
125
+ - !ruby/object:Gem::Dependency
126
+ name: simplecov
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '0.9'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '0.9'
139
+ - !ruby/object:Gem::Dependency
140
+ name: yard
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '0.9'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '0.9'
153
+ - !ruby/object:Gem::Dependency
154
+ name: yard-doctest
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "<="
158
+ - !ruby/object:Gem::Version
159
+ version: 0.1.8
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "<="
165
+ - !ruby/object:Gem::Version
166
+ version: 0.1.8
167
+ description: google-cloud-bigtable is the official library for Cloud Bigtable API.
168
+ email: googleapis-packages@google.com
169
+ executables: []
170
+ extensions: []
171
+ extra_rdoc_files: []
172
+ files:
173
+ - ".yardopts"
174
+ - LICENSE
175
+ - README.md
176
+ - lib/google-cloud-bigtable.rb
177
+ - lib/google/bigtable/admin/v2/bigtable_instance_admin_pb.rb
178
+ - lib/google/bigtable/admin/v2/bigtable_instance_admin_services_pb.rb
179
+ - lib/google/bigtable/admin/v2/bigtable_table_admin_pb.rb
180
+ - lib/google/bigtable/admin/v2/bigtable_table_admin_services_pb.rb
181
+ - lib/google/bigtable/admin/v2/common_pb.rb
182
+ - lib/google/bigtable/admin/v2/instance_pb.rb
183
+ - lib/google/bigtable/admin/v2/table_pb.rb
184
+ - lib/google/bigtable/v2/bigtable_pb.rb
185
+ - lib/google/bigtable/v2/bigtable_services_pb.rb
186
+ - lib/google/bigtable/v2/data_pb.rb
187
+ - lib/google/cloud/bigtable.rb
188
+ - lib/google/cloud/bigtable/admin.rb
189
+ - lib/google/cloud/bigtable/admin/credentials.rb
190
+ - lib/google/cloud/bigtable/admin/v2.rb
191
+ - lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb
192
+ - lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client_config.json
193
+ - lib/google/cloud/bigtable/admin/v2/bigtable_table_admin_client.rb
194
+ - lib/google/cloud/bigtable/admin/v2/bigtable_table_admin_client_config.json
195
+ - lib/google/cloud/bigtable/admin/v2/credentials.rb
196
+ - lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/bigtable_instance_admin.rb
197
+ - lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/bigtable_table_admin.rb
198
+ - lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/instance.rb
199
+ - lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/table.rb
200
+ - lib/google/cloud/bigtable/admin/v2/doc/google/iam/v1/iam_policy.rb
201
+ - lib/google/cloud/bigtable/admin/v2/doc/google/iam/v1/policy.rb
202
+ - lib/google/cloud/bigtable/admin/v2/doc/google/longrunning/operations.rb
203
+ - lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/any.rb
204
+ - lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/duration.rb
205
+ - lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/empty.rb
206
+ - lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/field_mask.rb
207
+ - lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/timestamp.rb
208
+ - lib/google/cloud/bigtable/admin/v2/doc/google/rpc/status.rb
209
+ - lib/google/cloud/bigtable/app_profile.rb
210
+ - lib/google/cloud/bigtable/app_profile/job.rb
211
+ - lib/google/cloud/bigtable/app_profile/list.rb
212
+ - lib/google/cloud/bigtable/chunk_processor.rb
213
+ - lib/google/cloud/bigtable/cluster.rb
214
+ - lib/google/cloud/bigtable/cluster/job.rb
215
+ - lib/google/cloud/bigtable/cluster/list.rb
216
+ - lib/google/cloud/bigtable/column_family.rb
217
+ - lib/google/cloud/bigtable/column_range.rb
218
+ - lib/google/cloud/bigtable/convert.rb
219
+ - lib/google/cloud/bigtable/credentials.rb
220
+ - lib/google/cloud/bigtable/errors.rb
221
+ - lib/google/cloud/bigtable/gc_rule.rb
222
+ - lib/google/cloud/bigtable/instance.rb
223
+ - lib/google/cloud/bigtable/instance/cluster_map.rb
224
+ - lib/google/cloud/bigtable/instance/job.rb
225
+ - lib/google/cloud/bigtable/instance/list.rb
226
+ - lib/google/cloud/bigtable/longrunning_job.rb
227
+ - lib/google/cloud/bigtable/mutation_entry.rb
228
+ - lib/google/cloud/bigtable/mutation_operations.rb
229
+ - lib/google/cloud/bigtable/policy.rb
230
+ - lib/google/cloud/bigtable/project.rb
231
+ - lib/google/cloud/bigtable/read_modify_write_rule.rb
232
+ - lib/google/cloud/bigtable/read_operations.rb
233
+ - lib/google/cloud/bigtable/row.rb
234
+ - lib/google/cloud/bigtable/row_filter.rb
235
+ - lib/google/cloud/bigtable/row_filter/chain_filter.rb
236
+ - lib/google/cloud/bigtable/row_filter/condition_filter.rb
237
+ - lib/google/cloud/bigtable/row_filter/interleave_filter.rb
238
+ - lib/google/cloud/bigtable/row_filter/simple_filter.rb
239
+ - lib/google/cloud/bigtable/row_range.rb
240
+ - lib/google/cloud/bigtable/rows_mutator.rb
241
+ - lib/google/cloud/bigtable/rows_reader.rb
242
+ - lib/google/cloud/bigtable/sample_row_key.rb
243
+ - lib/google/cloud/bigtable/service.rb
244
+ - lib/google/cloud/bigtable/table.rb
245
+ - lib/google/cloud/bigtable/table/cluster_state.rb
246
+ - lib/google/cloud/bigtable/table/column_family_map.rb
247
+ - lib/google/cloud/bigtable/table/list.rb
248
+ - lib/google/cloud/bigtable/v2.rb
249
+ - lib/google/cloud/bigtable/v2/bigtable_client.rb
250
+ - lib/google/cloud/bigtable/v2/bigtable_client_config.json
251
+ - lib/google/cloud/bigtable/v2/credentials.rb
252
+ - lib/google/cloud/bigtable/v2/doc/google/bigtable/v2/bigtable.rb
253
+ - lib/google/cloud/bigtable/v2/doc/google/bigtable/v2/data.rb
254
+ - lib/google/cloud/bigtable/v2/doc/google/protobuf/any.rb
255
+ - lib/google/cloud/bigtable/v2/doc/google/protobuf/wrappers.rb
256
+ - lib/google/cloud/bigtable/v2/doc/google/rpc/status.rb
257
+ - lib/google/cloud/bigtable/value_range.rb
258
+ - lib/google/cloud/bigtable/version.rb
259
+ homepage: https://github.com/GoogleCloudPlatform/google-cloud-ruby/tree/master/google-cloud-bigtable
260
+ licenses:
261
+ - Apache-2.0
262
+ metadata: {}
263
+ post_install_message:
264
+ rdoc_options: []
265
+ require_paths:
266
+ - lib
267
+ required_ruby_version: !ruby/object:Gem::Requirement
268
+ requirements:
269
+ - - ">="
270
+ - !ruby/object:Gem::Version
271
+ version: 2.0.0
272
+ required_rubygems_version: !ruby/object:Gem::Requirement
273
+ requirements:
274
+ - - ">="
275
+ - !ruby/object:Gem::Version
276
+ version: '0'
277
+ requirements: []
278
+ rubyforge_project:
279
+ rubygems_version: 2.7.7
280
+ signing_key:
281
+ specification_version: 4
282
+ summary: API Client library for Cloud Bigtable API
283
+ test_files: []