Documentation ¶
Index ¶
- type Collection
- type 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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.
Click to show internal directories.
Click to hide internal directories.