option

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregateOptioner

type AggregateOptioner interface {
	Optioner
	// contains filtered or unexported methods
}

AggregateOptioner is the interface implemented by types that can be used as Options for an Aggregate command.

type ChangeStreamOptioner

type ChangeStreamOptioner interface {
	Optioner
	// contains filtered or unexported methods
}

ChangeStreamOptioner is the interface implemented by types that can be used as Options for change stream operations.

type Collation

type Collation struct {
	Locale          string `bson:",omitempty"`
	CaseLevel       bool   `bson:",omitempty"`
	CaseFirst       string `bson:",omitempty"`
	Strength        int    `bson:",omitempty"`
	NumericOrdering bool   `bson:",omitempty"`
	Alternate       string `bson:",omitempty"`
	MaxVariable     string `bson:",omitempty"`
	Backwards       bool   `bson:",omitempty"`
}

Collation allows users to specify language-specific rules for string comparison, such as rules for lettercase and accent marks.

func (*Collation) MarshalBSONDocument

func (co *Collation) MarshalBSONDocument() (*bson.Document, error)

MarshalBSONDocument implements the bson.DocumentMarshaler interface.

type CountOptioner

type CountOptioner interface {
	Optioner
	// contains filtered or unexported methods
}

CountOptioner is the interface implemented by types that can be used as Options for Count commands.

type CreateIndexesOptioner

type CreateIndexesOptioner interface {
	Optioner
	// contains filtered or unexported methods
}

CreateIndexesOptioner is the interface implemented by types that can be used as Options for create_indexes operations.

type CursorOptioner

type CursorOptioner interface {
	Optioner
	// contains filtered or unexported methods
}

CursorOptioner is the interface implemented by types that can be used as Options for Cursor operations.

type CursorType

type CursorType int8

CursorType specifies whether a cursor should close when the last data is retrieved. See NonTailable, Tailable, and TailableAwait.

const (
	// NonTailable specifies that a cursor should close after retrieving the last data.
	NonTailable CursorType = iota
	// Tailable specifies that a cursor should not close when the last data is retrieved.
	Tailable
	// TailableAwait specifies that a cursor should not close when the last data is retrieved and
	// that it should block for a certain amount of time for new data before returning no data.
	TailableAwait
)

type DeleteOptioner

type DeleteOptioner interface {
	Optioner
	// contains filtered or unexported methods
}

DeleteOptioner is the interface implemented by types that can be used as Options for Delete commands.

type DistinctOptioner

type DistinctOptioner interface {
	Optioner
	// contains filtered or unexported methods
}

DistinctOptioner is the interface implemented by types that can be used as Options for Distinct commands.

type DropCollectionsOptioner added in v0.0.10

type DropCollectionsOptioner interface {
	Optioner
	// contains filtered or unexported methods
}

DropCollectionsOptioner is the interface implemented by types that can be used as Options for DropCollections operations.

type DropIndexesOptioner

type DropIndexesOptioner interface {
	Optioner
	// contains filtered or unexported methods
}

DropIndexesOptioner is the interface implemented by types that can be used as Options for drop_indexes operations.

type FindOneAndDeleteOptioner

type FindOneAndDeleteOptioner interface {
	Optioner
	// contains filtered or unexported methods
}

FindOneAndDeleteOptioner is the interface implemented by types that can be used as Options for FindOneAndDelete commands.

type FindOneAndReplaceOptioner

type FindOneAndReplaceOptioner interface {
	Optioner
	// contains filtered or unexported methods
}

FindOneAndReplaceOptioner is the interface implemented by types that can be used as Options for FindOneAndReplace commands.

type FindOneAndUpdateOptioner

type FindOneAndUpdateOptioner interface {
	Optioner
	// contains filtered or unexported methods
}

FindOneAndUpdateOptioner is the interface implemented by types that can be used as Options for FindOneAndUpdate commands.

type FindOneOptioner

type FindOneOptioner interface {
	Optioner
	// contains filtered or unexported methods
}

FindOneOptioner is the interface implemented by types that can be used as Options for FindOne operations.

type FindOptioner

type FindOptioner interface {
	Optioner
	// contains filtered or unexported methods
}

FindOptioner is the interface implemented by types that can be used as Options for Find commands.

type InsertManyOptioner

