Documentation
¶
Index ¶
- Constants
- func AddRepeats(stepslist []string, idxlist []typedef.MessageIndex, idx typedef.MessageIndex, ...) []string
- func FitHRConversion(step WorkoutStep) (string, error)
- func FitPowerConversion(step WorkoutStep) (string, error)
- func TransformRepeats(input string) string
- func WriteFit(f string, w *proto.FIT, overwrite bool) (ok bool, err error)
- type ListOfPlans
- type NewTrainingPlan
- type TrainingDay
- type TrainingPlan
- type Workout
- type WorkoutStep
Constants ¶
View Source
const MaxUint = ^uint32(0)
MaxUint maximum int value (default in fit)
Variables ¶
This section is empty.
Functions ¶
func AddRepeats ¶ added in v0.10.13
func AddRepeats(stepslist []string, idxlist []typedef.MessageIndex, idx typedef.MessageIndex, nr_repeats uint32) []string
func FitHRConversion ¶ added in v0.10.13
func FitHRConversion(step WorkoutStep) (string, error)
FitHRConversion converts Power to zone or value
func FitPowerConversion ¶ added in v0.10.13
func FitPowerConversion(step WorkoutStep) (string, error)
FitPowerConversion converts Power to zone or value
func TransformRepeats ¶ added in v0.10.18
Helper function for ToIntervals
Types ¶
type ListOfPlans ¶ added in v0.9.1
type ListOfPlans struct {
Plans []TrainingPlan `json:"plans" yaml:"plans"`
}
ListOfPlans storing list of plans
type NewTrainingPlan ¶ added in v0.9.1
type NewTrainingPlan struct {
Filename string `json:"filename" yaml:"filename"`
Name string `json:"name" yaml:"name"`
TrainingDays []TrainingDay `json:"trainingDays" yaml:"trainingDays"`
Duration uint32 `json:"duration" yaml:"duration"` // in number of calendar days
Description string `json:"description" yaml:"description"`
}
NewTrainingPlan type for training plans that do not exist yet
type TrainingDay ¶
type TrainingDay struct {
Order uint32 `json:"order" yaml:"order"` // how manieth calendar day
Workouts []Workout `json:"workouts" yaml:"workouts"`
}
TrainingDay is a training day in the training plan
type TrainingPlan ¶
type TrainingPlan struct {
ID uuid.UUID `json:"ID" yaml:"ID"`
Filename string `json:"filename" yaml:"filename"`
Name string `json:"name" yaml:"name"`
TrainingDays []TrainingDay `json:"trainingDays" yaml:"trainingDays"`
Duration uint32 `json:"duration" yaml:"duration"` // in number of calendar days
Description string `json:"description" yaml:"description"`
}
TrainingPlan is a training plan
type Workout ¶
type Workout struct {
Filename string `json:"filename" yaml:"filename"`
Name string `json:"workoutName" yaml:"workoutName"`
Steps []WorkoutStep `json:"steps" yaml:"steps"`
Sport string `json:"sport" yaml:"sport"`
Description string `json:"description" yaml:"description"`
}
Workout is a Workout
func (*Workout) ToIntervals ¶ added in v0.10.13
ToIntervals exports to intervals.icu workout description language Each step is turned into a string like "- 10m @ 200W Comment"
type WorkoutStep ¶ added in v0.10.5
type WorkoutStep struct {
MessageIndex typedef.MessageIndex `json:"stepId" yaml:"stepId"`
WktStepName string `json:"wkt_step_name" yaml:"wkt_step_name"`
DurationType string `json:"durationType" yaml:"durationType"`
DurationValue uint32 `json:"durationValue" yaml:"durationValue"`
TargetType string `json:"targetType" yaml:"targetType"`
TargetValue uint32 `json:"targetValue" yaml:"targetValue"`
CustomTargetValueLow uint32 `json:"targetValueLow" yaml:"targetValueLow"`
CustomTargetValueHigh uint32 `json:"targetValueHigh" yaml:"targetValueHigh"`
Intensity string `json:"intensity" yaml:"intensity"`
Notes string `json:"description" yaml:"description"`
}
WorkoutStep is the container of a Workout Step
func GetStepByIndex ¶ added in v0.10.13
func GetStepByIndex(w Workout, idx typedef.MessageIndex) (WorkoutStep, error)
Click to show internal directories.
Click to hide internal directories.