package collectionopt
import "go.mongodb.org/mongo-driver/mongo/collectionopt"
Index ¶
- type Collection
- type CollectionBundle
- func BundleCollection(opts ...Option) *CollectionBundle
- func (cb *CollectionBundle) ReadConcern(rc *readconcern.ReadConcern) *CollectionBundle
- func (cb *CollectionBundle) ReadPreference(rp *readpref.ReadPref) *CollectionBundle
- func (cb *CollectionBundle) String() string
- func (cb *CollectionBundle) Unbundle() (*Collection, error)
- func (cb *CollectionBundle) WriteConcern(wc *writeconcern.WriteConcern) *CollectionBundle
- type Option
Types ¶
type Collection ¶
type Collection struct { ReadConcern *readconcern.ReadConcern WriteConcern *writeconcern.WriteConcern ReadPreference *readpref.ReadPref }
Collection represents a collection.
type CollectionBundle ¶
type CollectionBundle struct {
// contains filtered or unexported fields
}
CollectionBundle is a bundle of collection options.
func BundleCollection ¶
func BundleCollection(opts ...Option) *CollectionBundle
BundleCollection bundles collection options.
func (*CollectionBundle) ReadConcern ¶
func (cb *CollectionBundle) ReadConcern(rc *readconcern.ReadConcern) *CollectionBundle
ReadConcern sets the read concern.
func (*CollectionBundle) ReadPreference ¶
func (cb *CollectionBundle) ReadPreference(rp *readpref.ReadPref) *CollectionBundle
ReadPreference sets the read preference.
func (*CollectionBundle) String ¶
func (cb *CollectionBundle) String() string
String prints a string representation of the bundle for debug purposes
func (*CollectionBundle) Unbundle ¶
func (cb *CollectionBundle) Unbundle() (*Collection, error)
Unbundle unbundles the options, returning a collection.
func (*CollectionBundle) WriteConcern ¶
func (cb *CollectionBundle) WriteConcern(wc *writeconcern.WriteConcern) *CollectionBundle
WriteConcern sets the write concern.
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option represents a collection option.
func ReadConcern ¶
func ReadConcern(rc *readconcern.ReadConcern) Option
ReadConcern sets the read concern.
func ReadPreference ¶
ReadPreference sets the read preference.
func WriteConcern ¶
func WriteConcern(wc *writeconcern.WriteConcern) Option
WriteConcern sets the write concern.
Source Files ¶
collectionopt.go
- Version
- v0.0.10
- Published
- Jul 26, 2018
- Platform
- darwin/amd64
- Imports
- 4 packages
- Last checked
- 2 minutes ago –
Tools for package owners.