Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
Create creates a new event in the database. It also do some formatting operations on some values such as the date and time to convert them to a common and parsable format
func GetCitiesWithEvents ¶
GetCitiesWithEvents returns a slice of strings which contains cities that are in the database, meaning cities with future, present or past events
func GetEventCreatorID ¶
GetEventCreatorID returns the created_by field associated to an event id
func GetNumOfEvents ¶
GetNumOfEvents returns the total number of events in the database
Types ¶
type Event ¶
type Event struct { City string Address string Date string Time string Description string Organizer string Link string MapLink string ID string CreatedBy string }
func GetAllEvents ¶
func GetEventByID ¶
GetEventByID returns a single event from the database identified by its ID. We also need to specify if we want to translate the date in french or not
func GetEventsByCityOrdered ¶
GetEventsByCityOrdered retuns a list of events for a given city. Those events are ordered chronologically
func GetEventsByUserID ¶
GetEventsByUserID returns a list of events created by a user, identified by its user ID, called 'created_by' in the database