Skip to content

Commit 0b73ea3

Browse files
authored
Merge pull request #552 from rachel-mack/comp-cov-rebase
Rebase for monorepo migration
2 parents e359407 + b9108f3 commit 0b73ea3

34 files changed

+134
-188
lines changed

source/archive-reference-files/fundamentals/auth.txt

Lines changed: 12 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ The Go driver supports the following authentication mechanisms:
3333

3434
* :ref:`SCRAM-SHA-256 <golang_sha_256>`
3535
* :ref:`SCRAM-SHA-1 <golang-sha-1>`
36-
* :ref:`MONGODB-CR <golang-mongodb-cr>`
3736
* :ref:`MongoDB-AWS <golang-mongodb-aws>`
3837
* :ref:`X.509 <golang-x509>`
3938

@@ -63,33 +62,17 @@ Each authentication mechanism contains the following placeholders:
6362
authentication data. If you omit this option, the driver uses the
6463
default value ``admin``.
6564

65+
.. _golang_sha_256:
6666
.. _golang-default-auth-mechanism:
6767

68-
Default
69-
~~~~~~~
70-
71-
The default mechanism uses one of the following authentication
72-
mechanisms depending on what MongoDB versions your server supports:
73-
74-
.. list-table::
75-
:header-rows: 1
76-
:stub-columns: 1
77-
:class: compatibility-large
78-
79-
* - Mechanism
80-
- Versions
81-
82-
* - ``SCRAM-SHA-256``
83-
- MongoDB 4.0 and later
84-
85-
* - ``SCRAM-SHA-1``
86-
- MongoDB 3.0, 3.2, 3.4, and 3.6
68+
``SCRAM-SHA-256``
69+
~~~~~~~~~~~~~~~~~
8770

88-
* - ``MONGODB-CR``
89-
- MongoDB 2.6 and earlier
71+
``SCRAM-SHA-256`` is a salted challenge-response authentication mechanism
72+
(SCRAM) that uses your database username and password, encrypted with the ``SHA-256``
73+
algorithm, to authenticate your user. This is the default authentication mechanism.
9074

91-
To specify the default authentication mechanism, omit the
92-
``AuthMechanism`` option:
75+
To specify this default authentication mechanism, omit the ``AuthMechanism`` option:
9376

9477
.. code-block:: go
9578

@@ -103,26 +86,8 @@ To specify the default authentication mechanism, omit the
10386

10487
client, err := mongo.Connect(clientOpts)
10588

106-
To learn more about the challenge-response (CR) and salted
107-
challenge-response authentication mechanisms (SCRAM) that MongoDB supports,
108-
see the :manual:`SCRAM </core/security-scram/>` section of the server manual.
109-
110-
.. _golang_sha_256:
111-
112-
``SCRAM-SHA-256``
113-
~~~~~~~~~~~~~~~~~
114-
115-
.. important::
116-
117-
``SCRAM-SHA-256`` is the default authentication method for MongoDB starting
118-
in MongoDB 4.0.
119-
120-
``SCRAM-SHA-256`` is a salted challenge-response authentication mechanism
121-
(SCRAM) that uses your database username and password, encrypted with the ``SHA-256``
122-
algorithm, to authenticate your user.
123-
124-
To specify the ``SCRAM-SHA-256`` authentication mechanism, assign the
125-
``AuthMechanism`` option the value ``"SCRAM-SHA-256"``:
89+
You can also explicitly specify the ``SCRAM-SHA-256`` authentication mechanism
90+
by assigning the ``AuthMechanism`` option the value ``"SCRAM-SHA-256"``:
12691

12792
.. code-block:: go
12893
:emphasize-lines: 2
@@ -138,17 +103,15 @@ To specify the ``SCRAM-SHA-256`` authentication mechanism, assign the
138103

139104
client, err := mongo.Connect(clientOpts)
140105

106+
To learn more about the challenge-response authentication mechanisms (SCRAM) that MongoDB supports,
107+
see the :manual:`SCRAM </core/security-scram/>` section of the Server manual.
108+
141109
.. _golang-scram-sha-1-auth-mechanism:
142110
.. _golang-sha-1:
143111

144112
``SCRAM-SHA-1``
145113
~~~~~~~~~~~~~~~
146114

147-
.. important::
148-
149-
``SCRAM-SHA-1`` is the default authentication method for MongoDB versions
150-
3.0, 3.2, 3.4, and 3.6.
151-
152115
``SCRAM-SHA-1`` is a salted challenge-response mechanism (SCRAM) that uses your
153116
username and password, encrypted using the ``SHA-1`` algorithm, to authenticate
154117
your user.
@@ -170,29 +133,11 @@ To specify the ``SCRAM-SHA-1`` authentication mechanism, assign the
170133

171134
client, err := mongo.Connect(clientOpts)
172135

