Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DB .. DB = "micro_events" // USERS ... USERS = "users" // EVENTS ... EVENTS = "events" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { ID bson.ObjectId `bson:"_id"` Name string Duration int StartDate int64 EndDate int64 Location Location }
Event ...
type Hall ¶
type Hall struct { ID bson.ObjectId `bson:"_id"` Name string `json:"name"` Location string `json:"location,omitempty"` Capacity int `json:"capacity"` }
Hall ...
type Location ¶
type Location struct { ID bson.ObjectId `bson:"_id"` Name string Address string Country string OpenTime int CloseTime int Halls []Hall }
Location ...
type MongoDBLayer ¶
type MongoDBLayer struct {
// contains filtered or unexported fields
}
MongoDBLayer ...
func (*MongoDBLayer) AddEvent ¶
func (m *MongoDBLayer) AddEvent(e Event) (Event, error)
AddEvent ...
func (*MongoDBLayer) FindAllAvailableEvents ¶
func (m *MongoDBLayer) FindAllAvailableEvents() ([]Event, error)
FindAllAvailableEvents ...
func (*MongoDBLayer) FindEvent ¶
func (m *MongoDBLayer) FindEvent(id []byte) (Event, error)
FindEvent ...
func (*MongoDBLayer) FindEventByName ¶
func (m *MongoDBLayer) FindEventByName(name string) (Event, error)
FindEventByName ...
Click to show internal directories.
Click to hide internal directories.