mongo

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NotFound = mongo.ErrNoDocuments.Error()
)

Functions

This section is empty.

Types

type Mgo

type Mgo interface {
	Insert(dbName, collectionName string, item interface{}) (string, error)
	Get(dbName, collectionName string, id int) ([]byte, error)
	GetByUuid(dbName, collectionName string, id string) ([]byte, error)
	GetOneByFiler(dbName, collectionName string, filter interface{}) ([]byte, error)
	GetByFilter(dbName, collectionName string, filter interface{}) ([][]byte, error)
	Update(dbName, collectionName string, item interface{}, id int64) (int, error)
	UpdateByUuid(dbName, collectionName string, item interface{}, id string) (int, error)
	UpdateWithFilter(dbName, collectionName string, item interface{}, filter interface{}) (int, error)
	Delete(dbName, collectionName string, id int) (int, error)
	DeleteByUuid(dbName, collectionName string, id string) (int, error)
	DeleteByFilter(dbName, collectionName string, filter interface{}) (int, error)
	GetId(dbName, collectionName string) int64
	GetClient() *mongo.Client
}

func InitializeMongo

func InitializeMongo(user, pass, database string) (Mgo, error)

Jump to

Keyboard shortcuts

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