173-
.. _golang-mongodb-cr:
174-
175-
``MONGODB-CR``
176-
~~~~~~~~~~~~~~
177-
178-
``MONGODB-CR`` is a challenge-response authentication mechanism that uses your
179-
username and password to authenticate your user.
180-
181-
.. important::
182-
183-
This authentication mechanism was deprecated starting in MongoDB 3.6
184-
and is no longer supported as of MongoDB 4.0.
185-
186136
.. _golang-mongodb-aws:
187137

188138
``MONGODB-AWS``
189139
~~~~~~~~~~~~~~~
190140

191-
.. important::
192-
193-
The MONGODB-AWS authentication mechanism is available only in MongoDB
194-
versions 4.4 and later.
195-
196141
The ``MONGODB-AWS`` authentication mechanism uses your Amazon Web Services
197142
Identity and Access Management (AWS IAM) credentials to authenticate your
198143
user.

source/archive-reference-files/fundamentals/crud/read-operations/skip.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ Skip Returned Results
55
.. meta::
66
:description: Learn how to skip a specified number of results in MongoDB read operations using the setSkip() method or the $skip stage in aggregation pipelines.
77

8-
.. default-domain:: mongodb
9-
108
.. contents:: On this page
119
:local:
1210
:backlinks: none

source/archive-reference-files/fundamentals/crud/read-operations/sort.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ Sort Results
55
.. meta::
66
:description: Learn how to sort query results, handle ties, and apply sorting in aggregation pipelines with the MongoDB Go Driver.
77

8-
.. default-domain:: mongodb
9-
108
.. contents:: On this page
119
:local:
1210
:backlinks: none

source/archive-reference-files/usage-examples/command.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ Run a Command Example
66
.. meta::
77
:description: Learn how to execute commands on a MongoDB server using the runCommand() method in Go, with an example retrieving database statistics.
88

9-
.. default-domain:: mongodb
10-
119
You can run commands directly on your MongoDB server by using the
1210
``RunCommand()`` method.
1311

source/archive-reference-files/usage-examples/deleteMany.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ Delete Multiple Documents
55
=========================
66

77
.. meta::
8-
:description: Learn how to delete multiple documents from a collection using the deleteMany() method in the MongoDB Go Driver.
9-
10-
.. default-domain:: mongodb
8+
:description: Learn how to delete multiple documents from a collection using the DeleteMany() method in the MongoDB Go Driver.
119

1210
You can delete multiple documents in a collection by using the
1311
``DeleteMany()`` method.

source/archive-reference-files/usage-examples/deleteOne.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Delete a Document
55
=================
66

77
.. meta::
8-
:description: Learn how to delete a document from a collection using the deleteOne() method in the MongoDB Go Driver.
8+
:description: Learn how to delete a document from a collection using the DeleteOne() method in the MongoDB Go Driver.
99

1010
You can delete a document in a collection by using the ``DeleteOne()``
1111
method.

source/archive-reference-files/usage-examples/findOne.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ Find a Document
44
===============
55

66
.. meta::
7-
:description: Retrieve a single document from a collection using the findOne() method in the MongoDB Go Driver.
8-
9-
.. default-domain:: mongodb
7+
:description: Retrieve a single document from a collection using the FindOne() method in the MongoDB Go Driver.
108

119
You can retrieve a single document from a collection by using the
1210
``FindOne()`` method.

source/archive-reference-files/usage-examples/insertMany.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ Insert Multiple Documents
55
=========================
66

77
.. meta::
8-
:description: Learn how to insert multiple documents into a collection using the insertMany() method in the MongoDB Go Driver.
9-
10-
.. default-domain:: mongodb
8+
:description: Learn how to insert multiple documents into a collection using the InsertMany() method in the MongoDB Go Driver.
119

1210
You can insert multiple documents into a collection by using the ``InsertMany()``
1311
method.

source/archive-reference-files/usage-examples/insertOne.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ Insert a Document Example
55
=========================
66

77
.. meta::
8-
:description: Learn how to insert a document into a collection using the insertOne() method in the MongoDB Go Driver.
9-
10-
.. default-domain:: mongodb
8+
:description: Learn how to insert a document into a collection using the InsertOne() method in the MongoDB Go Driver.
119

1210
You can insert a document into a collection by using the ``InsertOne()``
1311
method.

source/archive-reference-files/usage-examples/replaceOne.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ Replace a Document
55
==================
66

77
.. meta::
8-
:description: Learn how to replace a document in a MongoDB collection using the replaceOne() method with the MongoDB Go Driver.
9-
10-
.. default-domain:: mongodb
8+
:description: Learn how to replace a document in a MongoDB collection using the ReplaceOne() method with the MongoDB Go Driver.
119

1210
You can replace a document in a collection by using the ``ReplaceOne()``
1311
method.

0 commit comments

Comments
 (0)