mongodb

package
v0.0.0-...-55fbde6 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoStore

type MongoStore struct {
	datastore.Datastore
	// contains filtered or unexported fields
}

MongoStore is the struct for the MongoDB driver

func New

func New(host, port, username, password string) (*MongoStore, error)

New returns a pointer to a MongoStore struct or an error

func (MongoStore) Find

func (m MongoStore) Find(queryStr string, callback datastore.ResultCallback)

Find finds data in mongo

func (MongoStore) FindAndUpdate

func (m MongoStore) FindAndUpdate(queryStr string, update interface{}, callback datastore.ResultCallback)

FindAndUpdate updates data and returns it from mongo

func (MongoStore) Remove

func (m MongoStore) Remove(queryStr string, callback datastore.NoResultCallback)

Remove removes data from mongo

func (MongoStore) Save

func (m MongoStore) Save(key string, data interface{}, callback datastore.NoResultCallback)

Save saves data in mongo

func (MongoStore) Update

func (m MongoStore) Update(queryStr string, update interface{}, callback datastore.NoResultCallback)

Update updates data in mongo

Jump to

Keyboard shortcuts

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