Documentation ¶
Index ¶
- Constants
- func NewMongoDBLayer(connection string) (persistence.DatabaseHandler, error)
- type MongoDBLayer
- func (mgoLayer *MongoDBLayer) AddBookingForUser(id []byte, bk persistence.Booking) error
- func (mgoLayer *MongoDBLayer) AddEvent(e persistence.Event) ([]byte, error)
- func (mgoLayer *MongoDBLayer) AddLocation(l persistence.Location) (persistence.Location, error)
- func (mgoLayer *MongoDBLayer) AddUser(u persistence.User) ([]byte, error)
- func (mgoLayer *MongoDBLayer) FindAllAvailableEvents() ([]persistence.Event, error)
- func (l *MongoDBLayer) FindAllLocations() ([]persistence.Location, error)
- func (mgoLayer *MongoDBLayer) FindBookingsForUser(id []byte) ([]persistence.Booking, error)
- func (mgoLayer *MongoDBLayer) FindEvent(id []byte) (persistence.Event, error)
- func (mgoLayer *MongoDBLayer) FindEventByName(name string) (persistence.Event, error)
- func (l *MongoDBLayer) FindLocation(id string) (persistence.Location, error)
- func (mgoLayer *MongoDBLayer) FindUser(f string, l string) (persistence.User, error)
Constants ¶
View Source
const ( DB = "myevents" USERS = "users" EVENTS = "events" LOCATIONS = "locations" )
Variables ¶
This section is empty.
Functions ¶
func NewMongoDBLayer ¶
func NewMongoDBLayer(connection string) (persistence.DatabaseHandler, error)
Types ¶
type MongoDBLayer ¶
type MongoDBLayer struct {
// contains filtered or unexported fields
}
func (*MongoDBLayer) AddBookingForUser ¶
func (mgoLayer *MongoDBLayer) AddBookingForUser(id []byte, bk persistence.Booking) error
func (*MongoDBLayer) AddEvent ¶
func (mgoLayer *MongoDBLayer) AddEvent(e persistence.Event) ([]byte, error)
func (*MongoDBLayer) AddLocation ¶
func (mgoLayer *MongoDBLayer) AddLocation(l persistence.Location) (persistence.Location, error)
func (*MongoDBLayer) AddUser ¶
func (mgoLayer *MongoDBLayer) AddUser(u persistence.User) ([]byte, error)
func (*MongoDBLayer) FindAllAvailableEvents ¶
func (mgoLayer *MongoDBLayer) FindAllAvailableEvents() ([]persistence.Event, error)
func (*MongoDBLayer) FindAllLocations ¶
func (l *MongoDBLayer) FindAllLocations() ([]persistence.Location, error)
func (*MongoDBLayer) FindBookingsForUser ¶
func (mgoLayer *MongoDBLayer) FindBookingsForUser(id []byte) ([]persistence.Booking, error)
func (*MongoDBLayer) FindEvent ¶
func (mgoLayer *MongoDBLayer) FindEvent(id []byte) (persistence.Event, error)
func (*MongoDBLayer) FindEventByName ¶
func (mgoLayer *MongoDBLayer) FindEventByName(name string) (persistence.Event, error)
func (*MongoDBLayer) FindLocation ¶
func (l *MongoDBLayer) FindLocation(id string) (persistence.Location, error)
func (*MongoDBLayer) FindUser ¶
func (mgoLayer *MongoDBLayer) FindUser(f string, l string) (persistence.User, error)
Click to show internal directories.
Click to hide internal directories.