lMongo

package module
v0.0.0-...-7334535 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateIndex

func CreateIndex(coll *mongo.Collection, keys bson.D)

func CreateSimpleIndex

func CreateSimpleIndex(coll *mongo.Collection, keys []string)

func Get

func Get(cfg *Config) (client *mongo.Client)

func Sample

func Sample(coll *mongo.Collection, num int, match bson.M, proj bson.D) (res []bson.M, err error)

Types

type Config

type Config struct {
	CTX context.Context
	URI string
}

func (*Config) GetURI

func (c *Config) GetURI() string

Jump to

Keyboard shortcuts

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