package
1.3.0
Repository: https://github.com/ddspog/mongo.git
Documentation: pkg.go.dev

# README

elements GoDoc Go Report Card Commitizen friendly

Overview

Package elements defines new interfaces for mgo objects.

This package creates interfaces that represents the mgo package main objects. These interfaces would be used between themselves, allowing easy mocking on the objects.

# Functions

NewChangeInfo creates a new embedded ChangeInfo, with all attributes for class.
NewDatabaseInfo creates a new simplified DialInfo, with only Database attribute set.
NewDialInfo creates a new embedded DialInfo, with all attributes for class.
NewRemoveInfo creates a new embedded ChangeInfo, with all attributes returned on calls to Remove.

# Structs

ChangeInfo it's an embedded type of mgo.ChangeInfo, made to reduce importing to this package only, since it's necessary on other functions.
DialInfo it's an embedded type of mgo.DialInfo, made to reduce importing to this package only, since it's necessary on other functions.

# Interfaces

Collectioner is the interface that tries to enumerate all methods that mgo.Collection have, with the difference of using the interfaces on this package, instead of mgo.Collection, mgo.Database and mgo.Query.
Databaser is the interface that tries to enumerate all methods that mgo.Database have, with the difference of using the interfaces on this package, instead of mgo.Collection, mgo.Database and mgo.Query.
Querier is the interface that tries to enumerate all methods that mgo.Query have, with the difference of using the interfaces on this package, instead of mgo.Collection, mgo.Database and mgo.Query.
Sessioner is the interface that tries to enumerate some methods that mgo.Session have, with the difference of using the interfaces on this package, instead of mgo.Collection, mgo.Database and mgo.Query.