Updated on 2023-09-05 GMT+08:00

Driver Package

DDS allows you to operate data using Go. You can connect to a DB instance through an SSL connection or an unencrypted connection. SSL connection is more secure.

SSL is disabled by default for a new DDS instance. To enable SSL, see Enabling SSL.

Downloading the Driver

To download the driver, go mod is recommended.

require go.mongodb.org/mongo-driver v1.12.1

Import the go files.

import (
"go.mongodb.org/mongo-driver/bson"   
"go.mongodb.org/mongo-driver/mongo"   
"go.mongodb.org/mongo-driver/mongo/options"   
"go.mongodb.org/mongo-driver/mongo/readpref"
)