persistence

package
v0.0.0-...-30d5ca0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Booking

type Booking struct {
	Date    int64
	EventID []byte
	Seats   int
}

type DatabaseHandler

type DatabaseHandler interface {
	AddEvent(Event) ([]byte, error)
}

type Event

type Event struct {
	ID        bson.ObjectID `bson:"_id"`
	Name      string
	Duration  int
	StartDate int64
	EndDate   int64
	Location  Location
}

type Hall

type Hall struct {
	Name     string `json:"name"`
	Location string `json:"location,omitempty"`
	Capacity int    `json:"capacity"`
}

type Location

type Location struct {
	ID        bson.ObjectID `bson:"_id"`
	Name      string
	Address   string
	Country   string
	OpenTime  int
	CloseTime int
	Halls     []Hall
}

type User

type User struct {
	ID       bson.ObjectID `bson:"_id"`
	First    string
	Last     string
	Age      int
	Bookings []Booking
}

func (*User) String

func (u *User) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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