Documentation ¶
Index ¶
- type MongoStore
- func (m MongoStore) Find(queryStr string, callback datastore.ResultCallback)
- func (m MongoStore) FindAndUpdate(queryStr string, update interface{}, callback datastore.ResultCallback)
- func (m MongoStore) Remove(queryStr string, callback datastore.NoResultCallback)
- func (m MongoStore) Save(key string, data interface{}, callback datastore.NoResultCallback)
- func (m MongoStore) Update(queryStr string, update interface{}, callback datastore.NoResultCallback)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoStore ¶
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
Click to show internal directories.
Click to hide internal directories.