Documentation
¶
Index ¶
- Constants
- Variables
- func ExportCsv(events []*Event, filePath string) error
- func ParseAgeGroup(s string) (string, int, error)
- func RenderJs(events []*Event, filePath string) error
- type Coordinates
- type Data
- type Event
- func (event Event) Active() bool
- func (event Event) Archived() bool
- func (event Event) Coordinates() string
- func (event Event) CoursePageUrl() string
- func (event Event) First() string
- func (event Event) FixedLocation() string
- func (event Event) FixedName() string
- func (event Event) GoogleMapsCourseId() string
- func (event Event) GoogleMapsCourseKmlUrl() string
- func (event Event) GoogleMapsCourseUrl() string
- func (event Event) GoogleMapsUrl() string
- func (event Event) LastRun() string
- func (event Event) Links() []Link
- func (event *Event) LoadCoursePage(filePath string) error
- func (event *Event) LoadKML(filePath string) error
- func (event *Event) LoadWiki(filePath string) error
- func (event Event) Outdated() bool
- func (event Event) Planned() bool
- func (event Event) ResultsUrl() string
- func (event Event) SummaryRunnersAvg() string
- func (event Event) SummaryVolunteersAvg() string
- func (event Event) Url() string
- func (event Event) WikiUrl() string
- type ExtendedData
- type KML
- type LineString
- type Link
- type ParkrunInfo
- type Participant
- type Placemark
- type Point
- type Results
- type Run
Constants ¶
View Source
const ( SEX_UNKNOWN = iota SEX_FEMALE SEX_MALE )
View Source
const ( StateStart = iota StateDate StateIndex StateRunners StateEnd )
Variables ¶
View Source
var (
InvalidCoordinates = Coordinates{100, 0}
)
Functions ¶
Types ¶
type Coordinates ¶
type Coordinates struct {
Lat, Lon float64
}
func (Coordinates) IsValid ¶
func (c Coordinates) IsValid() bool
type Event ¶
type Event struct {
Id string
Name string
Location string
SpecificLocation string
Coords Coordinates
CountryUrl string
GoogleMapsId string
RouteType string
Tracks [][]Coordinates
LatestRun *Run
Current bool
Order int
Status string
SummaryRegistrations int
SummaryRunners int
SummaryIndividualRunners int
SummaryVolunteers int
SummaryIndividualVolunteers int
}
func LoadEvents ¶
func (Event) Coordinates ¶
func (Event) CoursePageUrl ¶
func (Event) FixedLocation ¶
func (Event) GoogleMapsCourseId ¶
func (Event) GoogleMapsCourseKmlUrl ¶
func (Event) GoogleMapsCourseUrl ¶
func (Event) GoogleMapsUrl ¶
func (*Event) LoadCoursePage ¶
func (Event) ResultsUrl ¶
func (Event) SummaryRunnersAvg ¶
func (Event) SummaryVolunteersAvg ¶
type ExtendedData ¶
type ExtendedData struct {
Data []Data `xml:"Data"`
}
type LineString ¶
type LineString struct {
Coordinates string `xml:"coordinates"`
}
type ParkrunInfo ¶
type ParkrunInfo struct {
Id string
Name string
City string
Location string
RouteType string
RouteID string
GoogleMaps string
First string
Status string
Coordinates string
Links []Link
}
func (ParkrunInfo) ParseCoordinates ¶
func (info ParkrunInfo) ParseCoordinates() (Coordinates, error)
type Participant ¶
type Placemark ¶
type Placemark struct {
Name string `xml:"name"`
Point Point `xml:"Point"`
LineString LineString `xml:"LineString"`
}
type Run ¶
func (*Run) LoadResults ¶
Click to show internal directories.
Click to hide internal directories.