collectionopt

package
v0.0.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 8, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

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

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

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

func ReadPreference(rp *readpref.ReadPref) Option

ReadPreference sets the read preference.

func WriteConcern

func WriteConcern(wc *writeconcern.WriteConcern) Option

WriteConcern sets the write concern.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL