Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DB constant represents db name DB = "myevents" // USERS constant represents db users collection USERS = "users" // EVENTS constant represents db events collection EVENTS = "events" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MongoDBStore ¶
type MongoDBStore struct {
// contains filtered or unexported fields
}
MongoDBStore describes a mongodb store
func (*MongoDBStore) AddEvent ¶
func (mgoStr *MongoDBStore) AddEvent(evt store.Event) ([]byte, error)
AddEvent add an event to mongoDB
func (*MongoDBStore) FindAllEvents ¶
func (mgoStr *MongoDBStore) FindAllEvents() ([]store.Event, error)
FindAllEvents returns all events
func (*MongoDBStore) FindEvent ¶
func (mgoStr *MongoDBStore) FindEvent(id []byte) (store.Event, error)
FindEvent finds an event with id
func (*MongoDBStore) FindEventByName ¶
func (mgoStr *MongoDBStore) FindEventByName(name string) (store.Event, error)
FindEventByName finds an event with name
Click to show internal directories.
Click to hide internal directories.