mong

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractId

func ExtractId(doc bson.Raw) primitive.E

func IsDuplicateKeyError

func IsDuplicateKeyError(err error) bool

IsDuplicateKeyError checks if the error is a duplicate key error

func ListCollections

func ListCollections(ctx context.Context, db string, mongo *Mong) ([]string, error)

List the collections of a database

Types

type Mong

type Mong struct {
	// Keep the connection/client
	Client *mongo.Client
}

func NewMongo

func NewMongo(connectUri string) *Mong

NewMongo returns a new Mongo struct

type MongoRegistry

type MongoRegistry struct {
	// contains filtered or unexported fields
}
var Registry *MongoRegistry = NewMongoRegistry()

func NewMongoRegistry

func NewMongoRegistry() *MongoRegistry

func (*MongoRegistry) GetSource

func (m *MongoRegistry) GetSource() *Mong

func (*MongoRegistry) GetTarget

func (m *MongoRegistry) GetTarget() *Mong

Jump to

Keyboard shortcuts

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