mongow

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertInsertedIds

func ConvertInsertedIds(res *mongo.InsertManyResult) ([]string, error)

func NewObjectIdFromString

func NewObjectIdFromString(id string) (interface{}, error)

Types

type MongoClient

type MongoClient interface {
	Disconnect(ctx context.Context)
	DB(name string) (MongoDB, error)
}

func NewClient

func NewClient(ctx context.Context, connStr string, timeout time.Duration) (MongoClient, error)

type MongoDB

type MongoDB interface {
	Collection(name string) (*mongo.Collection, error)
}

Jump to

Keyboard shortcuts

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