Documentation ¶
Index ¶
- Constants
- func AddEventFavorite(id string, event string) error
- func CreateEvent(name string, event models.Event) error
- func DeleteEvent(name string) (*models.Event, error)
- func GetAllEvents() (*models.EventList, error)
- func GetEvent(name string) (*models.Event, error)
- func GetEventFavorites(id string) (*models.EventFavorites, error)
- func GetEventTracker(event_name string) (*models.EventTracker, error)
- func GetStats() (map[string]interface{}, error)
- func GetUserTracker(user_id string) (*models.UserTracker, error)
- func IsEventActive(event_name string) (bool, error)
- func IsUserAttendingEvent(event_name string, user_id string) (bool, error)
- func IsUserCheckedIn(id string) (bool, error)
- func MarkUserAsAttendingEvent(event_name string, user_id string) error
- func RemoveEventFavorite(id string, event string) error
- func UpdateEvent(name string, event models.Event) error
Constants ¶
const PreEventCheckinIntervalInSeconds = 15 * 60
Variables ¶
This section is empty.
Functions ¶
func AddEventFavorite ¶
Adds the given event to the favorites for the user with the given id
func CreateEvent ¶
Creates an event with the given name
func DeleteEvent ¶
Deletes the event with the given name. Removes the event from event trackers and every user's tracker. Returns the event that was deleted.
func GetEventFavorites ¶
func GetEventFavorites(id string) (*models.EventFavorites, error)
Returns the event favorites for the user with the given id
func GetEventTracker ¶
func GetEventTracker(event_name string) (*models.EventTracker, error)
Returns the event tracker for the specified event
func GetUserTracker ¶
func GetUserTracker(user_id string) (*models.UserTracker, error)
Returns the user tracker for the specified user
func IsEventActive ¶
Check if an event is active, i.e., that check-ins are allowed for the event at the current time. Returns true if and only if abs(Current Time - Event Start Time) <= 1200 seconds (20 minutes).
func IsUserAttendingEvent ¶
Returns true is the user has already been marked as attending the specified event, false otherwise
func IsUserCheckedIn ¶
Checks if the user has been checked in with the checkin service
func MarkUserAsAttendingEvent ¶
Marks the specified user as attending the specified event The user must not already marked as attending for this to return successfully
func RemoveEventFavorite ¶
Removes the given event to the favorites for the user with the given id
Types ¶
This section is empty.