package
1.17.3
Repository: https://github.com/mongodb/mongo-go-driver.git
Documentation: pkg.go.dev

# 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.
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.
Delete creates a new DeleteOptions instance.
Distinct creates a new DistinctOptions 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 NameOptions instance.
GridFSUpload creates a new UploadOptions 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.
MergeAggregateOptions combines the given AggregateOptions instances into a single AggregateOptions in a last-one-wins fashion.
MergeAutoEncryptionOptions combines the argued AutoEncryptionOptions in a last-one wins fashion.
MergeBucketOptions combines the given BucketOptions instances into a single BucketOptions in a last-one-wins fashion.
MergeBulkWriteOptions combines the given BulkWriteOptions instances into a single BulkWriteOptions in a last-one-wins fashion.
MergeChangeStreamOptions combines the given ChangeStreamOptions instances into a single ChangeStreamOptions in a last-one-wins fashion.
MergeClientEncryptionOptions combines the argued ClientEncryptionOptions in a last-one wins fashion.
MergeClientOptions combines the given *ClientOptions into a single *ClientOptions in a last one wins fashion.
MergeCollectionOptions combines the given CollectionOptions instances into a single *CollectionOptions in a last-one-wins fashion.
MergeCountOptions combines the given CountOptions instances into a single CountOptions in a last-one-wins fashion.
MergeCreateCollectionOptions combines the given CreateCollectionOptions instances into a single CreateCollectionOptions in a last-one-wins fashion.
MergeCreateIndexesOptions combines the given CreateIndexesOptions into a single CreateIndexesOptions in a last one wins fashion.
MergeCreateViewOptions combines the given CreateViewOptions instances into a single CreateViewOptions in a last-one-wins fashion.
MergeDatabaseOptions combines the given DatabaseOptions instances into a single DatabaseOptions in a last-one-wins fashion.
MergeDataKeyOptions combines the argued DataKeyOptions in a last-one wins fashion.
MergeDeleteOptions combines the given DeleteOptions instances into a single DeleteOptions in a last-one-wins fashion.
MergeDistinctOptions combines the given DistinctOptions instances into a single DistinctOptions in a last-one-wins fashion.
MergeDropIndexesOptions combines the given DropIndexesOptions into a single DropIndexesOptions in a last-one-wins fashion.
MergeEncryptOptions combines the argued EncryptOptions in a last-one wins fashion.
MergeEstimatedDocumentCountOptions combines the given EstimatedDocumentCountOptions instances into a single EstimatedDocumentCountOptions in a last-one-wins fashion.
MergeFindOneAndDeleteOptions combines the given FindOneAndDeleteOptions instances into a single FindOneAndDeleteOptions in a last-one-wins fashion.
MergeFindOneAndReplaceOptions combines the given FindOneAndReplaceOptions instances into a single FindOneAndReplaceOptions in a last-one-wins fashion.
MergeFindOneAndUpdateOptions combines the given FindOneAndUpdateOptions instances into a single FindOneAndUpdateOptions in a last-one-wins fashion.
MergeFindOneOptions combines the given FindOneOptions instances into a single FindOneOptions in a last-one-wins fashion.
MergeFindOptions combines the given FindOptions instances into a single FindOptions in a last-one-wins fashion.
MergeGridFSFindOptions combines the given GridFSFindOptions instances into a single GridFSFindOptions in a last-one-wins fashion.
MergeIndexOptions combines the given IndexOptions into a single IndexOptions in a last-one-wins fashion.
MergeInsertManyOptions combines the given InsertManyOptions instances into a single InsertManyOptions in a last one wins fashion.
MergeInsertOneOptions combines the given InsertOneOptions instances into a single InsertOneOptions in a last-one-wins fashion.
MergeListCollectionsOptions combines the given ListCollectionsOptions instances into a single *ListCollectionsOptions in a last-one-wins fashion.
MergeListDatabasesOptions combines the given ListDatabasesOptions instances into a single *ListDatabasesOptions in a last-one-wins fashion.
MergeListIndexesOptions combines the given ListIndexesOptions instances into a single *ListIndexesOptions in a last-one-wins fashion.
MergeNameOptions combines the given NameOptions instances into a single *NameOptions in a last-one-wins fashion.
MergeReplaceOptions combines the given ReplaceOptions instances into a single ReplaceOptions in a last-one-wins fashion.
MergeRewrapManyDataKeyOptions combines the given RewrapManyDataKeyOptions instances into a single RewrapManyDataKeyOptions in a last one wins fashion.
MergeRunCmdOptions combines the given RunCmdOptions instances into one *RunCmdOptions in a last-one-wins fashion.
MergeSessionOptions combines the given SessionOptions instances into a single SessionOptions in a last-one-wins fashion.
MergeTransactionOptions combines the given TransactionOptions instances into a single TransactionOptions in a last-one-wins fashion.
MergeUpdateOptions combines the given UpdateOptions instances into a single UpdateOptions in a last-one-wins fashion.
MergeUploadOptions combines the given UploadOptions instances into a single UploadOptions in a last-one-wins fashion.
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.
Update creates a new UpdateOptions 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 options that can be used to configure an Aggregate operation.
ArrayFilters is used to hold filters for the array filters CRUD option.
AutoEncryptionOptions represents options used to configure auto encryption/decryption behavior for a mongo.Client instance.
BSONOptions are optional BSON marshaling and unmarshaling behaviors.
BucketOptions represents options that can be used to configure GridFS bucket.
BulkWriteOptions represents options that can be used to configure a BulkWrite operation.
ChangeStreamOptions represents options that can be used to configure a Watch operation.
ClientEncryptionOptions represents all possible options used to configure a ClientEncryption instance.
ClientOptions contains options 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 options that can be used to configure a Collection.
CountOptions represents options that can be used to configure a CountDocuments operation.
CreateCollectionOptions represents options that can be used to configure a CreateCollection operation.
CreateIndexesOptions represents options that can be used to configure IndexView.CreateOne and IndexView.CreateMany operations.
CreateSearchIndexesOptions represents options that can be used to configure a SearchIndexView.CreateOne or SearchIndexView.CreateMany operation.
CreateViewOptions represents options that can be used to configure a CreateView operation.
Credential can be used to provide authentication options when configuring a Client.
DatabaseOptions represents options that can be used to configure a Database.
DataKeyOptions represents all possible options used to create a new data key.
DefaultIndexOptions represents the default options for a collection to apply on new indexes.
DeleteOptions represents options that can be used to configure DeleteOne and DeleteMany operations.
DistinctOptions represents options that can be used to configure a Distinct operation.
DropIndexesOptions represents options that can be used to configure IndexView.DropOne and IndexView.DropAll operations.
DropSearchIndexOptions represents options that can be used to configure a SearchIndexView.DropOne operation.
EncryptOptions represents options to explicitly encrypt a value.
EstimatedDocumentCountOptions represents options that can be used to configure an EstimatedDocumentCount operation.
FindOneAndDeleteOptions represents options that can be used to configure a FindOneAndDelete operation.
FindOneAndReplaceOptions represents options that can be used to configure a FindOneAndReplace instance.
FindOneAndUpdateOptions represents options that can be used to configure a FindOneAndUpdate options.
FindOneOptions represents options that can be used to configure a FindOne operation.
FindOptions represents options that can be used to configure a Find operation.
GridFSFindOptions represents options that can be used to configure a GridFS Find operation.
IDPInfo contains the information needed to perform OIDC authentication with an Identity Provider.
IndexOptions represents options that can be used to configure a new index created through the IndexView.CreateOne or IndexView.CreateMany operations.
InsertManyOptions represents options that can be used to configure an InsertMany operation.
InsertOneOptions represents options that can be used to configure an InsertOne operation.
ListCollectionsOptions represents options that can be used to configure a ListCollections operation.
ListDatabasesOptions represents options that can be used to configure a ListDatabases operation.
ListIndexesOptions represents options that can be used to configure an IndexView.List operation.
ListSearchIndexesOptions represents options that can be used to configure a SearchIndexView.List operation.
LoggerOptions represent options used to configure Logging in the Go Driver.
MarshalError is returned when attempting to transform a value into a document results in an error.
NameOptions represents options that can be used to configure a GridFS DownloadByName operation.
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.
ReplaceOptions represents options that can be used to configure a ReplaceOne operation.
RewrapManyDataKeyOptions represents all possible options used to decrypt and encrypt all matching data keys with a possibly new masterKey.
RunCmdOptions represents options that can be used to configure a RunCommand operation.
SearchIndexesOptions represents options that can be used to configure a SearchIndexView.
ServerAPIOptions represents options used to configure the API version sent to the server when running commands.
SessionOptions represents options that can be used to configure a Session.
TimeSeriesOptions specifies options on a time-series collection.
TransactionOptions represents options that can be used to configure a transaction.
UpdateOptions represents options that can be used to configure UpdateOne and UpdateMany operations.
UpdateSearchIndexOptions represents options that can be used to configure a SearchIndexView.UpdateOne operation.
UploadOptions represents options that can be used to configure a GridFS upload operation.

# Interfaces

ContextDialer is an interface that can be implemented by types that can create connections.
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.