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 ¶ added in v1.0.0
type AggregateOptions = options.AggregateOptions
type ArrayFilters ¶ added in v1.0.0
type ArrayFilters = options.ArrayFilters
type AutoEncryptionOptions ¶ added in v1.0.0
type AutoEncryptionOptions = options.AutoEncryptionOptions
type BucketOptions ¶ added in v1.0.0
type BucketOptions = options.BucketOptions
type BulkWriteOptions ¶ added in v1.0.0
type BulkWriteOptions = options.BulkWriteOptions
type ChangeStreamOptions ¶ added in v1.0.0
type ChangeStreamOptions = options.ChangeStreamOptions
type ClientEncryptionOptions ¶ added in v1.0.0
type ClientEncryptionOptions = options.ClientEncryptionOptions
type ClientOptions ¶ added in v1.0.0
type ClientOptions = options.ClientOptions
type Collection ¶ added in v1.0.0
type Collection = mongo.Collection
type CollectionOptions ¶ added in v1.0.0
type CollectionOptions = options.CollectionOptions
type Config ¶ added in v1.0.0
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 ¶ added in v1.0.0
func StdConfig ¶ added in v1.0.0
func StdConfig(key string, optionFunc ...OptionFunc) *Config
type ContextDialer ¶ added in v1.0.0
type ContextDialer = options.ContextDialer
type CountOptions ¶ added in v1.0.0
type CountOptions = options.CountOptions
type CreateCollectionOptions ¶ added in v1.0.0
type CreateCollectionOptions = options.CreateCollectionOptions
type CreateIndexesOptions ¶ added in v1.0.0
type CreateIndexesOptions = options.CreateIndexesOptions
type CreateViewOptions ¶ added in v1.0.0
type CreateViewOptions = options.CreateViewOptions
type Credential ¶ added in v1.0.0
type Credential = options.Credential
type CursorType ¶ added in v1.0.0
type CursorType = options.CursorType
type DataKeyOptions ¶ added in v1.0.0
type DataKeyOptions = options.DataKeyOptions
type DatabaseOptions ¶ added in v1.0.0
type DatabaseOptions = options.DatabaseOptions
type Decimal128 ¶ added in v1.0.0
type Decimal128 = primitive.Decimal128
type DefaultIndexOptions ¶ added in v1.0.0
type DefaultIndexOptions = options.DefaultIndexOptions
type DeleteOptions ¶ added in v1.0.0
type DeleteOptions = options.DeleteOptions
type DistinctOptions ¶ added in v1.0.0
type DistinctOptions = options.DistinctOptions
type DropIndexesOptions ¶ added in v1.0.0
type DropIndexesOptions = options.DropIndexesOptions
type EncryptOptions ¶ added in v1.0.0
type EncryptOptions = options.EncryptOptions
type EstimatedDocumentCountOptions ¶ added in v1.0.0
type EstimatedDocumentCountOptions = options.EstimatedDocumentCountOptions
type FindOneAndDeleteOptions ¶ added in v1.0.0
type FindOneAndDeleteOptions = options.FindOneAndDeleteOptions
type FindOneAndReplaceOptions ¶ added in v1.0.0
type FindOneAndReplaceOptions = options.FindOneAndReplaceOptions
type FindOneAndUpdateOptions ¶ added in v1.0.0
type FindOneAndUpdateOptions = options.FindOneAndUpdateOptions
type FindOneOptions ¶ added in v1.0.0
type FindOneOptions = options.FindOneOptions
type FindOptions ¶ added in v1.0.0
type FindOptions = options.FindOptions
type FullDocument ¶ added in v1.0.0
type FullDocument = options.FullDocument
type GridFSFindOptions ¶ added in v1.0.0
type GridFSFindOptions = options.GridFSFindOptions
type IndexOptions ¶ added in v1.0.0
type IndexOptions = options.IndexOptions
type InsertManyOptions ¶ added in v1.0.0
type InsertManyOptions = options.InsertManyOptions
type InsertOneOptions ¶ added in v1.0.0
type InsertOneOptions = options.InsertOneOptions
type JavaScript ¶ added in v1.0.0
type JavaScript = primitive.JavaScript
type ListCollectionsOptions ¶ added in v1.0.0
type ListCollectionsOptions = options.ListCollectionsOptions
type ListDatabasesOptions ¶ added in v1.0.0
type ListDatabasesOptions = options.ListDatabasesOptions
type ListIndexesOptions ¶ added in v1.0.0
type ListIndexesOptions = options.ListIndexesOptions
type MarshalError ¶ added in v1.0.0
type MarshalError = options.MarshalError
type Mongo ¶
type Mongo struct {
// contains filtered or unexported fields
}
type NameOptions ¶ added in v1.0.0
type NameOptions = options.NameOptions
type OptionFunc ¶
type OptionFunc func(*Config)
func WithMonitor ¶ added in v1.0.0
func WithMonitor(monitor Monitor) OptionFunc
type ReplaceOptions ¶ added in v1.0.0
type ReplaceOptions = options.ReplaceOptions
type ReturnDocument ¶ added in v1.0.0
type ReturnDocument = options.ReturnDocument
type RunCmdOptions ¶ added in v1.0.0
type RunCmdOptions = options.RunCmdOptions
type SessionOptions ¶ added in v1.0.0
type SessionOptions = options.SessionOptions
type TransactionOptions ¶ added in v1.0.0
type TransactionOptions = options.TransactionOptions
type UpdateOptions ¶ added in v1.0.0
type UpdateOptions = options.UpdateOptions
type UploadOptions ¶ added in v1.0.0
type UploadOptions = options.UploadOptions
Click to show internal directories.
Click to hide internal directories.