google-cloud-firestore-v1 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +8 -8
- data/README.md +1 -1
- data/lib/google/cloud/firestore/v1/firestore/client.rb +15 -57
- data/lib/google/cloud/firestore/v1/version.rb +1 -1
- data/lib/google/firestore/v1/firestore_services_pb.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +7 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8138ed482f70c35a4ea0a50a6ad1268d647d8253814d7715dfd10118247a56d8
|
4
|
+
data.tar.gz: 98afa47d663cebba3b8163220c40eb982a2c69b8ae797d2bbc541f25699d044f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04c8ee4aa436e41b3ef6e924e4f94d632f2b5a0fdc9a5981586e72c6cd0a863b9b5fd5d8df7b811110d8e568ad06086b9fa77ce3dae5aea488fa71beb6955e3c
|
7
|
+
data.tar.gz: 6e0677e76755f583a9ef3853b5ca338dd042e0fcde45aaedf2fef84e6082e96a01bbd97f9bc515b8376d28f5700624381a91fc76f522ee74acd7bebf089a2387
|
data/AUTHENTICATION.md
CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-firestore-v1
|
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
67
67
|
{::Google::Cloud::Firestore::V1::Firestore::Credentials}):
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
69
|
+
* `FIRESTORE_CREDENTIALS` - Path to JSON file, or JSON contents
|
70
|
+
* `FIRESTORE_KEYFILE` - Path to JSON file, or JSON contents
|
71
|
+
* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
|
72
|
+
* `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
|
73
|
+
* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
|
74
74
|
|
75
75
|
```ruby
|
76
76
|
require "google/cloud/firestore/v1"
|
@@ -82,8 +82,8 @@ client = ::Google::Cloud::Firestore::V1::Firestore::Client.new
|
|
82
82
|
|
83
83
|
### Configuration
|
84
84
|
|
85
|
-
The **Credentials JSON** can be configured instead of
|
86
|
-
environment
|
85
|
+
The path to the **Credentials JSON** file can be configured instead of storing
|
86
|
+
it in an environment variable. Either on an individual client initialization:
|
87
87
|
|
88
88
|
```ruby
|
89
89
|
require "google/cloud/firestore/v1"
|
@@ -93,7 +93,7 @@ client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config|
|
|
93
93
|
end
|
94
94
|
```
|
95
95
|
|
96
|
-
Or
|
96
|
+
Or globally for all clients:
|
97
97
|
|
98
98
|
```ruby
|
99
99
|
require "google/cloud/firestore/v1"
|
data/README.md
CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
|
|
33
33
|
require "google/cloud/firestore/v1"
|
34
34
|
|
35
35
|
client = ::Google::Cloud::Firestore::V1::Firestore::Client.new
|
36
|
-
request =
|
36
|
+
request = ::Google::Cloud::Firestore::V1::GetDocumentRequest.new # (request fields as keyword arguments...)
|
37
37
|
response = client.get_document request
|
38
38
|
```
|
39
39
|
|
@@ -72,116 +72,74 @@ module Google
|
|
72
72
|
|
73
73
|
default_config.rpcs.get_document.timeout = 60.0
|
74
74
|
default_config.rpcs.get_document.retry_policy = {
|
75
|
-
initial_delay: 0.1,
|
76
|
-
max_delay: 60.0,
|
77
|
-
multiplier: 1.3,
|
78
|
-
retry_codes: [8, 14, 13, 4]
|
75
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4]
|
79
76
|
}
|
80
77
|
|
81
78
|
default_config.rpcs.list_documents.timeout = 60.0
|
82
79
|
default_config.rpcs.list_documents.retry_policy = {
|
83
|
-
initial_delay: 0.1,
|
84
|
-
max_delay: 60.0,
|
85
|
-
multiplier: 1.3,
|
86
|
-
retry_codes: [8, 14, 13, 4]
|
80
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4]
|
87
81
|
}
|
88
82
|
|
89
83
|
default_config.rpcs.update_document.timeout = 60.0
|
90
84
|
default_config.rpcs.update_document.retry_policy = {
|
91
|
-
initial_delay: 0.1,
|
92
|
-
max_delay: 60.0,
|
93
|
-
multiplier: 1.3,
|
94
|
-
retry_codes: [8, 14]
|
85
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14]
|
95
86
|
}
|
96
87
|
|
97
88
|
default_config.rpcs.delete_document.timeout = 60.0
|
98
89
|
default_config.rpcs.delete_document.retry_policy = {
|
99
|
-
initial_delay: 0.1,
|
100
|
-
max_delay: 60.0,
|
101
|
-
multiplier: 1.3,
|
102
|
-
retry_codes: [8, 14, 13, 4]
|
90
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4]
|
103
91
|
}
|
104
92
|
|
105
93
|
default_config.rpcs.batch_get_documents.timeout = 300.0
|
106
94
|
default_config.rpcs.batch_get_documents.retry_policy = {
|
107
|
-
initial_delay: 0.1,
|
108
|
-
max_delay: 60.0,
|
109
|
-
multiplier: 1.3,
|
110
|
-
retry_codes: [8, 14, 13, 4]
|
95
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4]
|
111
96
|
}
|
112
97
|
|
113
98
|
default_config.rpcs.begin_transaction.timeout = 60.0
|
114
99
|
default_config.rpcs.begin_transaction.retry_policy = {
|
115
|
-
initial_delay: 0.1,
|
116
|
-
max_delay: 60.0,
|
117
|
-
multiplier: 1.3,
|
118
|
-
retry_codes: [8, 14, 13, 4]
|
100
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4]
|
119
101
|
}
|
120
102
|
|
121
103
|
default_config.rpcs.commit.timeout = 60.0
|
122
104
|
default_config.rpcs.commit.retry_policy = {
|
123
|
-
initial_delay: 0.1,
|
124
|
-
max_delay: 60.0,
|
125
|
-
multiplier: 1.3,
|
126
|
-
retry_codes: [8, 14]
|
105
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14]
|
127
106
|
}
|
128
107
|
|
129
108
|
default_config.rpcs.rollback.timeout = 60.0
|
130
109
|
default_config.rpcs.rollback.retry_policy = {
|
131
|
-
initial_delay: 0.1,
|
132
|
-
max_delay: 60.0,
|
133
|
-
multiplier: 1.3,
|
134
|
-
retry_codes: [8, 14, 13, 4]
|
110
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4]
|
135
111
|
}
|
136
112
|
|
137
113
|
default_config.rpcs.run_query.timeout = 300.0
|
138
114
|
default_config.rpcs.run_query.retry_policy = {
|
139
|
-
initial_delay: 0.1,
|
140
|
-
max_delay: 60.0,
|
141
|
-
multiplier: 1.3,
|
142
|
-
retry_codes: [8, 14, 13, 4]
|
115
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4]
|
143
116
|
}
|
144
117
|
|
145
118
|
default_config.rpcs.partition_query.timeout = 300.0
|
146
119
|
default_config.rpcs.partition_query.retry_policy = {
|
147
|
-
initial_delay: 0.1,
|
148
|
-
max_delay: 60.0,
|
149
|
-
multiplier: 1.3,
|
150
|
-
retry_codes: [8, 14, 13, 4]
|
120
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4]
|
151
121
|
}
|
152
122
|
|
153
123
|
default_config.rpcs.write.timeout = 86_400.0
|
154
124
|
|
155
125
|
default_config.rpcs.listen.timeout = 86_400.0
|
156
126
|
default_config.rpcs.listen.retry_policy = {
|
157
|
-
initial_delay: 0.1,
|
158
|
-
max_delay: 60.0,
|
159
|
-
multiplier: 1.3,
|
160
|
-
retry_codes: [8, 14, 13, 4]
|
127
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4]
|
161
128
|
}
|
162
129
|
|
163
130
|
default_config.rpcs.list_collection_ids.timeout = 60.0
|
164
131
|
default_config.rpcs.list_collection_ids.retry_policy = {
|
165
|
-
initial_delay: 0.1,
|
166
|
-
max_delay: 60.0,
|
167
|
-
multiplier: 1.3,
|
168
|
-
retry_codes: [8, 14, 13, 4]
|
132
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4]
|
169
133
|
}
|
170
134
|
|
171
135
|
default_config.rpcs.batch_write.timeout = 60.0
|
172
136
|
default_config.rpcs.batch_write.retry_policy = {
|
173
|
-
initial_delay: 0.1,
|
174
|
-
max_delay: 60.0,
|
175
|
-
multiplier: 1.3,
|
176
|
-
retry_codes: [8, 14, 10]
|
137
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 10]
|
177
138
|
}
|
178
139
|
|
179
140
|
default_config.rpcs.create_document.timeout = 60.0
|
180
141
|
default_config.rpcs.create_document.retry_policy = {
|
181
|
-
initial_delay: 0.1,
|
182
|
-
max_delay: 60.0,
|
183
|
-
multiplier: 1.3,
|
184
|
-
retry_codes: [8, 14]
|
142
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14]
|
185
143
|
}
|
186
144
|
|
187
145
|
default_config
|
@@ -252,7 +210,7 @@ module Google
|
|
252
210
|
!@config.endpoint.split(".").first.include?("-")
|
253
211
|
credentials ||= Credentials.default scope: @config.scope,
|
254
212
|
enable_self_signed_jwt: enable_self_signed_jwt
|
255
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
213
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
256
214
|
credentials = Credentials.new credentials, scope: @config.scope
|
257
215
|
end
|
258
216
|
@quota_project_id = @config.quota_project
|
@@ -57,9 +57,15 @@ module Google
|
|
57
57
|
|
58
58
|
# Denotes that a (repeated) field is an unordered list.
|
59
59
|
# This indicates that the service may provide the elements of the list
|
60
|
-
# in any arbitrary
|
60
|
+
# in any arbitrary order, rather than the order the user originally
|
61
61
|
# provided. Additionally, the list's order may or may not be stable.
|
62
62
|
UNORDERED_LIST = 6
|
63
|
+
|
64
|
+
# Denotes that this field returns a non-empty default value if not set.
|
65
|
+
# This indicates that if the user provides the empty value in a request,
|
66
|
+
# a non-empty value will be returned. The user will not be aware of what
|
67
|
+
# non-empty value to expect.
|
68
|
+
NON_EMPTY_DEFAULT = 7
|
63
69
|
end
|
64
70
|
end
|
65
71
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-firestore-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|