Documentation
¶
Index ¶
Constants ¶
const ( // ErrMissingSchedule means we couldn't find a schedule at all ErrMissingSchedule err = "missing schedule" // ErrInvalidSchedule means the schedule we found isn't conforming to our expectations ErrInvalidSchedule err = "invalid schedule" // ErrUnexpectedData means we encountered a row in a different format ErrUnexpectedData err = "row did not contain the data we expected" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Duration ¶
Duration represents a interval of time
func (Duration) MarshalJSON ¶
MarshalJSON marshals a Duration to JSON
type Edition ¶
type Edition uint
Edition is the schedule ID of a GDQ edition
const ( Latest Edition = 0 AGDQ2016 Edition = iota + 16 SGDQ2016 AGDQ2017 SGDQ2017 HRDQ2017 AGDQ2018 SGDQ2018 GDQX2018 AGDQ2019 SGDQ2019 GDQX2019 AGDQ2020 FrostFatales2020 SGDQ2020 CRDQ2020 FleetFatales2020 AGDQ2021 )
All the GDQ editions for which a schedule is available
func GetEdition ¶
GetEdition tries to find an edition matching the input
type Event ¶
type Event struct { Start time.Time `json:"start"` Setup Duration `json:"setup"` Estimate Duration `json:"estimate"` Runners []string `json:"runners"` Hosts []string `json:"hosts"` Title string `json:"title"` Category string `json:"category"` Platform string `json:"platform"` }
Event represents a single event at a GDQ
type Schedule ¶
type Schedule struct { Events []*Event // contains filtered or unexported fields }
Schedule represents the events occurring at a GDQ
func GetSchedule ¶
GetSchedule returns the Schedule for a GDQ edition
A client has to be passed in. Please make sure to configure your client correctly, so not http.DefaultClient. Be nice to server admins and make sure your client sets a User-Agent header.
func NewScheduleFrom ¶
NewScheduleFrom returns a scheduled filled with the events
func (*Schedule) ForHost ¶
ForHost returns a new schedule with events only matching this host
The host's name is matched using a string submatch. This means that if you call somtething like schedule.ForHust("b") you can get a schedule with events for multiple hosts.
The match is case insensitive.
func (*Schedule) ForRunner ¶
ForRunner returns a new schedule with events only matching this runner
The runner's name is matched using a string submatch. This means that if you call somtething like schedule.ForRunner("b") you can get a schedule with events for multiple runners.
The match is case insensitive.