Documentation ¶
Index ¶
- type Database
- type DatabaseBundle
- func (db *DatabaseBundle) ReadConcern(rc *readconcern.ReadConcern) *DatabaseBundle
- func (db *DatabaseBundle) ReadPreference(rp *readpref.ReadPref) *DatabaseBundle
- func (db *DatabaseBundle) String() string
- func (db *DatabaseBundle) Unbundle() (*Database, error)
- func (db *DatabaseBundle) WriteConcern(wc *writeconcern.WriteConcern) *DatabaseBundle
- type DropDB
- type DropDBSession
- type DropDBSessionOpt
- type Option
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
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 ¶
ReadPreference sets the read preference.
func WriteConcern ¶
func WriteConcern(wc *writeconcern.WriteConcern) Option
WriteConcern sets the write concern.