Skip to content

Commit 8ed7326

Browse files
DOCSP-21848 ref tags (#98)
* swapping doc tags for ref tags
1 parent b737a3f commit 8ed7326

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+317
-286
lines changed

source/compatibility.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _golang-compatibility:
2+
13
Compatibility
24
-------------
35

source/faq.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _golang-faq:
2+
13
===
24
FAQ
35
===

source/fundamentals/auth.txt

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _golang-authentication-mechanisms:
2+
13
=========================
24
Authentication Mechanisms
35
=========================
@@ -19,18 +21,18 @@ authentication mechanisms to confirm an identity and establish trust to
1921
ensure security in the driver and server before connecting.
2022

2123
If you want to establish a connection to your MongoDB cluster without an
22-
authentication mechanism, see our :doc:`Connection Guide </fundamentals/connection>`.
24+
authentication mechanism, see :ref:`golang-connection-guide`.
2325

2426
Supported Mechanisms
2527
--------------------
2628

2729
The Go driver supports the following authentication mechanisms:
2830

29-
* :ref:`SCRAM-SHA-256 <go_sha_256>`
30-
* :ref:`SCRAM-SHA-1 <go_sha_1>`
31-
* :ref:`MONGODB-CR <go_mongodb_cr>`
32-
* :ref:`MongoDB-AWS <go_mongodb_aws>`
33-
* :ref:`X.509 <go_x509>`
31+
* :ref:`SCRAM-SHA-256 <golang_sha_256>`
32+
* :ref:`SCRAM-SHA-1 <golang-sha-1>`
33+
* :ref:`MONGODB-CR <golang-mongodb-cr>`
34+
* :ref:`MongoDB-AWS <golang-mongodb-aws>`
35+
* :ref:`X.509 <golang-x509>`
3436

3537
The Go Driver establishes a connection with an authentication mechanism
3638
through a `Client <{+api+}/mongo#Client>`__
@@ -58,7 +60,7 @@ Each authentication mechanism contains the following placeholders:
5860
authentication data. If you omit this option, the driver uses the
5961
default value ``admin``.
6062

61-
.. _default-auth-mechanism:
63+
.. _golang-default-auth-mechanism:
6264

6365
Default
6466
~~~~~~~
@@ -102,7 +104,7 @@ For more information on the challenge-response (CR) and salted
102104
challenge-response authentication mechanisms (SCRAM) that MongoDB supports,
103105
see the :manual:`SCRAM </core/security-scram/>` section of the server manual.
104106

105-
.. _go_sha_256:
107+
.. _golang_sha_256:
106108

107109
``SCRAM-SHA-256``
108110
~~~~~~~~~~~~~~~~~
@@ -133,8 +135,8 @@ To specify the ``SCRAM-SHA-256`` authentication mechanism, assign the
133135

134136
client, err := mongo.Connect(context.TODO(), clientOpts)
135137

136-
.. _scram-sha-1-auth-mechanism:
137-
.. _go_sha_1:
138+
.. _golang-scram-sha-1-auth-mechanism:
139+
.. _golang-sha-1:
138140

139141
``SCRAM-SHA-1``
140142
~~~~~~~~~~~~~~~
@@ -165,7 +167,7 @@ To specify the ``SCRAM-SHA-1`` authentication mechanism, assign the
165167

166168
client, err := mongo.Connect(context.TODO(), clientOpts)
167169

168-
.. _go_mongodb_cr:
170+
.. _golang-mongodb-cr:
169171

170172
``MONGODB-CR``
171173
~~~~~~~~~~~~~~
@@ -178,7 +180,7 @@ username and password to authenticate your user.
178180
This authentication mechanism was deprecated starting in MongoDB 3.6
179181
and is no longer supported as of MongoDB 4.0.
180182

181-
.. _go_mongodb_aws:
183+
.. _golang-mongodb-aws:
182184

183185
``MONGODB-AWS``
184186
~~~~~~~~~~~~~~~
@@ -239,7 +241,7 @@ option the value of your ``sessionToken``:
239241
assumeRoleClient, err := mongo.Connect(context.TODO(),
240242
options.Client().SetAuth(assumeRoleCredential))
241243

242-
.. _go_x509:
244+
.. _golang-x509:
243245

244246
``X.509``
245247
~~~~~~~~~
@@ -277,5 +279,5 @@ following:
277279

278280
..
279281
For more information on configuring your application to use
280-
certificates as well as TLS/SSL options, see our
281-
:doc:`TLS/SSL guide </fundamentals/connection/tls>`.
282+
certificates as well as TLS/SSL options, see
283+
:ref:`golang-tls-ssl-guide`.

source/fundamentals/bson.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. _bson-golang:
1+
.. _golang-bson:
22

33
==============
44
Work with BSON
@@ -23,13 +23,13 @@ You should read this guide if you want to learn more about how the Go Driver
2323
represents BSON data or need to adjust default marshalling
2424
and unmarshalling behaviors.
2525

26-
.. _bson-types:
26+
.. _golang-bson-types:
2727

2828
Data Types
2929
----------
3030

3131
MongoDB stores documents in a binary representation called :manual:`BSON
32-
</reference/bson-types/>` that allows for easy and flexible data processing.
32+
</reference/golang-bson-types/>` that allows for easy and flexible data processing.
3333

3434
The Go Driver provides four main types for working with BSON data:
3535

@@ -210,7 +210,7 @@ Driver will marshal structs using the following rules:
210210
- Includes an empty ``lastname`` field
211211
- Stores the ``Address`` field as a nested value
212212

213-
.. _bson-unmarshalling:
213+
.. _golang-bson-unmarshalling:
214214

215215
Unmarshalling
216216
-------------

source/fundamentals/connection.txt

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _golang-connection-guide:
2+
13
================
24
Connection Guide
35
================
@@ -10,8 +12,6 @@ Connection Guide
1012
:depth: 2
1113
:class: singlecol
1214

13-
.. _golang_connection_guide:
14-
1515
This guide shows you how to connect to a MongoDB instance or replica set
1616
deployment using the Go Driver.
1717

@@ -37,9 +37,7 @@ servers in rotation without reconfiguring clients.
3737

3838
.. note::
3939

40-
If your deployment is on MongoDB Atlas, see the
41-
:ref:`Quick Start guide <connect-to-your-cluster>` to learn how to
42-
retrieve your connection string.
40+
To learn how to retrieve your connection string in Atlas, see the :ref:`Quick Start guide <golang-connect-to-your-cluster>`.
4341

4442
The next part of the connection string contains your username and, if
4543
you are using password-based authentication, your password. Replace the value of
@@ -55,7 +53,7 @@ your MongoDB instance.
5553
The last part of the connection string specifies connection and authentication
5654
options. In the example, we set two connection options:
5755
``maxPoolSize=20`` and ``w=majority``. For more information on connection
58-
options, read the :ref:`connection-options` section of this guide.
56+
options, read the :ref:`golang-connection-options` section of this guide.
5957

6058
The following code shows how you can use the sample connection URI in a
6159
client to connect to MongoDB.
@@ -126,7 +124,7 @@ connections:
126124
- Require you to :manual:`specify a secondary read preference </core/read-preference/#mongodb-readmode-secondary>`
127125
when the specified host isn't the **primary**.
128126

129-
.. _connection-options:
127+
.. _golang-connection-options:
130128

131129
------------------
132130
Connection Options

source/fundamentals/connection/tls.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _golang-tls-ssl-guide:
2+
13
==============================
24
Enable TLS/SSL on a Connection
35
==============================

source/fundamentals/context.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _golang-context:
2+
13
=======
24
Context
35
=======
@@ -56,7 +58,7 @@ timeout error if the Context expired or the selection process took
5658
longer than the ``serverSelectionTimeoutMS`` setting.
5759

5860
For more information on how the driver selects a server, see the
59-
:ref:`<replica-set-read-preference-behavior>`.
61+
:ref:`replica-set-read-preference-behavior`.
6062

6163
Connection Checkout
6264
~~~~~~~~~~~~~~~~~~~

source/fundamentals/crud.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _golang-crud:
2+
13
===============
24
CRUD Operations
35
===============
@@ -14,11 +16,10 @@ CRUD Operations
1416
CRUD (Create, Read, Update, Delete) operations enable you to work with
1517
data stored in MongoDB.
1618

17-
- :doc:`Read Operations </fundamentals/crud/read-operations>` find and return
19+
- :ref:`golang-crud-read-operations` find and return
1820
documents stored in your database.
19-
- :doc:`Write Operations </fundamentals/crud/write-operations>` insert, modify,
21+
- :ref:`golang-crud-write-operations` insert, modify,
2022
or delete documents in your database.
2123

2224
Some operations combine aspects of read and write operations. To learn
23-
more about these hybrid methods, see our guide on :doc:`compound
24-
operations </fundamentals/crud/compound-operations>`.
25+
more about these hybrid methods, see :ref:`golang-compound-operations`.

source/fundamentals/crud/compound-operations.txt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. _compound-operations-golang:
1+
.. _golang-compound-operations:
22

33
===================
44
Compound Operations
@@ -25,9 +25,9 @@ document you are modifying for the duration of your compound operation.
2525

2626
MongoDB supports the following compound operations:
2727

28-
- :ref:`Find and delete one document <go-find-and-delete>`
29-
- :ref:`Find and update one document <go-find-and-update>`
30-
- :ref:`Find and replace one document <go-find-and-replace>`
28+
- :ref:`Find and delete one document <golang-find-and-delete>`
29+
- :ref:`Find and update one document <golang-find-and-update>`
30+
- :ref:`Find and replace one document <golang-find-and-replace>`
3131

3232
.. tip::
3333

@@ -48,7 +48,7 @@ collection of the ``tea`` database:
4848

4949
.. include:: /includes/fundamentals/tea-sample-data-ending.rst
5050

51-
.. _go-find-and-delete:
51+
.. _golang-find-and-delete:
5252

5353
Find and Delete
5454
---------------
@@ -121,7 +121,7 @@ After running this example, the output resembles the following:
121121

122122
[{_id ObjectID("...")} {type Assam} {rating 5}]
123123

124-
.. _go-find-and-update:
124+
.. _golang-find-and-update:
125125

126126
Find and Update
127127
---------------
@@ -215,7 +215,7 @@ After running this example, the output resembles the following:
215215

216216
[{_id ObjectID("...")} {type Oolong} {rating 9}]
217217

218-
.. _go-find-and-replace:
218+
.. _golang-find-and-replace:
219219

220220
Find and Replace
221221
----------------
@@ -310,11 +310,11 @@ Additional Information
310310
For more information on performing the operations mentioned, see the
311311
following guides:
312312

313-
- :ref:`query_document_golang`
314-
- :doc:`Retrieve Data </fundamentals/crud/read-operations/retrieve>`
315-
- :doc:`Delete a Document </fundamentals/crud/write-operations/delete>`
316-
- :doc:`Update or Replace a Document </fundamentals/crud/write-operations/change-a-document>`
317-
- :ref:`Access Data in a SingleResult <bson-unmarshalling>`
313+
- :ref:`golang-query-document`
314+
- :ref:`golang-retrieve`
315+
- :ref:`golang-delete-guide`
316+
- :ref:`golang-change-document`
317+
- :ref:`Access Data in a SingleResult <golang-bson-unmarshalling>`
318318

319319
API Documentation
320320
~~~~~~~~~~~~~~~~~

source/fundamentals/crud/read-operations.txt

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
1+
.. _golang-crud-read-operations:
2+
13
===============
24
Read Operations
35
===============
46

57
.. default-domain:: mongodb
68

7-
- :doc:`/fundamentals/crud/read-operations/query-document`
8-
- :doc:`/fundamentals/crud/read-operations/count`
9-
- :doc:`/fundamentals/crud/read-operations/retrieve`
10-
- :doc:`/fundamentals/crud/read-operations/cursor`
11-
- :doc:`/fundamentals/crud/read-operations/distinct`
12-
- :doc:`/fundamentals/crud/read-operations/sort`
13-
- :doc:`/fundamentals/crud/read-operations/skip`
14-
- :doc:`/fundamentals/crud/read-operations/limit`
15-
- :doc:`/fundamentals/crud/read-operations/project`
16-
- :doc:`/fundamentals/crud/read-operations/text`
9+
- :ref:`golang-query-document`
10+
- :ref:`golang-count-documents`
11+
- :ref:`golang-retrieve`
12+
- :ref:`golang-cursor`
13+
- :ref:`golang-retrieve-distinct`
14+
- :ref:`golang-sort-results`
15+
- :ref:`golang-skip`
16+
- :ref:`golang-limit`
17+
- :ref:`golang-project`
18+
- :ref:`golang-search-text`
1719

1820
..
1921
- :doc:`/fundamentals/crud/read-operations/geo`

0 commit comments

Comments
 (0)