mongolayer

package
v0.0.0-...-c80787b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL