Documentation ¶
Index ¶
- Variables
- func Client() *mongo.Client
- func DB(name string, opts ...*options.DatabaseOptions) *mongo.Database
- type A
- type AggregateOptions
- type ArrayFilters
- type AutoEncryptionOptions
- type Binary
- type BucketOptions
- type BulkWriteOptions
- type ChangeStreamOptions
- type ClientEncryptionOptions
- type ClientOptions
- type Collation
- type Collection
- type CollectionOptions
- type Config
- type ContextDialer
- type CountOptions
- type CreateCollectionOptions
- type CreateIndexesOptions
- type CreateViewOptions
- type Credential
- type Cursor
- type CursorType
- type D
- type DataKeyOptions
- type Database
- type DatabaseOptions
- type DateTime
- type Decimal128
- type DefaultIndexOptions
- type DeleteOptions
- type DistinctOptions
- type DropIndexesOptions
- type E
- type EncryptOptions
- type EstimatedDocumentCountOptions
- type FindOneAndDeleteOptions
- type FindOneAndReplaceOptions
- type FindOneAndUpdateOptions
- type FindOneOptions
- type FindOptions
- type FullDocument
- type GridFSFindOptions
- type IndexOptions
- type InsertManyOptions
- type InsertOneOptions
- type JavaScript
- type ListCollectionsOptions
- type ListDatabasesOptions
- type ListIndexesOptions
- type M
- type MarshalError
- type MaxKey
- type MinKey
- type Mongo
- type Monitor
- type NameOptions
- type Null
- type ObjectID
- type OptionFunc
- type Regex
- type ReplaceOptions
- type ReturnDocument
- type RunCmdOptions
- type SessionOptions
- type Symbol
- type Timestamp
- type TransactionOptions
- type Undefined
- type UpdateOptions
- type UploadOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrDecodeToNil = bson.ErrDecodeToNil ErrNilContext = bson.ErrNilContext ErrNilReader = bson.ErrNilReader ErrNilRegistry = bson.ErrNilRegistry ErrClientDisconnected = mongo.ErrClientDisconnected ErrEmptySlice = mongo.ErrEmptySlice ErrInvalidIndexValue = mongo.ErrInvalidIndexValue ErrMissingResumeToken = mongo.ErrMissingResumeToken ErrMultipleIndexDrop = mongo.ErrMultipleIndexDrop ErrNilCursor = mongo.ErrNilCursor ErrNilDocument = mongo.ErrNilDocument ErrNoDocuments = mongo.ErrNoDocuments ErrNonStringIndexName = mongo.ErrNonStringIndexName ErrUnacknowledgedWrite = mongo.ErrUnacknowledgedWrite ErrWrongClient = mongo.ErrWrongClient ErrParseNaN = primitive.ErrParseNaN ErrParseInf = primitive.ErrParseInf ErrParseNegInf = primitive.ErrParseNegInf )
View Source
var ( CompareTimestamp = primitive.CompareTimestamp NewDateTimeFromTime = primitive.NewDateTimeFromTime NewDecimal128 = primitive.NewDecimal128 ParseDecimal128 = primitive.ParseDecimal128 ParseDecimal128FromBigInt = primitive.ParseDecimal128FromBigInt NewObjectID = primitive.NewObjectID NewObjectIDFromTimestamp = primitive.NewObjectIDFromTimestamp ObjectIDFromHex = primitive.ObjectIDFromHex OptionAggregate = options.Aggregate OptionAutoEncryption = options.AutoEncryption OptionBulkWrite = options.BulkWrite OptionChangeStream = options.ChangeStream OptionClientEncryption = options.ClientEncryption OptionClient = options.Client OptionCollection = options.Collection OptionCount = options.Count OptionCreateCollection = options.CreateCollection OptionCreateIndexes = options.CreateIndexes OptionCreateView = options.CreateView OptionDataKey = options.DataKey OptionDatabase = options.Database OptionDefaultIndex = options.DefaultIndex OptionDelete = options.Delete OptionDistinct = options.Distinct OptionDropIndexes = options.DropIndexes OptionEncrypt = options.Encrypt OptionEstimatedDocumentCount = options.EstimatedDocumentCount OptionFindOneAndDelete = options.FindOneAndDelete OptionFindOneAndReplace = options.FindOneAndReplace OptionFindOneAndUpdate = options.FindOneAndUpdate OptionFindOne = options.FindOne OptionFind = options.Find OptionGridFSFind = options.GridFSFind OptionIndex = options.Index OptionInsertMany = options.InsertMany OptionInsertOne = options.InsertOne OptionListCollections = options.ListCollections OptionListDatabases = options.ListDatabases OptionListIndexes = options.ListIndexes OptionReplace = options.Replace OptionRunCmd = options.RunCmd OptionSession = options.Session OptionTransaction = options.Transaction OptionUpdate = options.Update )
View Source
var (
Default = StdConfig("default").Build()
)
Functions ¶
Types ¶
type AggregateOptions ¶
type AggregateOptions = options.AggregateOptions
type ArrayFilters ¶
type ArrayFilters = options.ArrayFilters
type AutoEncryptionOptions ¶
type AutoEncryptionOptions = options.AutoEncryptionOptions
type BucketOptions ¶
type BucketOptions = options.BucketOptions
type BulkWriteOptions ¶
type BulkWriteOptions = options.BulkWriteOptions
type ChangeStreamOptions ¶
type ChangeStreamOptions = options.ChangeStreamOptions
type ClientEncryptionOptions ¶
type ClientEncryptionOptions = options.ClientEncryptionOptions
type ClientOptions ¶
type ClientOptions = options.ClientOptions
type Collection ¶
type Collection = mongo.Collection
type CollectionOptions ¶
type CollectionOptions = options.CollectionOptions
type Config ¶
type Config struct { URI string `config:"uri" desc:"mongodb uri string."` EnableCommandMonitor bool `config:"commandMonitor"` EnablePoolMonitor bool `config:"poolMonitor"` // contains filtered or unexported fields }
func DefaultConfig ¶
func StdConfig ¶
func StdConfig(key string, optionFunc ...OptionFunc) *Config
type ContextDialer ¶
type ContextDialer = options.ContextDialer
type CountOptions ¶
type CountOptions = options.CountOptions
type CreateCollectionOptions ¶
type CreateCollectionOptions = options.CreateCollectionOptions
type CreateIndexesOptions ¶
type CreateIndexesOptions = options.CreateIndexesOptions
type CreateViewOptions ¶
type CreateViewOptions = options.CreateViewOptions
type Credential ¶
type Credential = options.Credential
type CursorType ¶
type CursorType = options.CursorType
type DataKeyOptions ¶
type DataKeyOptions = options.DataKeyOptions
type DatabaseOptions ¶
type DatabaseOptions = options.DatabaseOptions
type Decimal128 ¶
type Decimal128 = primitive.Decimal128
type DefaultIndexOptions ¶
type DefaultIndexOptions = options.DefaultIndexOptions
type DeleteOptions ¶
type DeleteOptions = options.DeleteOptions
type DistinctOptions ¶
type DistinctOptions = options.DistinctOptions
type DropIndexesOptions ¶
type DropIndexesOptions = options.DropIndexesOptions
type EncryptOptions ¶
type EncryptOptions = options.EncryptOptions
type EstimatedDocumentCountOptions ¶
type EstimatedDocumentCountOptions = options.EstimatedDocumentCountOptions
type FindOneAndDeleteOptions ¶
type FindOneAndDeleteOptions = options.FindOneAndDeleteOptions
type FindOneAndReplaceOptions ¶
type FindOneAndReplaceOptions = options.FindOneAndReplaceOptions
type FindOneAndUpdateOptions ¶
type FindOneAndUpdateOptions = options.FindOneAndUpdateOptions
type FindOneOptions ¶
type FindOneOptions = options.FindOneOptions
type FindOptions ¶
type FindOptions = options.FindOptions
type FullDocument ¶
type FullDocument = options.FullDocument
type GridFSFindOptions ¶
type GridFSFindOptions = options.GridFSFindOptions
type IndexOptions ¶
type IndexOptions = options.IndexOptions
type InsertManyOptions ¶
type InsertManyOptions = options.InsertManyOptions
type InsertOneOptions ¶
type InsertOneOptions = options.InsertOneOptions
type JavaScript ¶
type JavaScript = primitive.JavaScript
type ListCollectionsOptions ¶
type ListCollectionsOptions = options.ListCollectionsOptions
type ListDatabasesOptions ¶
type ListDatabasesOptions = options.ListDatabasesOptions
type ListIndexesOptions ¶
type ListIndexesOptions = options.ListIndexesOptions
type MarshalError ¶
type MarshalError = options.MarshalError
type NameOptions ¶
type NameOptions = options.NameOptions
type OptionFunc ¶
type OptionFunc func(*Config)
func WithMonitor ¶
func WithMonitor(monitor Monitor) OptionFunc
type ReplaceOptions ¶
type ReplaceOptions = options.ReplaceOptions
type ReturnDocument ¶
type ReturnDocument = options.ReturnDocument
type RunCmdOptions ¶
type RunCmdOptions = options.RunCmdOptions
type SessionOptions ¶
type SessionOptions = options.SessionOptions
type TransactionOptions ¶
type TransactionOptions = options.TransactionOptions
type UpdateOptions ¶
type UpdateOptions = options.UpdateOptions
type UploadOptions ¶
type UploadOptions = options.UploadOptions
Click to show internal directories.
Click to hide internal directories.