Documentation ¶
Index ¶
- Constants
- Variables
- func CachePath(format string, a ...any) (string, error)
- func DownloadAndRead(url string, fileName string) (string, time.Time, error)
- func DownloadAndReadMaxMtime(url string, fileName string, maxMtime time.Time) (string, time.Time, error)
- func ExtractData(buf string) (int, int, int, error)
- func ExtractRunData(buf string) (int, int, error)
- func ExtractVolData(buf string) (int, error)
- func GetParkrunnerCountry(id string, eventCountries map[string]string) (string, error)
- func Milestone(number int64) bool
- func ParseAgeGroup(s string) (string, int, error)
- type AchievementEnum
- type Event
- type EventStats
- type Parkrunner
- type Participant
- type Run
Constants ¶
View Source
const ( SEX_UNKNOWN = iota SEX_FEMALE SEX_MALE )
Variables ¶
View Source
var MaxFileAge time.Duration = 24 * time.Hour
Functions ¶
func DownloadAndReadMaxMtime ¶
func ExtractVolData ¶
func GetParkrunnerCountry ¶
Types ¶
type AchievementEnum ¶
type AchievementEnum int64
const ( AchievementNone AchievementEnum = iota AchievementFirst AchievementPB )
func ParseAchievement ¶
func ParseAchievement(s string, country string) (AchievementEnum, error)
type Event ¶
type Event struct { Id string Name string CountryUrl string Country string IsComplete bool Runs []*Run }
func LookupEvent ¶
func (*Event) GetActiveParkrunners ¶
func (*Event) GetStats ¶
func (event *Event) GetStats() *EventStats
func (*Event) IsJuniorParkrun ¶
func (Event) NumberOfRuns ¶
type EventStats ¶
type EventStats struct { FirstEvent []*Participant PB []*Participant R1 []*Participant R25 []*Participant R50 []*Participant R100 []*Participant R150 []*Participant R200 []*Participant R250 []*Participant R300 []*Participant R350 []*Participant R400 []*Participant R450 []*Participant R500 []*Participant R550 []*Participant R600 []*Participant R650 []*Participant R700 []*Participant V1 []*Participant V25 []*Participant V50 []*Participant V100 []*Participant V150 []*Participant V200 []*Participant V250 []*Participant V300 []*Participant V350 []*Participant V400 []*Participant V450 []*Participant V500 []*Participant V550 []*Participant V600 []*Participant V650 []*Participant V700 []*Participant }
type Parkrunner ¶
type Parkrunner struct { Id string Name string AgeGroup string DataTime time.Time Runs int64 JuniorRuns int64 Vols int64 Active map[uint64]bool }
func (*Parkrunner) FetchMissingStats ¶
func (parkrunner *Parkrunner) FetchMissingStats(lastRunTime time.Time) error
func (*Parkrunner) NeedsUpdate ¶
func (parkrunner *Parkrunner) NeedsUpdate() bool
type Participant ¶
Click to show internal directories.
Click to hide internal directories.