mongodb

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DatabaseName = "bowa"

Variables

View Source
var (
	ErrFailedCreatingDBClient = errors.New("failed creating a DB client")
	ErrFailedConnecting       = errors.New("failed connecting to the DB")
)

Functions

This section is empty.

Types

type Access

type Access struct {
	// contains filtered or unexported fields
}

func NewDBAccess

func NewDBAccess(uri string) (*Access, error)

NewDBAccess creates a new DBAccess, connect to the database

func (*Access) Collection

func (a *Access) Collection(name string) *mongo.Collection

func (*Access) CreateIndexes

func (a *Access) CreateIndexes(ctx context.Context, coll string, models []mongo.IndexModel) error

Jump to

Keyboard shortcuts

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