Versions in this module Expand all Collapse all v0 v0.11.0 Jan 19, 2023 Changes in this version + type CollectionStats struct + AvgObjSize float64 + Count int64 + FreeStorageSize int64 + Nindexes int64 + Ns string + NumOrphanDocs int64 + Size int64 + StorageSize int64 + TotalIndexSize int64 + TotalSize int64 + type Config struct + ConnectionString string + DatabaseName string + type DBStats struct + AvgObjSize float64 + Collections int64 + DataSize int64 + Db string + FreeStorageSize int64 + FsTotalSize int64 + FsUsedSize int64 + IndexFreeStorageSize int64 + IndexSize int64 + Indexes int64 + Objects int64 + ScaleFactor int64 + StorageSize int64 + TotalFreeStorageSize int64 + TotalSize int64 + Views int64 + type Instance interface + Count func(ctx context.Context, collectionName string, query []byte) (int64, error) + Find func(ctx context.Context, collectionName string, query []byte, limit int64, ...) ([]bson.D, error) + FindOne func(ctx context.Context, collectionName, filter string) (*bson.M, error) + GetDBCollectionNames func(ctx context.Context) ([]string, error) + GetDBCollectionStats func(ctx context.Context, collectionName string) (*CollectionStats, error) + GetDBStats func(ctx context.Context) (*DBStats, error) + GetName func() string + func New(name string, options map[string]any) (Instance, error)