type InsertManyOptioner interface {
	InsertOptioner
	// contains filtered or unexported methods
}

InsertManyOptioner is the interface implemented by types that can be used as Options for InsertMany commands.

type InsertOneOptioner

type InsertOneOptioner interface {
	InsertOptioner
	// contains filtered or unexported methods
}

InsertOneOptioner is the interface implemented by types that can be used as Options for InsertOne commands.

type InsertOptioner

type InsertOptioner interface {
	Optioner
	// contains filtered or unexported methods
}

InsertOptioner is the interface implemented by types that can be used as Options for insert commands.

type ListCollectionsOptioner

type ListCollectionsOptioner interface {
	Optioner
	// contains filtered or unexported methods
}

ListCollectionsOptioner is the interface implemented by types that can be used as Options for ListCollections operations.

type ListDatabasesOptioner

type ListDatabasesOptioner interface {
	Optioner
	// contains filtered or unexported methods
}

ListDatabasesOptioner is the interface implemented by types that can be used as Options for ListDatabase operations.

type ListIndexesOptioner

type ListIndexesOptioner interface {
	Optioner
	// contains filtered or unexported methods
}

ListIndexesOptioner is the interface implemented by types that can be used as Options for list_indexes operations.

type MarshalError added in v0.0.15

type MarshalError struct {
	Value interface{}
	Err   error
}

MarshalError is returned when attempting to transform a value into a document results in an error.

func (MarshalError) Error added in v0.0.15

func (me MarshalError) Error() string

Error implements the error interface.

type OptAllowDiskUse

type OptAllowDiskUse bool

OptAllowDiskUse is for internal use.

func (OptAllowDiskUse) Option

func (opt OptAllowDiskUse) Option(d *bson.Document) error

Option implements the Optioner interface.

func (OptAllowDiskUse) String added in v0.0.9

func (opt OptAllowDiskUse) String() string

String implements the Stringer interface.

type OptAllowPartialResults

type OptAllowPartialResults bool

OptAllowPartialResults is for internal use.

func (OptAllowPartialResults) Option

func (opt OptAllowPartialResults) Option(d *bson.Document) error

Option implements the Optioner interface.

func (OptAllowPartialResults) String added in v0.0.9

func (opt OptAllowPartialResults) String() string

type OptArrayFilters

type OptArrayFilters struct {
	Registry *bsoncodec.Registry
	Filters  []interface{}
}

OptArrayFilters is for internal use. type OptArrayFilters []*bson.Document

func (OptArrayFilters) Option

func (opt OptArrayFilters) Option(d *bson.Document) error

Option implements the Optioner interface.

func (OptArrayFilters) String added in v0.0.9

func (opt OptArrayFilters) String() string

String implements the Stringer interface.

type OptBatchSize

type OptBatchSize int32

OptBatchSize is for internal use.

func (OptBatchSize) Option

func (opt OptBatchSize) Option(d *bson.Document) error

Option implements the Optioner interface.

func (OptBatchSize) String added in v0.0.9

func (opt OptBatchSize) String() string

String implements the Stringer interface.

type OptBypassDocumentValidation

type OptBypassDocumentValidation bool

OptBypassDocumentValidation is for internal use.

func (OptBypassDocumentValidation) Option

Option implements the Optioner interface.

func (OptBypassDocumentValidation) String added in v0.0.9

func (opt OptBypassDocumentValidation) String() string

String implements the Stringer interface.

type OptCollation

type OptCollation struct{ Collation *Collation }

OptCollation is for internal use.

func (OptCollation) Option

func (opt OptCollation) Option(d *bson.Document) error

Option implements the Optioner interface.

func (OptCollation) String added in v0.0.9

func (opt OptCollation) String() string

String implements the Stringer interface.

type OptComment

type OptComment string

OptComment is for internal use.

func (OptComment) Option

func (opt OptComment) Option(d *bson.Document) error

Option implements the Optioner interface.

func (OptComment) String added in v0.0.9

func (opt OptComment) String() string

String implements the Stringer interface.

type OptCursorType

type OptCursorType CursorType

OptCursorType is for internal use.

func (OptCursorType) Option

func (opt OptCursorType) Option(d *bson.Document) error

Option implements the Optioner interface.

func (OptCursorType) String added in v0.0.9

func (opt OptCursorType) String() string

String implements the Stringer interface.

