# Packages
Package gridfs provides a MongoDB GridFS API.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Functions
BatchCursorFromCursor returns a driver.BatchCursor for the given Cursor.
Connect creates a new Client and then initializes it using the Connect method.
NewClient creates a new client to connect to a deployment specified by the uri.
NewClientEncryption creates a new ClientEncryption instance configured with the given options.
NewDeleteManyModel creates a new DeleteManyModel.
NewDeleteOneModel creates a new DeleteOneModel.
NewIndexOptionsBuilder is deprecated.
NewInsertOneModel creates a new InsertOneModel.
NewReplaceOneModel creates a new ReplaceOneModel.
NewUpdateManyModel creates a new UpdateManyModel.
NewUpdateOneModel creates a new UpdateOneModel.
WithSession creates a new SessionContext from the ctx and sess parameters and uses it to call the fn callback.
# Constants
These constants represent valid change stream types.
These constants represent valid change stream types.
These constants represent valid change stream types.
# Variables
ErrClientDisconnected is returned when disconnected Client is used to run an operation.
ErrEmptySlice is returned when an empty slice is passed to a CRUD method that requires a non-empty slice.
ErrInvalidIndexValue is returned if an index is created with a keys document that has a value that is not a number or string.
ErrMissingResumeToken indicates that a change stream notification from the server did not contain a resume token.
ErrMultipleIndexDrop is returned if multiple indexes would be dropped from a call to IndexView.DropOne.
ErrNilCursor indicates that the underlying cursor for the change stream is nil.
ErrNilDocument is returned when a nil document is passed to a CRUD method.
ErrNoDocuments is returned by SingleResult methods when the operation that created the SingleResult did not return any documents.
ErrNonStringIndexName is returned if an index is created with a name that is not a string.
ErrUnacknowledgedWrite is returned by operations that have an unacknowledged write concern.
ErrWrongClient is returned when a user attempts to pass in a session created by a different client than the method call is using.
# Structs
BulkWriteError is an error that occurred during execution of one operation in a BulkWrite.
BulkWriteException is the error type returned by BulkWrite and InsertMany operations.
BulkWriteResult is the result type returned by a BulkWrite operation.
ChangeStream is used to iterate over a stream of events.
Client is a handle representing a pool of connections to a MongoDB deployment.
ClientEncryption is used to create data keys and explicitly encrypt and decrypt BSON values.
Collection is a handle to a MongoDB collection.
CommandError represents a server error during execution of a command.
Cursor is used to iterate over a stream of documents.
Database is a handle to a MongoDB database.
DatabaseSpecification contains information for a database.
DeleteManyModel is used to delete multiple documents in a BulkWrite operation.
DeleteOneModel is used to delete at most one document in a BulkWriteOperation.
DeleteResult is the result type returned by DeleteOne and DeleteMany operations.
EncryptionKeyVaultError represents an error while communicating with the key vault collection during client-side encryption.
IndexModel represents a new index to be created.
IndexOptionsBuilder is deprecated and unused.
IndexView is a type that can be used to create, drop, and list indexes on a collection.
InsertManyResult is a result type returned by an InsertMany operation.
InsertOneModel is used to insert a single document in a BulkWrite operation.
InsertOneResult is the result type returned by an InsertOne operation.
ListDatabasesResult is a result of a ListDatabases operation.
MarshalError is returned when attempting to transform a value into a document results in an error.
MongocryptdError represents an error while communicating with mongocryptd during client-side encryption.
MongocryptError represents an libmongocrypt error during client-side encryption.
ReplaceOneModel is used to replace at most one document in a BulkWrite operation.
SingleResult represents a single document returned from an operation.
UpdateManyModel is used to update multiple documents in a BulkWrite operation.
UpdateOneModel is used to update at most one document in a BulkWrite operation.
UpdateResult is the result type returned from UpdateOne, UpdateMany, and ReplaceOne operations.
WriteConcernError represents a write concern failure during execution of a write operation.
WriteError is an error that occurred during execution of a write operation.
WriteException is the error type returned by the InsertOne, DeleteOne, DeleteMany, UpdateOne, UpdateMany, and ReplaceOne operations.
# Interfaces
BSONAppender is an interface implemented by types that can marshal a provided type into BSON bytes and append those bytes to the provided []byte.
Dialer is used to make network connections.
Session is an interface that represents a MongoDB logical session.
SessionContext combines the context.Context and mongo.Session interfaces.
WriteModel is an interface implemented by models that can be used in a BulkWrite operation.
XSession is an unstable interface for internal use only.
# Type aliases
BSONAppenderFunc is an adapter function that allows any function that satisfies the AppendBSON method signature to be used where a BSONAppender is used.
Pipeline is a type that makes creating aggregation pipelines easier.
StreamType represents the cluster type against which a ChangeStream was created.
WriteErrors is a group of write errors that occurred during execution of a write operation.