Documentation ¶
Index ¶
- func Aggregate(data AggregateData, destination any) error
- func Connect(config *Config) error
- func Context(timeout int64) (context.Context, context.CancelFunc)
- func Count(data CountData) (int64, error)
- func Disconnect() error
- func Distinct(data DistinctData) ([]any, error)
- func DropIndexes(data []IndexData) error
- func EnsureIndexes(data []IndexData) error
- func Find(data FindData, destination any) error
- func FindOne(data FindOneData, destination Document) error
- func FindOneBy(data FindOneByData, destination Document) error
- func ListIndexes(data ListIndexesData, destination any) error
- type AggregateData
- type AggregateOptions
- type Array
- type Binary
- type Client
- type Collation
- type Collection
- type Config
- type CountData
- type CountOptions
- type CursorType
- type Database
- type DateTime
- type Decimal128
- type DeleteData
- type DeleteManyData
- type DeleteManyOptions
- type DeleteManyResult
- type DeleteOptions
- type DeleteResult
- type DistinctData
- type DistinctOptions
- type Document
- type FindData
- type FindOneByData
- type FindOneData
- type FindOneOptions
- type FindOptions
- type IndexData
- type IndexOptions
- type InsertData
- type InsertManyData
- type InsertManyOptions
- type InsertManyResult
- type InsertOptions
- type InsertResult
- type Item
- type JavaScript
- type List
- type ListIndexesData
- type Map
- type MaxKey
- type MinKey
- type Null
- type ObjectID
- type Pipeline
- type Regex
- type Timestamp
- type UpdateData
- type UpdateManyData
- type UpdateManyOptions
- type UpdateManyResult
- type UpdateOptions
- type UpdateResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Aggregate ¶ added in v0.0.2
func Aggregate(data AggregateData, destination any) error
Aggregate method
func EnsureIndexes ¶ added in v0.0.14
EnsureIndexes method
func FindOne ¶ added in v0.0.11
func FindOne(data FindOneData, destination Document) error
FindOne method
func FindOneBy ¶ added in v0.0.11
func FindOneBy(data FindOneByData, destination Document) error
FindOneBy method
func ListIndexes ¶ added in v0.0.15
func ListIndexes(data ListIndexesData, destination any) error
ListIndexes method
Types ¶
type AggregateData ¶ added in v0.0.6
type AggregateData struct { Collection string Pipeline Pipeline Options *AggregateOptions }
AggregateData struct
type AggregateOptions ¶ added in v0.0.2
type AggregateOptions = options.AggregateOptions
AggregateOptions struct
type Config ¶
type Config struct { URI string Database string OperationTimeout int64 MassOperationTimeout int64 IndexOperationTimeout int64 }
Config struct
type CountData ¶ added in v0.0.6
type CountData struct { Collection string Filters *Array Options *CountOptions }
CountData struct
type DeleteData ¶ added in v0.0.11
type DeleteData struct { Collection string Filters *Array Options *DeleteOptions }
DeleteData struct
type DeleteManyData ¶ added in v0.0.6
type DeleteManyData struct { Collection string Filters *Array Options *DeleteManyOptions }
DeleteManyData struct
type DeleteManyOptions ¶ added in v0.0.6
type DeleteManyOptions = options.DeleteOptions
DeleteManyOptions struct
type DeleteManyResult ¶ added in v0.0.6
type DeleteManyResult = mongo.DeleteResult
DeleteManyResult struct
func DeleteMany ¶ added in v0.0.6
func DeleteMany(data DeleteManyData) (*DeleteManyResult, error)
DeleteMany method
type DeleteOptions ¶ added in v0.0.11
type DeleteOptions = options.DeleteOptions
DeleteOptions struct
type DistinctData ¶ added in v0.0.6
type DistinctData struct { Collection string Field string Filters *Array Options *DistinctOptions }
DistinctData struct
type DistinctOptions ¶ added in v0.0.6
type DistinctOptions = options.DistinctOptions
DistinctOptions struct
type FindData ¶ added in v0.0.6
type FindData struct { Collection string Filters *Array Options *FindOptions }
FindData struct
type FindOneByData ¶ added in v0.0.11
type FindOneByData struct { Collection string Key string Value string Options *FindOneOptions }
FindOneByData struct
type FindOneData ¶ added in v0.0.11
type FindOneData struct { Collection string Filters *Array Options *FindOneOptions }
FindOneData struct
type FindOneOptions ¶ added in v0.0.11
type FindOneOptions = options.FindOneOptions
FindOneOptions struct
type IndexData ¶ added in v0.0.14
type IndexData struct { Collection string Name string Keys Document Options *IndexOptions }
IndexData struct
type InsertData ¶ added in v0.0.11
type InsertData struct { Collection string Document Document Options *InsertOptions }
InsertData struct
type InsertManyData ¶ added in v0.0.11
type InsertManyData struct { Collection string Documents []Document Options *InsertManyOptions }
InsertManyData struct
type InsertManyOptions ¶ added in v0.0.11
type InsertManyOptions = options.InsertManyOptions
InsertManyOptions struct
type InsertManyResult ¶ added in v0.0.11
type InsertManyResult = mongo.InsertManyResult
InsertManyResult struct
func InsertMany ¶ added in v0.0.11
func InsertMany(data InsertManyData) (*InsertManyResult, error)
InsertMany method
type InsertOptions ¶ added in v0.0.11
type InsertOptions = options.InsertOneOptions
InsertOptions struct
type ListIndexesData ¶ added in v0.0.15
type ListIndexesData struct {
Collection string
}
ListIndexesData struct
type UpdateData ¶ added in v0.0.11
type UpdateData struct { Collection string Filters *Array Updates Document Options *UpdateOptions }
UpdateData struct
type UpdateManyData ¶ added in v0.0.6
type UpdateManyData struct { Collection string Filters *Array Updates Document Options *UpdateManyOptions }
UpdateManyData struct
type UpdateManyOptions ¶ added in v0.0.6
type UpdateManyOptions = options.UpdateOptions
UpdateManyOptions struct
type UpdateManyResult ¶ added in v0.0.6
type UpdateManyResult = mongo.UpdateResult
UpdateManyResult struct
func UpdateMany ¶ added in v0.0.6
func UpdateMany(data UpdateManyData) (*UpdateManyResult, error)
UpdateMany method
type UpdateOptions ¶ added in v0.0.11
type UpdateOptions = options.UpdateOptions
UpdateOptions struct