Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MongoStoreDefaultQuery = bson.M{"overflow": false} MongoStoreOverflowQuery = bson.M{"overflow": true} MongoStoreToOverflowModifier = bson.M{"$set": bson.M{"overflow": true}} MongoStoreToDefaultModifier = bson.M{"$set": bson.M{"overflow": false}} MongoStoreToDefaultChange = mgo.Change{ Update: bson.M{"$set": bson.M{"overflow": false}}, } )
View Source
var ( ErrNoItems = errors.New("no items") ErrNoOverflowItems = errors.New("no overflow items") )
Functions ¶
This section is empty.
Types ¶
type Item ¶
type MongoStore ¶
type MongoStore struct { S *mgo.Session C *mgo.Collection }
func NewMongoStore ¶
func NewMongoStore(session *mgo.Session) *MongoStore
func (*MongoStore) Del ¶
func (s *MongoStore) Del(item Item) (err error)
func (*MongoStore) Get ¶
func (s *MongoStore) Get() (item Item, err error)
func (*MongoStore) Init ¶
func (s *MongoStore) Init() (err error)
func (*MongoStore) Put ¶
func (s *MongoStore) Put(item Item) (err error)
func (*MongoStore) Size ¶
func (s *MongoStore) Size() (n int, err error)
Click to show internal directories.
Click to hide internal directories.