type OptFields added in v0.0.9

type OptFields struct {
	Registry *bsoncodec.Registry
	Fields   interface{}
}

OptFields is for internal use.

func (OptFields) Option added in v0.0.9

func (opt OptFields) Option(d *bson.Document) error

Option implements the Optioner interface.

func (OptFields) String added in v0.0.9

func (opt OptFields) String() string

String implements the Stringer interface.

type OptFullDocument

type OptFullDocument string

OptFullDocument is for internal use.

func (OptFullDocument) Option

func (opt OptFullDocument) Option(d *bson.Document) error

Option implements the Optioner interface.

func (OptFullDocument) String added in v0.0.9

func (opt OptFullDocument) String() string

String implements the Stringer interface.

type OptHint

type OptHint struct{ Hint interface{} }

OptHint is for internal use.

func (OptHint) Option

func (opt OptHint) Option(d *bson.Document) error

Option implements the Optioner interface.

func (OptHint) String added in v0.0.9

func (opt OptHint) String() string

String implements the Stringer interface.

type OptLimit

type OptLimit int64

OptLimit is for internal use.

func (OptLimit) Option

func (opt OptLimit) Option(d *bson.Document) error

Option implements the Optioner interface.

func (OptLimit) String added in v0.0.9

func (opt OptLimit) String() string

String implements the Stringer interface.

type OptMax

type OptMax struct {
	Registry *bsoncodec.Registry
	Max      interface{}
}

OptMax is for internal use.

func (OptMax) Option

func (opt OptMax) Option(d *bson.Document) error

Option implements the Optioner interface.

func (OptMax) String added in v0.0.9

func (opt OptMax) String() string

String implements the Stringer interface.

type OptMaxAwaitTime

type OptMaxAwaitTime time.Duration

OptMaxAwaitTime is for internal use.

func (OptMaxAwaitTime) Option

func (opt OptMaxAwaitTime) Option(d *bson.Document) error

Option implements the Optioner interface.

func (OptMaxAwaitTime) String added in v0.0.9

func (opt OptMaxAwaitTime) String() string

String implements the Stringer interface.

type OptMaxScan

type OptMaxScan int64

OptMaxScan is for internal use.

func (OptMaxScan) Option

func (opt OptMaxScan) Option(d *bson.Document) error

Option implements the Optioner interface.

func (OptMaxScan) String added in v0.0.9

func (opt OptMaxScan) String() string

String implements the Stringer interface.

type OptMaxTime

type OptMaxTime time.Duration

OptMaxTime is for internal use.

func (OptMaxTime) Option

func (opt OptMaxTime) Option(d *bson.Document) error

Option implements the Optioner interface.

func (OptMaxTime) String added in v0.0.9

func (opt OptMaxTime) String() string

String implements the Stringer interface.

type OptMin

type OptMin struct {
	Registry *bsoncodec.Registry
	Min      interface{}
}

OptMin is for internal use.

func (OptMin) Option

func (opt OptMin) Option(d *bson.Document) error

Option implements the Optioner interface.

func (OptMin) String added in v0.0.9

func (opt OptMin) String() string

String implements the Stringer interface.

type OptNameOnly

type OptNameOnly bool

OptNameOnly is for internal use.

func (OptNameOnly) Option

func (opt OptNameOnly) Option(d *bson.Document) error

Option implements the Optioner interface.

func (OptNameOnly) String added in v0.0.9

func (opt OptNameOnly) String() string

String implements the Stringer interface.

type OptNoCursorTimeout

type OptNoCursorTimeout bool

OptNoCursorTimeout is for internal use.

func (OptNoCursorTimeout) Option

func (opt OptNoCursorTimeout) Option(d *bson.Document) error

Option implements the Optioner interface.

func (OptNoCursorTimeout) String added in v0.0.9

func (opt OptNoCursorTimeout) String() string

String implements the Stringer interface.

type OptOplogReplay

type OptOplogReplay bool

OptOplogReplay is for internal use.

func (OptOplogReplay) Option

func (opt OptOplogReplay) Option(d *bson.Document) error

Option implements the Optioner interface.

func (OptOplogReplay) String added in v0.0.9

func (opt OptOplogReplay) String() string

String implements the Stringer interface.

type OptOrdered

type OptOrdered bool

OptOrdered is for internal use.

