Documentation ¶
Index ¶
- func FindAvailability(event types.Event) []types.TimePair
- func GetAvailability(eventProvider db.EventProvider) http.HandlerFunc
- func GetVoteOptions(eventProvider db.EventProvider) http.HandlerFunc
- func ManageEvent(eventProvider db.EventProvider, discordSession *discordgo.Session, ...)
- func PopulateEvent(eventProvider db.EventProvider, discordSession *discordgo.Session) http.HandlerFunc
- func PostVotes(eventProvider db.EventProvider) http.HandlerFunc
- func PutAvailability(eventProvider db.EventProvider) http.HandlerFunc
- func Restart(eventProvider db.EventProvider, discordSession *discordgo.Session)
- func Routes(database db.Provider, discordSession *discordgo.Session) *chi.Mux
- type GetVoteOptionsLocation
- type GetVoteOptionsResponseBody
- type GetVoteOptionsTime
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAvailability ¶
func GetAvailability(eventProvider db.EventProvider) http.HandlerFunc
func GetVoteOptions ¶
func GetVoteOptions(eventProvider db.EventProvider) http.HandlerFunc
gets the current events voting options
func ManageEvent ¶
func ManageEvent(eventProvider db.EventProvider, discordSession *discordgo.Session, eventID string)
ManageEvent manages an event after it has been populated
func PopulateEvent ¶
func PopulateEvent(eventProvider db.EventProvider, discordSession *discordgo.Session) http.HandlerFunc
need to confirm that the user who is populating the event is the same as the user who created the event
func PostVotes ¶
func PostVotes(eventProvider db.EventProvider) http.HandlerFunc
need to confirm that who is putting is in the Guild and has not already voted
func PutAvailability ¶
func PutAvailability(eventProvider db.EventProvider) http.HandlerFunc
func Restart ¶
func Restart(eventProvider db.EventProvider, discordSession *discordgo.Session)
upon restart of the application, need to restart all in progress events get all events from the database for each event, check if it is in progress (compare the last time to current time and is populated) if it is in progress, then restart it (call ManageEvent), else remove it
Types ¶
type GetVoteOptionsLocation ¶
type GetVoteOptionsResponseBody ¶
type GetVoteOptionsResponseBody struct { Times []GetVoteOptionsTime `json:"times"` Locations []GetVoteOptionsLocation `json:"locations"` }
Click to show internal directories.
Click to hide internal directories.