Versions in this module Expand all Collapse all v1 v1.4.1 Sep 27, 2020 Changes in this version + var DefaultCausalConsistency = true + var DefaultChunkSize int32 = 255 * 1024 + var DefaultName = "fs" + var DefaultOrdered = true + var DefaultRevision int32 = -1 + type AggregateOptions struct + AllowDiskUse *bool + BatchSize *int32 + BypassDocumentValidation *bool + Collation *Collation + Comment *string + Hint interface{} + MaxAwaitTime *time.Duration + MaxTime *time.Duration + func Aggregate() *AggregateOptions + func MergeAggregateOptions(opts ...*AggregateOptions) *AggregateOptions + func (ao *AggregateOptions) SetAllowDiskUse(b bool) *AggregateOptions + func (ao *AggregateOptions) SetBatchSize(i int32) *AggregateOptions + func (ao *AggregateOptions) SetBypassDocumentValidation(b bool) *AggregateOptions + func (ao *AggregateOptions) SetCollation(c *Collation) *AggregateOptions + func (ao *AggregateOptions) SetComment(s string) *AggregateOptions + func (ao *AggregateOptions) SetHint(h interface{}) *AggregateOptions + func (ao *AggregateOptions) SetMaxAwaitTime(d time.Duration) *AggregateOptions + func (ao *AggregateOptions) SetMaxTime(d time.Duration) *AggregateOptions + type ArrayFilters struct + Filters []interface{} + Registry *bsoncodec.Registry + func (af *ArrayFilters) ToArray() ([]bson.Raw, error) + func (af *ArrayFilters) ToArrayDocument() (bson.Raw, error) + type BucketOptions struct + ChunkSizeBytes *int32 + Name *string + ReadConcern *readconcern.ReadConcern + ReadPreference *readpref.ReadPref + WriteConcern *writeconcern.WriteConcern + func GridFSBucket() *BucketOptions + func MergeBucketOptions(opts ...*BucketOptions) *BucketOptions + func (b *BucketOptions) SetChunkSizeBytes(i int32) *BucketOptions + func (b *BucketOptions) SetName(name string) *BucketOptions + func (b *BucketOptions) SetReadConcern(rc *readconcern.ReadConcern) *BucketOptions + func (b *BucketOptions) SetReadPreference(rp *readpref.ReadPref) *BucketOptions + func (b *BucketOptions) SetWriteConcern(wc *writeconcern.WriteConcern) *BucketOptions + type BulkWriteOptions struct + BypassDocumentValidation *bool + Ordered *bool + func BulkWrite() *BulkWriteOptions + func MergeBulkWriteOptions(opts ...*BulkWriteOptions) *BulkWriteOptions + func (b *BulkWriteOptions) SetBypassDocumentValidation(bypass bool) *BulkWriteOptions + func (b *BulkWriteOptions) SetOrdered(ordered bool) *BulkWriteOptions + type ChangeStreamOptions struct + BatchSize *int32 + Collation *Collation + FullDocument *FullDocument + MaxAwaitTime *time.Duration + ResumeAfter interface{} + StartAfter interface{} + StartAtOperationTime *primitive.Timestamp + func ChangeStream() *ChangeStreamOptions + func MergeChangeStreamOptions(opts ...*ChangeStreamOptions) *ChangeStreamOptions + func (cso *ChangeStreamOptions) SetBatchSize(i int32) *ChangeStreamOptions + func (cso *ChangeStreamOptions) SetCollation(c Collation) *ChangeStreamOptions + func (cso *ChangeStreamOptions) SetFullDocument(fd FullDocument) *ChangeStreamOptions + func (cso *ChangeStreamOptions) SetMaxAwaitTime(d time.Duration) *ChangeStreamOptions + func (cso *ChangeStreamOptions) SetResumeAfter(rt interface{}) *ChangeStreamOptions + func (cso *ChangeStreamOptions) SetStartAfter(sa interface{}) *ChangeStreamOptions + func (cso *ChangeStreamOptions) SetStartAtOperationTime(t *primitive.Timestamp) *ChangeStreamOptions + type ClientOptions struct + AppName *string + Auth *Credential + AuthenticateToAnything *bool + Compressors []string + ConnectTimeout *time.Duration + Dialer ContextDialer + Direct *bool + HeartbeatInterval *time.Duration + Hosts []string + LocalThreshold *time.Duration + MaxConnIdleTime *time.Duration + MaxPoolSize *uint64 + MinPoolSize *uint64 + Monitor *event.CommandMonitor + PoolMonitor *event.PoolMonitor + ReadConcern *readconcern.ReadConcern + ReadPreference *readpref.ReadPref + Registry *bsoncodec.Registry + ReplicaSet *string + RetryReads *bool + RetryWrites *bool + ServerSelectionTimeout *time.Duration + SocketTimeout *time.Duration + TLSConfig *tls.Config + WriteConcern *writeconcern.WriteConcern + ZlibLevel *int + func Client() *ClientOptions + func MergeClientOptions(opts ...*ClientOptions) *ClientOptions + func (c *ClientOptions) ApplyURI(uri string) *ClientOptions + func (c *ClientOptions) SetAppName(s string) *ClientOptions + func (c *ClientOptions) SetAuth(auth Credential) *ClientOptions + func (c *ClientOptions) SetCompressors(comps []string) *ClientOptions + func (c *ClientOptions) SetConnectTimeout(d time.Duration) *ClientOptions + func (c *ClientOptions) SetDialer(d ContextDialer) *ClientOptions + func (c *ClientOptions) SetDirect(b bool) *ClientOptions + func (c *ClientOptions) SetHeartbeatInterval(d time.Duration) *ClientOptions + func (c *ClientOptions) SetHosts(s []string) *ClientOptions + func (c *ClientOptions) SetLocalThreshold(d time.Duration) *ClientOptions + func (c *ClientOptions) SetMaxConnIdleTime(d time.Duration) *ClientOptions + func (c *ClientOptions) SetMaxPoolSize(u uint64) *ClientOptions + func (c *ClientOptions) SetMinPoolSize(u uint64) *ClientOptions + func (c *ClientOptions) SetMonitor(m *event.CommandMonitor) *ClientOptions + func (c *ClientOptions) SetPoolMonitor(m *event.PoolMonitor) *ClientOptions + func (c *ClientOptions) SetReadConcern(rc *readconcern.ReadConcern) *ClientOptions + func (c *ClientOptions) SetReadPreference(rp *readpref.ReadPref) *ClientOptions + func (c *ClientOptions) SetRegistry(registry *bsoncodec.Registry) *ClientOptions + func (c *ClientOptions) SetReplicaSet(s string) *ClientOptions + func (c *ClientOptions) SetRetryWrites(b bool) *ClientOptions + func (c *ClientOptions) SetServerSelectionTimeout(d time.Duration) *ClientOptions + func (c *ClientOptions) SetSocketTimeout(d time.Duration) *ClientOptions + func (c *ClientOptions) SetTLSConfig(cfg *tls.Config) *ClientOptions + func (c *ClientOptions) SetWriteConcern(wc *writeconcern.WriteConcern) *ClientOptions + func (c *ClientOptions) SetZlibLevel(level int) *ClientOptions + func (c *ClientOptions) Validate() error + type Collation struct + Alternate string + Backwards bool + CaseFirst string + CaseLevel bool + Locale string + MaxVariable string + Normalization bool + NumericOrdering bool + Strength int + func (co *Collation) ToDocument() bson.Raw + type CollectionOptions struct + ReadConcern *readconcern.ReadConcern + ReadPreference *readpref.ReadPref + Registry *bsoncodec.Registry + WriteConcern *writeconcern.WriteConcern + func Collection() *CollectionOptions + func MergeCollectionOptions(opts ...*CollectionOptions) *CollectionOptions + func (c *CollectionOptions) SetReadConcern(rc *readconcern.ReadConcern) *CollectionOptions + func (c *CollectionOptions) SetReadPreference(rp *readpref.ReadPref) *CollectionOptions + func (c *CollectionOptions) SetRegistry(r *bsoncodec.Registry) *CollectionOptions + func (c *CollectionOptions) SetWriteConcern(wc *writeconcern.WriteConcern) *CollectionOptions + type ContextDialer interface + DialContext func(ctx context.Context, network, address string) (net.Conn, error) + type CountOptions struct + Collation *Collation + Hint interface{} + Limit *int64 + MaxTime *time.Duration + Skip *int64 + func Count() *CountOptions + func MergeCountOptions(opts ...*CountOptions) *CountOptions + func (co *CountOptions) SetCollation(c *Collation) *CountOptions + func (co *CountOptions) SetHint(h interface{}) *CountOptions + func (co *CountOptions) SetLimit(i int64) *CountOptions + func (co *CountOptions) SetMaxTime(d time.Duration) *CountOptions + func (co *CountOptions) SetSkip(i int64) *CountOptions + type CreateIndexesOptions struct + MaxTime *time.Duration + func CreateIndexes() *CreateIndexesOptions + func MergeCreateIndexesOptions(opts ...*CreateIndexesOptions) *CreateIndexesOptions + func (c *CreateIndexesOptions) SetMaxTime(d time.Duration) *CreateIndexesOptions + type Credential struct + AuthMechanism string + AuthMechanismProperties map[string]string + AuthSource string + Password string + PasswordSet bool + Username string + type CursorType int8 + const NonTailable + const Tailable + const TailableAwait + type DatabaseOptions struct + ReadConcern *readconcern.ReadConcern + ReadPreference *readpref.ReadPref + Registry *bsoncodec.Registry + WriteConcern *writeconcern.WriteConcern + func Database() *DatabaseOptions + func MergeDatabaseOptions(opts ...*DatabaseOptions) *DatabaseOptions + func (d *DatabaseOptions) SetReadConcern(rc *readconcern.ReadConcern) *DatabaseOptions + func (d *DatabaseOptions) SetReadPreference(rp *readpref.ReadPref) *DatabaseOptions + func (d *DatabaseOptions) SetRegistry(r *bsoncodec.Registry) *DatabaseOptions + func (d *DatabaseOptions) SetWriteConcern(wc *writeconcern.WriteConcern) *DatabaseOptions + type DeleteOptions struct + Collation *Collation + func Delete() *DeleteOptions + func MergeDeleteOptions(opts ...*DeleteOptions) *DeleteOptions + func (do *DeleteOptions) SetCollation(c *Collation) *DeleteOptions + type DistinctOptions struct + Collation *Collation + MaxTime *time.Duration + func Distinct() *DistinctOptions + func MergeDistinctOptions(opts ...*DistinctOptions) *DistinctOptions + func (do *DistinctOptions) SetCollation(c *Collation) *DistinctOptions + func (do *DistinctOptions) SetMaxTime(d time.Duration) *DistinctOptions + type DropIndexesOptions struct + MaxTime *time.Duration + func DropIndexes() *DropIndexesOptions + func MergeDropIndexesOptions(opts ...*DropIndexesOptions) *DropIndexesOptions + func (d *DropIndexesOptions) SetMaxTime(duration time.Duration) *DropIndexesOptions + type EstimatedDocumentCountOptions struct + MaxTime *time.Duration + func EstimatedDocumentCount() *EstimatedDocumentCountOptions + func MergeEstimatedDocumentCountOptions(opts ...*EstimatedDocumentCountOptions) *EstimatedDocumentCountOptions + func (eco *EstimatedDocumentCountOptions) SetMaxTime(d time.Duration) *EstimatedDocumentCountOptions + type FindOneAndDeleteOptions struct + Collation *Collation + MaxTime *time.Duration + Projection interface{} + Sort interface{} + func FindOneAndDelete() *FindOneAndDeleteOptions + func MergeFindOneAndDeleteOptions(opts ...*FindOneAndDeleteOptions) *FindOneAndDeleteOptions + func (f *FindOneAndDeleteOptions) SetCollation(collation *Collation) *FindOneAndDeleteOptions + func (f *FindOneAndDeleteOptions) SetMaxTime(d time.Duration) *FindOneAndDeleteOptions + func (f *FindOneAndDeleteOptions) SetProjection(projection interface{}) *FindOneAndDeleteOptions + func (f *FindOneAndDeleteOptions) SetSort(sort interface{}) *FindOneAndDeleteOptions + type FindOneAndReplaceOptions struct + BypassDocumentValidation *bool + Collation *Collation + MaxTime *time.Duration + Projection interface{} + ReturnDocument *ReturnDocument + Sort interface{} + Upsert *bool + func FindOneAndReplace() *FindOneAndReplaceOptions + func MergeFindOneAndReplaceOptions(opts ...*FindOneAndReplaceOptions) *FindOneAndReplaceOptions + func (f *FindOneAndReplaceOptions) SetBypassDocumentValidation(b bool) *FindOneAndReplaceOptions + func (f *FindOneAndReplaceOptions) SetCollation(collation *Collation) *FindOneAndReplaceOptions + func (f *FindOneAndReplaceOptions) SetMaxTime(d time.Duration) *FindOneAndReplaceOptions + func (f *FindOneAndReplaceOptions) SetProjection(projection interface{}) *FindOneAndReplaceOptions + func (f *FindOneAndReplaceOptions) SetReturnDocument(rd ReturnDocument) *FindOneAndReplaceOptions + func (f *FindOneAndReplaceOptions) SetSort(sort interface{}) *FindOneAndReplaceOptions + func (f *FindOneAndReplaceOptions) SetUpsert(b bool) *FindOneAndReplaceOptions + type FindOneAndUpdateOptions struct + ArrayFilters *ArrayFilters + BypassDocumentValidation *bool + Collation *Collation + MaxTime *time.Duration + Projection interface{} + ReturnDocument *ReturnDocument + Sort interface{} + Upsert *bool + func FindOneAndUpdate() *FindOneAndUpdateOptions + func MergeFindOneAndUpdateOptions(opts ...*FindOneAndUpdateOptions) *FindOneAndUpdateOptions + func (f *FindOneAndUpdateOptions) SetArrayFilters(filters ArrayFilters) *FindOneAndUpdateOptions + func (f *FindOneAndUpdateOptions) SetBypassDocumentValidation(b bool) *FindOneAndUpdateOptions + func (f *FindOneAndUpdateOptions) SetCollation(collation *Collation) *FindOneAndUpdateOptions + func (f *FindOneAndUpdateOptions) SetMaxTime(d time.Duration) *FindOneAndUpdateOptions + func (f *FindOneAndUpdateOptions) SetProjection(projection interface{}) *FindOneAndUpdateOptions + func (f *FindOneAndUpdateOptions) SetReturnDocument(rd ReturnDocument) *FindOneAndUpdateOptions + func (f *FindOneAndUpdateOptions) SetSort(sort interface{}) *FindOneAndUpdateOptions + func (f *FindOneAndUpdateOptions) SetUpsert(b bool) *FindOneAndUpdateOptions + type FindOneOptions struct + AllowPartialResults *bool + BatchSize *int32 + Collation *Collation + Comment *string + CursorType *CursorType + Hint interface{} + Max interface{} + MaxAwaitTime *time.Duration + MaxTime *time.Duration + Min interface{} + NoCursorTimeout *bool + OplogReplay *bool + Projection interface{} + ReturnKey *bool + ShowRecordID *bool + Skip *int64 + Snapshot *bool + Sort interface{} + func FindOne() *FindOneOptions + func MergeFindOneOptions(opts ...*FindOneOptions) *FindOneOptions + func (f *FindOneOptions) SetAllowPartialResults(b bool) *FindOneOptions + func (f *FindOneOptions) SetBatchSize(i int32) *FindOneOptions + func (f *FindOneOptions) SetCollation(collation *Collation) *FindOneOptions + func (f *FindOneOptions) SetComment(comment string) *FindOneOptions + func (f *FindOneOptions) SetCursorType(ct CursorType) *FindOneOptions + func (f *FindOneOptions) SetHint(hint interface{}) *FindOneOptions + func (f *FindOneOptions) SetMax(max interface{}) *FindOneOptions + func (f *FindOneOptions) SetMaxAwaitTime(d time.Duration) *FindOneOptions + func (f *FindOneOptions) SetMaxTime(d time.Duration) *FindOneOptions + func (f *FindOneOptions) SetMin(min interface{}) *FindOneOptions + func (f *FindOneOptions) SetNoCursorTimeout(b bool) *FindOneOptions + func (f *FindOneOptions) SetOplogReplay(b bool) *FindOneOptions + func (f *FindOneOptions) SetProjection(projection interface{}) *FindOneOptions + func (f *FindOneOptions) SetReturnKey(b bool) *FindOneOptions + func (f *FindOneOptions) SetShowRecordID(b bool) *FindOneOptions + func (f *FindOneOptions) SetSkip(i int64) *FindOneOptions + func (f *FindOneOptions) SetSnapshot(b bool) *FindOneOptions + func (f *FindOneOptions) SetSort(sort interface{}) *FindOneOptions + type FindOptions struct + AllowPartialResults *bool + BatchSize *int32 + Collation *Collation + Comment *string + CursorType *CursorType + Hint interface{} + Limit *int64 + Max interface{} + MaxAwaitTime *time.Duration + MaxTime *time.Duration + Min interface{} + NoCursorTimeout *bool + OplogReplay *bool + Projection interface{} + ReturnKey *bool + ShowRecordID *bool + Skip *int64 + Snapshot *bool + Sort interface{} + func Find() *FindOptions + func MergeFindOptions(opts ...*FindOptions) *FindOptions + func (f *FindOptions) SetAllowPartialResults(b bool) *FindOptions + func (f *FindOptions) SetBatchSize(i int32) *FindOptions + func (f *FindOptions) SetCollation(collation *Collation) *FindOptions + func (f *FindOptions) SetComment(comment string) *FindOptions + func (f *FindOptions) SetCursorType(ct CursorType) *FindOptions + func (f *FindOptions) SetHint(hint interface{}) *FindOptions + func (f *FindOptions) SetLimit(i int64) *FindOptions + func (f *FindOptions) SetMax(max interface{}) *FindOptions + func (f *FindOptions) SetMaxAwaitTime(d time.Duration) *FindOptions + func (f *FindOptions) SetMaxTime(d time.Duration) *FindOptions + func (f *FindOptions) SetMin(min interface{}) *FindOptions + func (f *FindOptions) SetNoCursorTimeout(b bool) *FindOptions + func (f *FindOptions) SetOplogReplay(b bool) *FindOptions + func (f *FindOptions) SetProjection(projection interface{}) *FindOptions + func (f *FindOptions) SetReturnKey(b bool) *FindOptions + func (f *FindOptions) SetShowRecordID(b bool) *FindOptions + func (f *FindOptions) SetSkip(i int64) *FindOptions + func (f *FindOptions) SetSnapshot(b bool) *FindOptions + func (f *FindOptions) SetSort(sort interface{}) *FindOptions + type FullDocument string + const Default + const UpdateLookup + type GridFSFindOptions struct + BatchSize *int32 + Limit *int32 + MaxTime *time.Duration + NoCursorTimeout *bool + Skip *int32 + Sort interface{} + func GridFSFind() *GridFSFindOptions + func MergeGridFSFindOptions(opts ...*GridFSFindOptions) *GridFSFindOptions + func (f *GridFSFindOptions) SetBatchSize(i int32) *GridFSFindOptions + func (f *GridFSFindOptions) SetLimit(i int32) *GridFSFindOptions + func (f *GridFSFindOptions) SetMaxTime(d time.Duration) *GridFSFindOptions + func (f *GridFSFindOptions) SetNoCursorTimeout(b bool) *GridFSFindOptions + func (f *GridFSFindOptions) SetSkip(i int32) *GridFSFindOptions + func (f *GridFSFindOptions) SetSort(sort interface{}) *GridFSFindOptions + type IndexOptions struct + Background *bool + Bits *int32 + BucketSize *int32 + Collation *Collation + DefaultLanguage *string + ExpireAfterSeconds *int32 + LanguageOverride *string + Max *float64 + Min *float64 + Name *string + PartialFilterExpression interface{} + Sparse *bool + SphereVersion *int32 + StorageEngine interface{} + TextVersion *int32 + Unique *bool + Version *int32 + Weights interface{} + WildcardProjection interface{} + func Index() *IndexOptions + func MergeIndexOptions(opts ...*IndexOptions) *IndexOptions + func (i *IndexOptions) SetBackground(background bool) *IndexOptions + func (i *IndexOptions) SetBits(bits int32) *IndexOptions + func (i *IndexOptions) SetBucketSize(bucketSize int32) *IndexOptions + func (i *IndexOptions) SetCollation(collation *Collation) *IndexOptions + func (i *IndexOptions) SetDefaultLanguage(language string) *IndexOptions + func (i *IndexOptions) SetExpireAfterSeconds(seconds int32) *IndexOptions + func (i *IndexOptions) SetLanguageOverride(override string) *IndexOptions + func (i *IndexOptions) SetMax(max float64) *IndexOptions + func (i *IndexOptions) SetMin(min float64) *IndexOptions + func (i *IndexOptions) SetName(name string) *IndexOptions + func (i *IndexOptions) SetPartialFilterExpression(expression interface{}) *IndexOptions + func (i *IndexOptions) SetSparse(sparse bool) *IndexOptions + func (i *IndexOptions) SetSphereVersion(version int32) *IndexOptions + func (i *IndexOptions) SetStorageEngine(engine interface{}) *IndexOptions + func (i *IndexOptions) SetTextVersion(version int32) *IndexOptions + func (i *IndexOptions) SetUnique(unique bool) *IndexOptions + func (i *IndexOptions) SetVersion(version int32) *IndexOptions + func (i *IndexOptions) SetWeights(weights interface{}) *IndexOptions + func (i *IndexOptions) SetWildcardProjection(wildcardProjection interface{}) *IndexOptions + type InsertManyOptions struct + BypassDocumentValidation *bool + Ordered *bool + func InsertMany() *InsertManyOptions + func MergeInsertManyOptions(opts ...*InsertManyOptions) *InsertManyOptions + func (imo *InsertManyOptions) SetBypassDocumentValidation(b bool) *InsertManyOptions + func (imo *InsertManyOptions) SetOrdered(b bool) *InsertManyOptions + type InsertOneOptions struct + BypassDocumentValidation *bool + func InsertOne() *InsertOneOptions + func MergeInsertOneOptions(opts ...*InsertOneOptions) *InsertOneOptions + func (ioo *InsertOneOptions) SetBypassDocumentValidation(b bool) *InsertOneOptions + type ListCollectionsOptions struct + NameOnly *bool + func ListCollections() *ListCollectionsOptions + func MergeListCollectionsOptions(opts ...*ListCollectionsOptions) *ListCollectionsOptions + func (lc *ListCollectionsOptions) SetNameOnly(b bool) *ListCollectionsOptions + type ListDatabasesOptions struct + NameOnly *bool + func ListDatabases() *ListDatabasesOptions + func MergeListDatabasesOptions(opts ...*ListDatabasesOptions) *ListDatabasesOptions + func (ld *ListDatabasesOptions) SetNameOnly(b bool) *ListDatabasesOptions + type ListIndexesOptions struct + BatchSize *int32 + MaxTime *time.Duration + func ListIndexes() *ListIndexesOptions + func MergeListIndexesOptions(opts ...*ListIndexesOptions) *ListIndexesOptions + func (l *ListIndexesOptions) SetBatchSize(i int32) *ListIndexesOptions + func (l *ListIndexesOptions) SetMaxTime(d time.Duration) *ListIndexesOptions + type MarshalError struct + Err error + Value interface{} + func (me MarshalError) Error() string + type NameOptions struct + Revision *int32 + func GridFSName() *NameOptions + func MergeNameOptions(opts ...*NameOptions) *NameOptions + func (n *NameOptions) SetRevision(r int32) *NameOptions + type ReplaceOptions struct + BypassDocumentValidation *bool + Collation *Collation + Upsert *bool + func MergeReplaceOptions(opts ...*ReplaceOptions) *ReplaceOptions + func Replace() *ReplaceOptions + func (ro *ReplaceOptions) SetBypassDocumentValidation(b bool) *ReplaceOptions + func (ro *ReplaceOptions) SetCollation(c *Collation) *ReplaceOptions + func (ro *ReplaceOptions) SetUpsert(b bool) *ReplaceOptions + type ReturnDocument int8 + const After + const Before + type RunCmdOptions struct + ReadPreference *readpref.ReadPref + func MergeRunCmdOptions(opts ...*RunCmdOptions) *RunCmdOptions + func RunCmd() *RunCmdOptions + func (rc *RunCmdOptions) SetReadPreference(rp *readpref.ReadPref) *RunCmdOptions + type SessionOptions struct + CausalConsistency *bool + DefaultMaxCommitTime *time.Duration + DefaultReadConcern *readconcern.ReadConcern + DefaultReadPreference *readpref.ReadPref + DefaultWriteConcern *writeconcern.WriteConcern + func MergeSessionOptions(opts ...*SessionOptions) *SessionOptions + func Session() *SessionOptions + func (s *SessionOptions) SetCausalConsistency(b bool) *SessionOptions + func (s *SessionOptions) SetDefaultMaxCommitTime(mct *time.Duration) *SessionOptions + func (s *SessionOptions) SetDefaultReadConcern(rc *readconcern.ReadConcern) *SessionOptions + func (s *SessionOptions) SetDefaultReadPreference(rp *readpref.ReadPref) *SessionOptions + func (s *SessionOptions) SetDefaultWriteConcern(wc *writeconcern.WriteConcern) *SessionOptions + type TransactionOptions struct + MaxCommitTime *time.Duration + ReadConcern *readconcern.ReadConcern + ReadPreference *readpref.ReadPref + WriteConcern *writeconcern.WriteConcern + func MergeTransactionOptions(opts ...*TransactionOptions) *TransactionOptions + func Transaction() *TransactionOptions + func (t *TransactionOptions) SetMaxCommitTime(mct *time.Duration) *TransactionOptions + func (t *TransactionOptions) SetReadConcern(rc *readconcern.ReadConcern) *TransactionOptions + func (t *TransactionOptions) SetReadPreference(rp *readpref.ReadPref) *TransactionOptions + func (t *TransactionOptions) SetWriteConcern(wc *writeconcern.WriteConcern) *TransactionOptions + type UpdateOptions struct + ArrayFilters *ArrayFilters + BypassDocumentValidation *bool + Collation *Collation + Upsert *bool + func MergeUpdateOptions(opts ...*UpdateOptions) *UpdateOptions + func Update() *UpdateOptions + func (uo *UpdateOptions) SetArrayFilters(af ArrayFilters) *UpdateOptions + func (uo *UpdateOptions) SetBypassDocumentValidation(b bool) *UpdateOptions + func (uo *UpdateOptions) SetCollation(c *Collation) *UpdateOptions + func (uo *UpdateOptions) SetUpsert(b bool) *UpdateOptions + type UploadOptions struct + ChunkSizeBytes *int32 + Metadata interface{} + Registry *bsoncodec.Registry + func GridFSUpload() *UploadOptions + func MergeUploadOptions(opts ...*UploadOptions) *UploadOptions + func (u *UploadOptions) SetChunkSizeBytes(i int32) *UploadOptions + func (u *UploadOptions) SetMetadata(doc interface{}) *UploadOptions