Skip to content

Commit c9089a9

Browse files
authored
DOCSP-25570 QE with GCP tutorial (#1955) (#1970)
* DOCSP-25570 QE with GCP tutorial * fixes tab title * spacing fix * mongosh, not node
1 parent 3ed247c commit c9089a9

File tree

6 files changed

+141
-0
lines changed

6 files changed

+141
-0
lines changed

source/core/queryable-encryption/tutorials/gcp/gcp-automatic.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ Before You Get Started
3636

3737
.. tabs::
3838

39+
.. tab:: Mongosh
40+
:tabid: shell
41+
42+
`Complete Mongosh Application <{+sample-app-url-qe+}/mongosh/gcp/reader/>`__
43+
3944
.. tab:: Node.js
4045
:tabid: nodejs
4146

@@ -100,6 +105,12 @@ your application to see relevant code samples.
100105

101106
.. tabs-drivers::
102107

108+
.. tab::
109+
:tabid: shell
110+
111+
To view the complete code for making a {+dek-long+}, see
112+
`the {+qe+} sample application repository <{+sample-app-url-qe+}/mongosh/gcp/reader/make_data_key.js>`__.
113+
103114
.. tab::
104115
:tabid: nodejs
105116

@@ -143,6 +154,12 @@ your application to see relevant code samples.
143154

144155
.. tabs-drivers::
145156

157+
.. tab::
158+
:tabid: shell
159+
160+
To view the complete code for inserting an encrypted document, see
161+
`the {+qe+} sample application repository <{+sample-app-url-qe+}/mongosh/gcp/reader/insert_encrypted_document.js>`__.
162+
146163
.. tab::
147164
:tabid: nodejs
148165

@@ -182,6 +199,12 @@ your application to see relevant code samples.
182199

183200
.. tabs-drivers::
184201

202+
.. tab::
203+
:tabid: shell
204+
205+
To view the complete code for finding an encrypted document, see
206+
`the {+qe+} sample application repository <{+sample-app-url-qe+}/mongosh/gcp/reader/insert_encrypted_document.js>`__.
207+
185208
.. tab::
186209
:tabid: nodejs
187210

source/includes/queryable-encryption/tutorials/automatic/gcp/client.rst

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@
88

99
.. tabs-drivers::
1010

11+
.. tab::
12+
:tabid: shell
13+
14+
.. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/mongosh/gcp/reader/insert_encrypted_document.js
15+
:start-after: start-key-vault
16+
:end-before: end-key-vault
17+
:language: javascript
18+
:dedent:
19+
:caption: insert_encrypted_document.js
20+
1121
.. tab::
1222
:tabid: nodejs
1323

@@ -64,6 +74,16 @@
6474

6575
.. tabs-drivers::
6676

77+
.. tab::
78+
:tabid: shell
79+
80+
.. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/mongosh/gcp/reader/insert_encrypted_document.js
81+
:start-after: start-kmsproviders
82+
:end-before: end-kmsproviders
83+
:language: javascript
84+
:dedent:
85+
:caption: insert_encrypted_document.js
86+
6787
.. tab::
6888
:tabid: nodejs
6989

@@ -118,6 +138,16 @@
118138

119139
.. tabs-drivers::
120140

141+
.. tab::
142+
:tabid: shell
143+
144+
.. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/mongosh/gcp/reader/insert_encrypted_document.js
145+
:start-after: start-schema
146+
:end-before: end-schema
147+
:language: javascript
148+
:dedent:
149+
:caption: insert_encrypted_document.js
150+
121151
.. tab::
122152
:tabid: nodejs
123153

@@ -172,6 +202,14 @@
172202

173203
.. tabs-drivers::
174204

205+
.. tab::
206+
:tabid: shell
207+
208+
.. code-block:: none
209+
210+
// mongosh does not require you to specify the
211+
// location of the {+shared-library+}
212+
175213
.. tab::
176214
:tabid: nodejs
177215

@@ -231,6 +269,16 @@
231269

232270
.. tabs-drivers::
233271

272+
.. tab::
273+
:tabid: shell
274+
275+
.. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/mongosh/gcp/reader/insert_encrypted_document.js
276+
:start-after: start-client
277+
:end-before: end-client
278+
:language: javascript
279+
:dedent:
280+
:caption: insert_encrypted_document.js
281+
234282
.. tab::
235283
:tabid: nodejs
236284

source/includes/queryable-encryption/tutorials/automatic/gcp/dek.rst

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@
1212

1313
.. tabs-drivers::
1414

15+
.. tab::
16+
:tabid: shell
17+
18+
.. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/mongosh/gcp/reader/make_data_key.js
19+
:start-after: start-kmsproviders
20+
:end-before: end-kmsproviders
21+
:language: javascript
22+
:dedent:
23+
:caption: make_data_key.js
24+
1525
.. tab::
1626
:tabid: nodejs
1727

@@ -79,6 +89,16 @@
7989

8090
.. tabs-drivers::
8191

92+
.. tab::
93+
:tabid: shell
94+
95+
.. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/mongosh/gcp/reader/make_data_key.js
96+
:start-after: start-datakeyopts
97+
:end-before: end-datakeyopts
98+
:language: javascript
99+
:dedent:
100+
:caption: make_data_key.js
101+
82102
.. tab::
83103
:tabid: nodejs
84104

@@ -147,6 +167,16 @@
147167

148168
.. tabs-drivers::
149169

170+
.. tab::
171+
:tabid: shell
172+
173+
.. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/mongosh/gcp/reader/make_data_key.js
174+
:start-after: start-create-dek
175+
:end-before: end-create-dek
176+
:language: javascript
177+
:dedent:
178+
:caption: make_data_key.js
179+
150180
.. tab::
151181
:tabid: nodejs
152182

@@ -204,6 +234,16 @@
204234

205235
.. tabs-drivers::
206236

237+
.. tab::
238+
:tabid: shell
239+
240+
.. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/mongosh/gcp/reader/make_data_key.js
241+
:start-after: start-create-enc-collection
242+
:end-before: end-create-enc-collection
243+
:language: javascript
244+
:dedent:
245+
:caption: make_data_key.js
246+
207247
.. tab::
208248
:tabid: nodejs
209249

source/includes/queryable-encryption/tutorials/automatic/gcp/find.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ a client that is not configured for automatic {+qe+}.
88

99
.. tabs-drivers::
1010

11+
.. tab::
12+
:tabid: shell
13+
14+
.. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/mongosh/gcp/reader/insert_encrypted_document.js
15+
:start-after: start-find
16+
:end-before: end-find
17+
:caption: insert_encrypted_document.js
18+
:language: javascript
19+
:dedent:
20+
1121
.. tab::
1222
:tabid: nodejs
1323

source/includes/queryable-encryption/tutorials/automatic/gcp/insert.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ snippet:
77

88
.. tabs-drivers::
99

10+
.. tab::
11+
:tabid: shell
12+
13+
.. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/mongosh/gcp/reader/insert_encrypted_document.js
14+
:start-after: start-insert
15+
:end-before: end-insert
16+
:language: javascript
17+
:dedent:
18+
:caption: insert_encrypted_document.js
19+
1020
.. tab::
1121
:tabid: nodejs
1222

source/includes/queryable-encryption/tutorials/automatic/gcp/key-vault-index.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ Create a unique index on the ``keyAltNames`` field in your
55

66
.. tabs-drivers::
77

8+
.. tab::
9+
:tabid: shell
10+
11+
.. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/mongosh/gcp/reader/make_data_key.js
12+
:start-after: start-create-index
13+
:end-before: end-create-index
14+
:caption: make_data_key.js
15+
:language: javascript
16+
:dedent:
17+
818
.. tab::
919
:tabid: nodejs
1020

0 commit comments

Comments
 (0)