Documentation
¶
Index ¶
- Constants
- func GetEfforts(segmentID int64, maxPages int, tokens ...string) ([]strava.DetailedSegmentEffort, error)
- func GetStravaContext(codes ...string) (*context.Context, error)
- func PowerWNF(power float64, s *Segment, current, past *weather.Conditions) (baseline, historical float64, err error)
- func Resource(name string) string
- func WNF(s *Segment, current, past *weather.Conditions) (baseline, historical float64, err error)
- type Climb
- type HistoricalClimbAverages
- type HistoricalHourlyAverages
- type HistoricalMonthlyAverages
- type Segment
- type Weather
Constants ¶
View Source
const CLIMB_THRESHOLD = 0.03
View Source
const MAX_PER_PAGE = 200
Variables ¶
This section is empty.
Functions ¶
func GetEfforts ¶
Types ¶
type Climb ¶
type HistoricalClimbAverages ¶
type HistoricalClimbAverages map[int64]HistoricalMonthlyAverages
func GetHistoricalAverages ¶
func GetHistoricalAverages(files ...string) (HistoricalClimbAverages, error)
func (*HistoricalClimbAverages) Get ¶
func (avgs *HistoricalClimbAverages) Get(s *Segment, t time.Time, loc *time.Location) *weather.Conditions
type HistoricalHourlyAverages ¶
type HistoricalHourlyAverages struct {
Hourly []*weather.Conditions `json:"hourly"`
}
type HistoricalMonthlyAverages ¶
type HistoricalMonthlyAverages struct {
Monthly []*HistoricalHourlyAverages `json:"monthly"`
}
type Segment ¶
type Segment struct {
Name string `json:"name"`
ID int64 `json:"id"`
Distance float64 `json:"distance"`
AverageGrade float64 `json:"average_grade"`
ElevationLow float64 `json:"elevation_low"`
ElevationHigh float64 `json:"elevation_high"`
TotalElevationGain float64 `json:"total_elevation_gain"`
MedianElevation float64 `json:"median_elevation"`
StartLocation geo.LatLng `json:"start_location"`
EndLocation geo.LatLng `json:"end_location"`
AverageLocation geo.LatLng `json:"average_location,omitempty"`
AverageDirection float64 `json:average_direction,omitempty"`
Map string `json:"map,omitempty"`
}
type Weather ¶
type Weather struct {
// contains filtered or unexported fields
}
func NewWeatherClient ¶
Click to show internal directories.
Click to hide internal directories.