dbopt

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 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 added in v0.0.10

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

DropDB represents all possible params for the dropDatabase() function

type DropDBSession added in v0.0.10

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

DropDBSession is the session for the dropDatabase() function.

type DropDBSessionOpt added in v0.0.10

type DropDBSessionOpt struct{}

DropDBSessionOpt is a dropDatabase session option.

func (DropDBSessionOpt) ConvertDropDBSession added in v0.0.10

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