func (OptOrdered) Option

func (opt OptOrdered) Option(d *bson.Document) error

Option implements the Optioner interface.

func (OptOrdered) String added in v0.0.9

func (opt OptOrdered) String() string

String implements the Stringer interface.

type OptProjection

type OptProjection struct {
	Registry   *bsoncodec.Registry
	Projection interface{}
}

OptProjection is for internal use.

func (OptProjection) Option

func (opt OptProjection) Option(d *bson.Document) error

Option implements the Optioner interface.

func (OptProjection) String added in v0.0.9

func (opt OptProjection) String() string

String implements the Stringer interface.

type OptResumeAfter

type OptResumeAfter struct{ ResumeAfter *bson.Document }

OptResumeAfter is for internal use.

func (OptResumeAfter) Option

func (opt OptResumeAfter) Option(d *bson.Document) error

Option implements the Optioner interface.

func (OptResumeAfter) String added in v0.0.9

func (opt OptResumeAfter) String() string

String implements the Stringer interface.

type OptReturnDocument

type OptReturnDocument ReturnDocument

OptReturnDocument is for internal use.

func (OptReturnDocument) Option

func (opt OptReturnDocument) Option(d *bson.Document) error

Option implements the Optioner interface.

func (OptReturnDocument) String added in v0.0.9

func (opt OptReturnDocument) String() string

String implements the Stringer interface.

type OptReturnKey

type OptReturnKey bool

OptReturnKey is for internal use.

func (OptReturnKey) Option

func (opt OptReturnKey) Option(d *bson.Document) error

Option implements the Optioner interface.

func (OptReturnKey) String added in v0.0.9

func (opt OptReturnKey) String() string

String implements the Stringer interface.

type OptShowRecordID

type OptShowRecordID bool

OptShowRecordID is for internal use.

func (OptShowRecordID) Option

func (opt OptShowRecordID) Option(d *bson.Document) error

Option implements the Optioner interface.

func (OptShowRecordID) String added in v0.0.9

func (opt OptShowRecordID) String() string

String implements the Stringer interface.

type OptSkip

type OptSkip int64

OptSkip is for internal use.

func (OptSkip) Option

func (opt OptSkip) Option(d *bson.Document) error

Option implements the Optioner interface.

func (OptSkip) String added in v0.0.9

func (opt OptSkip) String() string

String implements the Stringer interface.

type OptSnapshot

type OptSnapshot bool

OptSnapshot is for internal use.

func (OptSnapshot) Option

func (opt OptSnapshot) Option(d *bson.Document) error

Option implements the Optioner interface.

func (OptSnapshot) String added in v0.0.9

func (opt OptSnapshot) String() string

String implements the Stringer interface.

type OptSort

type OptSort struct {
	Registry *bsoncodec.Registry
	Sort     interface{}
}

OptSort is for internal use.

func (OptSort) Option

func (opt OptSort) Option(d *bson.Document) error

Option implements the Optioner interface.

func (OptSort) String added in v0.0.9

func (opt OptSort) String() string

String implements the Stringer interface.

type OptUpsert

type OptUpsert bool

OptUpsert is for internal use.

func (OptUpsert) Option

func (opt OptUpsert) Option(d *bson.Document) error

Option implements the Optioner interface.

func (OptUpsert) String added in v0.0.9

func (opt OptUpsert) String() string

String implements the Stringer interface.

type Optioner

type Optioner interface {
	Option(*bson.Document) error
	String() string
}

Optioner is the interface implemented by types that can be used as options to a command.

type ReplaceOptioner

type ReplaceOptioner interface {
	UpdateOptioner
	// contains filtered or unexported methods
}

ReplaceOptioner is the interface implemented by types that can be used as Options for Update commands.

type ReturnDocument

type ReturnDocument int8

ReturnDocument specifies whether a findAndUpdate operation should return the document as it was before the update or as it is after the update.

const (
	// Before specifies that findAndUpdate should return the document as it was before the update.
	Before ReturnDocument = iota
	// After specifies that findAndUpdate should return the document as it is after the update.
	After
)

type UpdateOptioner

type UpdateOptioner interface {
	Optioner
	// contains filtered or unexported methods
}

UpdateOptioner is the interface implemented by types that can be used as Options for Update commands.

Jump to

Keyboard shortcuts

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