mongo

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

README

Koverto - Mongo

FOSSA Status

Simplified wrapper for the official MongoDB client library.

Copyright © 2020 Jesse B. Hannah. Licensed under the GNU GPL version 3 or later.

License

FOSSA Status

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Collection(string, ...*options.CollectionOptions) *mongo.Collection
	Connect() error
	Database() *mongo.Database
	DefineIndexes(...IndexSet)
}

func NewClient

func NewClient(uri string, dbName string) (Client, error)

type IndexSet

type IndexSet struct {
	Collection string
	Indexes    []mongo.IndexModel
}

func NewIndexSet

func NewIndexSet(collection string, indexes ...mongo.IndexModel) IndexSet

Jump to

Keyboard shortcuts

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