model

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Standing    = Position("standing")
	Ground      = Position("ground")
	Strength    = Modality("strength")
	Flexibility = Modality("flexiblity")
	Mobility    = Modality("mobility")
	Hip         = Focus("hip")
	Back        = Focus("back")
	Knee        = Focus("knee")
	Shoulder    = Focus("shoulder")
	Wrist       = Focus("wrist")
	Ankle       = Focus("ankle")
	Mat         = Requirement("mat")
	Chair       = Requirement("chair")
	Band        = Requirement("band")
	Low         = Effort("low")
	Medium      = Effort("medium")
	High        = Effort("high")

	DefaultMovementCount int = 8
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Effort

type Effort string

Effort required for a movement.

type Focus

type Focus string

Focus is a focus area for a movement.

type IntensityPreference

type IntensityPreference struct {
	// If set, strictly limits workout duration
	MaxDuration *time.Duration
	// DurationMultiplier is a multiplier applied to movement durations
	DurationMultiplier float32
	// RepMultiplier is a multiplier applied to rep counts
	RepMultiplier float32
	// MovementCountMultiplier is a multiplier applied to workout movement count
	MovementCountMultiplier float32
	// MaxHighPct is the maximum percent of the workout spent on high effort movements
	MaxHighPct *int
	//MaxHighMovements is the maximum number of high effort movements in the workout
	MaxHighMovements *int
}

type Modality

type Modality string

Modality of a movement.

type Movement

type Movement struct {
	Name             string        `json:"name"`
	Reps             int           `json:"reps"`
	Duration         time.Duration `json:"duration"`
	IterationsPerRep int           `json:"iterationsPerRep"`
	IterationNames   []string      `json:"iterationNames"`
	Position         Position      `json:"position"`
	Modality         Modality      `json:"modality"`
	Focus            []Focus       `json:"focus"`
	SwitchSides      bool          `json:"switchSides"`
	Requirement      []Requirement `json:"requirement"`
	Effort           Effort        `json:"effort"`
}

Movement is a specific movement.

type OtherPreference

type OtherPreference struct {
	PreferredModality *Modality
	PreferredPosition *Position
	RequirementFree   bool
}

type Position

type Position string

Position is the general position of the body during the movement.

type Requirement

type Requirement string

Requirement for a movement.

type Workout

type Workout struct {
	Movements []Movement `json:"movements"`
	Done      int        `json:"done"`
}

Workout structure generally follows these patterns First standing, then ground First low/medium warmup, then high effort movements if applicable, then low/medium cooldown

func MakeWorkout

func MakeWorkout() Workout

type WorkoutPreferences

type WorkoutPreferences struct {
	Focus     []Focus
	Intensity IntensityPreference
	Other     OtherPreference
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL