# Functions
Aggregate creates a new AggregateOptions instance.
AutoEncryption creates a new AutoEncryptionOptions configured with default values.
BuildTLSConfig specifies tls.Config options for each KMS provider to use to configure TLS on all connections created to the KMS provider.
BulkWrite creates a new *BulkWriteOptions instance.
ChangeStream creates a new ChangeStreamOptions instance.
Client creates a new ClientOptions instance.
ClientBulkWrite creates a new *ClientBulkWriteOptions instance.
ClientEncryption creates a new ClientEncryptionOptions instance.
Collection creates a new CollectionOptions instance.
Count creates a new CountOptions instance.
CreateCollection creates a new CreateCollectionOptions instance.
CreateIndexes creates a new CreateIndexesOptions instance.
CreateView creates an new CreateViewOptions instance.
Database creates a new DatabaseOptions instance.
DataKey creates a new DataKeyOptions instance.
DefaultIndex creates a new DefaultIndexOptions instance.
DeleteMany creates a new DeleteManyOptions instance.
DeleteOne creates a new DeleteOneOptions instance.
Distinct creates a new DistinctOptions instance.
DropCollection creates a new DropCollectionOptions instance.
DropIndexes creates a new DropIndexesOptions instance.
Encrypt creates a new EncryptOptions instance.
EstimatedDocumentCount creates a new EstimatedDocumentCountOptions instance.
Find creates a new FindOptions instance.
FindOne creates a new FindOneOptions instance.
FindOneAndDelete creates a new FindOneAndDeleteOptions instance.
FindOneAndReplace creates a new FindOneAndReplaceOptions instance.
FindOneAndUpdate creates a new FindOneAndUpdateOptions instance.
GridFSBucket creates a new BucketOptions instance.
GridFSFind creates a new GridFSFindOptions instance.
GridFSName creates a new GridFSNameOptions instance.
GridFSUpload creates a new GridFSUploadOptions instance.
Index creates a new IndexOptions instance.
InsertMany creates a new InsertManyOptions instance.
InsertOne creates a new InsertOneOptions instance.
ListCollections creates a new ListCollectionsOptions instance.
ListDatabases creates a new ListDatabasesOptions instance.
ListIndexes creates a new ListIndexesOptions instance.
Logger creates a new LoggerOptions instance.
MergeClientOptions combines the given *ClientOptions into a single *ClientOptions in a last one wins fashion.
Range creates a new RangeOptions instance.
Replace creates a new ReplaceOptions instance.
RewrapManyDataKey creates a new RewrapManyDataKeyOptions instance.
RunCmd creates a new RunCmdOptions instance.
SearchIndexes creates a new SearchIndexesOptions instance.
ServerAPI creates a new ServerAPIOptions configured with the provided serverAPIversion.
Session creates a new SessionOptions instance.
TimeSeries creates a new TimeSeriesOptions instance.
Transaction creates a new TransactionOptions instance.
UpdateMany creates a new UpdateManyOptions instance.
UpdateOne creates a new UpdateOneOptions instance.
# Constants
After specifies that findAndUpdate should return the document as it is after the update.
Before specifies that findAndUpdate should return the document as it was before the update.
Default does not include a document copy.
LogComponentAll enables logging for all components.
LogComponentCommand enables command monitor logging.
LogComponentConnection enables connection services logging.
LogComponentServerSelection enables server selection logging.
LogComponentTopology enables topology logging.
LogLevelDebug enables logging of debug messages.
LogLevelInfo enables logging of informational messages.
NonTailable specifies that a cursor should close after retrieving the last data.
Off is the same as sending no value for fullDocumentBeforeChange.
These constants specify valid values for QueryType QueryType is used for Queryable Encryption.
Required is the same as WhenAvailable but raises a server-side error if the post-image is not available.
ServerAPIVersion1 is the first API version.
ServerMonitoringModeAuto indicates that the client will behave like "poll" mode when running on a FaaS (Function as a Service) platform, or like "stream" mode otherwise.
ServerMonitoringModePoll indicates that the client will periodically check the server using a hello or legacy hello command and then sleep for heartbeatFrequencyMS milliseconds before running another check.
ServerMonitoringModeStream indicates that the client will use a streaming protocol when the server supports it.
Tailable specifies that a cursor should not close when the last data is retrieved and can be resumed later.
TailableAwait specifies that a cursor should not close when the last data is retrieved and that it should block for a certain amount of time for new data before returning no data.
UpdateLookup includes a delta describing the changes to the document and a copy of the entire document that was changed.
WhenAvailable includes a post-image of the modified document for replace and update change events if the post-image for this event is available.
# Variables
DefaultCausalConsistency is the default value for the CausalConsistency option.
DefaultChunkSize is the default size of each file chunk in bytes (255 KiB).
DefaultName is the default name for a GridFS bucket.
DefaultOrdered is the default value for the Ordered option in BulkWriteOptions.
DefaultRevision is the default revision number for a download by name operation.
# Structs
AggregateOptions represents arguments that can be used to configure an Aggregate operation.
AggregateOptionsBuilder contains options to configure aggregate operations.
AutoEncryptionOptions represents arguments used to configure auto encryption/decryption behavior for a mongo.Client instance.
BSONOptions are optional BSON marshaling and unmarshaling behaviors.
BucketOptions represents arguments that can be used to configure GridFS bucket.
BucketOptionsBuilder contains options to configure a gridfs bucket.
BulkWriteOptions represents arguments that can be used to configure a BulkWrite operation.
BulkWriteOptionsBuilder contains options to configure bulk write operations.
ChangeStreamOptions represents arguments that can be used to configure a Watch operation.
ChangeStreamOptionsBuilder contains options to configure change stream operations.
ClientBulkWriteOptions represents options that can be used to configure a client-level BulkWrite operation.
ClientBulkWriteOptionsBuilder contains options to configure client-level bulk write operations.
ClientEncryptionOptions represents all possible arguments used to configure a ClientEncryption instance.
ClientEncryptionOptionsBuilder contains options to configure client encryption operations.
ClientOptions contains arguments to configure a Client instance.
Collation allows users to specify language-specific rules for string comparison, such as rules for lettercase and accent marks.
CollectionOptions represents arguments that can be used to configure a Collection.
CollectionOptionsBuilder contains options to configure a Collection instance.
CountOptions represents arguments that can be used to configure a CountDocuments operation.
CountOptionsBuilder contains options to configure count operations.
CreateCollectionOptions represents arguments that can be used to configure a CreateCollection operation.
CreateCollectionOptionsBuilder contains options to configure a new collection.
CreateIndexesOptions represents arguments that can be used to configure IndexView.CreateOne and IndexView.CreateMany operations.
CreateIndexesOptionsBuilder contains options to create indexes.
CreateSearchIndexesOptions represents arguments that can be used to configure a SearchIndexView.CreateOne or SearchIndexView.CreateMany operation.
CreateSearchIndexesOptionsBuilder contains options to configure creating search indexes.
CreateViewOptions represents arguments that can be used to configure a CreateView operation.
CreateViewOptionsBuilder contains options to configure a new view.
Credential can be used to provide authentication options when configuring a Client.
DatabaseOptions represents arguments that can be used to configure a database.
DatabaseOptionsBuilder contains options to configure a database object.
DataKeyOptions represents all possible options used to create a new data key.
DataKeyOptionsBuilder contains options to configure DataKey operations.
DefaultIndexOptions represents the default arguments for a collection to apply on new indexes.
DefaultIndexOptionsBuilder contains options to configure default index operations.
DeleteManyOptions represents arguments that can be used to configure DeleteMany operations.
DeleteManyOptionsBuilder contains options to configure DeleteMany operations.
DeleteOneOptions represents arguments that can be used to configure DeleteOne operations.
DeleteOneOptionsBuilder contains options to configure DeleteOne operations.
DistinctOptions represents arguments that can be used to configure a Distinct operation.
DistinctOptionsBuilder contains options to configure distinct operations.
DriverInfo appends the client metadata generated by the driver when handshaking the server.
DropCollectionOptions represents arguments that can be used to configure a Drop operation.
DropCollectionOptionsBuilder contains options to configure collection drop operations.
DropIndexesOptions represents arguments that can be used to configure IndexView.DropOne and IndexView.DropAll operations.
DropIndexesOptionsBuilder contains options to configure dropping indexes.
DropSearchIndexOptions represents arguments that can be used to configure a SearchIndexView.DropOne operation.
DropSearchIndexOptionsBuilder contains options to configure dropping search indexes.
EncryptOptions represents arguments to explicitly encrypt a value.
EncryptOptionsBuilder contains options to configure Encryptopts for queryeable encryption.
EstimatedDocumentCountOptions represents arguments that can be used to configure an EstimatedDocumentCount operation.
EstimatedDocumentCountOptionsBuilder contains options to estimate document count.
FindOneAndDeleteOptions represents arguments that can be used to configure a FindOneAndDelete operation.
FindOneAndDeleteOptionsBuilder contains options to configure delete operations.
FindOneAndReplaceOptions represents arguments that can be used to configure a FindOneAndReplace instance.
FindOneAndReplaceOptionsBuilder contains options to perform a findAndModify operation.
FindOneAndUpdateOptions represents arguments that can be used to configure a FindOneAndUpdate options.
FindOneAndUpdateOptionsBuilder contains options to configure a findOneAndUpdate operation.
FindOneOptions represents arguments that can be used to configure a FindOne operation.
FindOneOptionsBuilder represents functional options that configure an FindOneopts.
FindOptions represents arguments that can be used to configure a Find operation.
FindOptionsBuilder represents functional options that configure an Findopts.
GridFSFindOptions represents arguments that can be used to configure a GridFS Find operation.
GridFSFindOptionsBuilder contains options to configure find operations.
GridFSNameOptions represents arguments that can be used to configure a GridFS DownloadByName operation.
GridFSNameOptionsBuilder contains options to configure a GridFS name.
GridFSUploadOptions represents arguments that can be used to configure a GridFS upload operation.
GridFSUploadOptionsBuilder contains options to configure a GridFS Upload.
IDPInfo contains the information needed to perform OIDC authentication with an Identity Provider.
IndexOptions represents arguments that can be used to configure a new index created through the IndexView.CreateOne or IndexView.CreateMany operations.
IndexOptionsBuilder contains options to configure index operations.
InsertManyOptions represents arguments that can be used to configure an InsertMany operation.
InsertManyOptionsBuilder contains options to configure insert operations.
InsertOneOptions represents arguments that can be used to configure an InsertOne operation.
InsertOneOptionsBuilder represents functional options that configure an InsertOneopts.
ListCollectionsOptions represents arguments that can be used to configure a ListCollections operation.
ListCollectionsOptionsBuilder contains options to configure list collection operations.
ListDatabasesOptions represents arguments that can be used to configure a ListDatabases operation.
ListDatabasesOptionsBuilder represents functional options that configure a ListDatabasesopts.
ListIndexesOptions represents arguments that can be used to configure an IndexView.List operation.
ListIndexesOptionsBuilder contains options to configure count operations.
ListSearchIndexesOptions represents arguments that can be used to configure a SearchIndexView.List operation.
ListSearchIndexesOptionsBuilder contains options that can be used to configure a SearchIndexView.List operation.
LoggerOptions represent arguments used to configure Logging in the Go Driver.
OIDCArgs contains the arguments for the OIDC callback.
OIDCCredential contains the access token and refresh token.
RangeOptions specifies index options for a Queryable Encryption field supporting "range" queries.
RangeOptionsBuilder contains options to configure Rangeopts for queryeable encryption.
ReplaceOptions represents arguments that can be used to configure a ReplaceOne operation.
ReplaceOptionsBuilder contains options to configure replace operations.
RewrapManyDataKeyOptions represents all possible options used to decrypt and encrypt all matching data keys with a possibly new masterKey.
RewrapManyDataKeyOptionsBuilder contains options to configure rewraping a data key.
RunCmdOptions represents arguments that can be used to configure a RunCommand operation.
RunCmdOptionsBuilder contains options to configure runCommand operations.
SearchIndexesOptions represents arguments that can be used to configure a SearchIndexView.
SearchIndexesOptionsBuilder contains options to configure search index operations.
ServerAPIOptions represents arguments used to configure the API version sent to the server when running commands.
SessionOptions represents arguments that can be used to configure a Session.
SessionOptionsBuilder represents functional options that configure a Sessionopts.
TimeSeriesOptions specifies arguments on a time-series collection.
TimeSeriesOptionsBuilder contains options to configure timeseries operations.
TransactionOptions represents arguments that can be used to configure a transaction.
TransactionOptionsBuilder contains arguments to configure count operations.
UpdateManyOptions represents arguments that can be used to configure UpdateMany operations.
UpdateManyOptionsBuilder contains options to configure UpdateMany operations.
UpdateOneOptions represents arguments that can be used to configure UpdateOne operations.
UpdateOneOptionsBuilder contains options to configure UpdateOne operations.
UpdateSearchIndexOptions represents arguments that can be used to configure a SearchIndexView.UpdateOne operation.
UpdateSearchIndexOptionsBuilder contains options to configure updating search indexes.
# Interfaces
ContextDialer is an interface that can be implemented by types that can create connections.
Lister is an interface that wraps a List method to return a slice of option setters.
LogSink is an interface that can be implemented to provide a custom sink for the driver's logs.
# Type aliases
CursorType specifies whether a cursor should close when the last data is retrieved.
FullDocument specifies how a change stream should return the modified document.
LogComponent is an enumeration representing the "components" which can be logged against.
LogLevel is an enumeration representing the supported log severity levels.
OIDCCallback is the type for both Human and Machine Callback flows.
ReturnDocument specifies whether a findAndUpdate operation should return the document as it was before the update or as it is after the update.
ServerAPIVersion represents an API version that can be used in ServerAPIOptions.