dbopt

package
v0.0.12 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	ReadConcern    *readconcern.ReadConcern
	WriteConcern   *writeconcern.WriteConcern
	ReadPreference *readpref.ReadPref
}

Database represents a database.

type DatabaseBundle

type DatabaseBundle struct {
	// contains filtered or unexported fields
}

DatabaseBundle is a bundle of database options.

func BundleDatabase

func BundleDatabase(opts ...Option) *DatabaseBundle

BundleDatabase bundles database options

func (*DatabaseBundle) ReadConcern

func (db *DatabaseBundle) ReadConcern(rc *readconcern.ReadConcern) *DatabaseBundle

ReadConcern sets the read concern.

func (*DatabaseBundle) ReadPreference

func (db *DatabaseBundle) ReadPreference(rp *readpref.ReadPref) *DatabaseBundle

ReadPreference sets the read preference.

func (*DatabaseBundle) String

func (db *DatabaseBundle) String() string

String implements the Stringer interface

func (*DatabaseBundle) Unbundle

func (db *DatabaseBundle) Unbundle() (*Database, error)

Unbundle unbundles the options, returning a collection.

func (*DatabaseBundle) WriteConcern

func (db *DatabaseBundle) WriteConcern(wc *writeconcern.WriteConcern) *DatabaseBundle

WriteConcern sets the write concern.

type DropDB

type DropDB interface {
	// contains filtered or unexported methods
}

DropDB represents all possible params for the dropDatabase() function

type DropDBSession

type DropDBSession interface {
	DropDB
	ConvertDropDBSession() *session.Client
}

DropDBSession is the session for the dropDatabase() function.

type DropDBSessionOpt

type DropDBSessionOpt struct{}

DropDBSessionOpt is a dropDatabase session option.

func (DropDBSessionOpt) ConvertDropDBSession

func (DropDBSessionOpt) ConvertDropDBSession() *session.Client

ConvertDropDBSession implements the DropDBSession interface.

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option represents a DB 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