core

package
v0.0.0-...-bd08887 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB interface {
	Insert(ctx context.Context, collection string, doc interface{}) (interface{}, error)
	Find(ctx context.Context, collection string, filter map[string]interface{}) (*mongo.Cursor, error)
	Update(ctx context.Context, collection string, filter map[string]interface{}, update bson.D) (int64, int64, error)
	Delete(ctx context.Context, collection string, filter map[string]interface{}) (int64, error)
}

DB is the core database interface

func NewDB

func NewDB() (DB, error)

NewDB returns an object implementing DB

Jump to

Keyboard shortcuts

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