Documentation ¶
Index ¶
Constants ¶
View Source
const (
// DateFormat is the format used on the future roster web pages.
DateFormat = "2 January 2006"
)
Variables ¶
This section is empty.
Functions ¶
func FutureRosterURL ¶
func LastEventNumber ¶
func StartTestServer ¶
Types ¶
type EventDetails ¶
type EventDetails struct { Date time.Time RoleVolunteers []RoleVolunteer }
EventDetails gives a run date and a list of the volunteers for that run.
func (EventDetails) String ¶
func (details EventDetails) String() string
func (EventDetails) VolunteersForRole ¶
func (details EventDetails) VolunteersForRole(role string) []string
VolunteersForRole returns the volunteer(s) for the provided role name.
type EventRunners ¶
type EventRunners struct { Runners []Runner // contains filtered or unexported fields }
func GetRunners ¶
func GetRunners(prBaseURL string, eventNum int32) (*EventRunners, error)
type FutureRoster ¶
type FutureRoster struct {
SortedEvents []EventDetails
}
FutureRoster is a list of events scraped from a future roster web page.
func FetchFutureRoster ¶
func FetchFutureRoster(basePrURL string) (FutureRoster, error)
FetchFutureRoster gets the volunteer rosters from the provided URL.
func (FutureRoster) FirstEventAfter ¶
func (fr FutureRoster) FirstEventAfter(t time.Time) (EventDetails, error)
FirstEventAfter finds the first event in the roster after the provided time.
type RoleVolunteer ¶
RoleVolunteer is a pair of a role and a volunteer. The Volunteer may be empty if no volunteer is yet assigned.
Click to show internal directories.
Click to hide internal directories.