Documentation ¶
Overview ¶
Package stronk contains the domain types for doing exercise stuff.
Index ¶
Constants ¶
View Source
const ( OverheadPress = Exercise("OVERHEAD_PRESS") Squat = Exercise("SQUAT") BenchPress = Exercise("BENCH_PRESS") Deadlift = Exercise("DEADLIFT") )
View Source
const ( Warmup = SetType("WARMUP") Main = SetType("MAIN") Assistance = SetType("ASSISTANCE") )
View Source
const ( // E.g. 1775 decipounds == 177.5 lbs DeciPounds = WeightUnit("DECI_POUNDS") )
Variables ¶
View Source
var ( ErrUserNotFound = errors.New("user not found") ErrNoSmallestDenom = errors.New("no smallest denom") )
Functions ¶
This section is empty.
Types ¶
type ComparableLifts ¶
func CalcComparables ¶
func CalcComparables(lifts []*Lift, weight Weight) *ComparableLifts
type Lift ¶
type Lift struct { ID LiftID Exercise Exercise SetType SetType Weight Weight SetNumber int Reps int Note string // Day - 0, 1, 2, ... in a given week // Week - 0, 1, 2, ... in a given iteration // Iteration - 0, 1, 2, ... basically how many times you've gone through the // routine DayNumber int WeekNumber int IterationNumber int ToFailure bool }
func FindClosest ¶
func (*Lift) AsOneRepMax ¶
func (*Lift) CalcEquivalentReps ¶
type Routine ¶
type Routine struct { Name string Weeks []*WorkoutWeek }
type Set ¶
type Set struct { RepTarget int // ToFailure indicates if this set should go until no more reps can be done. // If true, usually indicated with a "+" in the UI, like "5+" ToFailure bool // TrainingMaxPercentage is a number between 0 and 100 indicating what // portion of your training max this lift is going for. TrainingMaxPercentage int // WeightTarget isn't set when users configure it, only in responses sent to // clients. WeightTarget Weight // Only set if the lift is to failure (i.e. ToFailure == true) FailureComparables *ComparableLifts // Only set if we found a match, won't always be the case. AssociatedLiftID LiftID }
type SkippedWeek ¶
type TrainingMax ¶
type Weight ¶
type Weight struct { Unit WeightUnit Value int }
type WeightUnit ¶
type WeightUnit string
type WorkoutDay ¶
func (*WorkoutDay) Clone ¶
func (w *WorkoutDay) Clone() *WorkoutDay
type WorkoutWeek ¶
type WorkoutWeek struct { WeekName string Optional bool Days []*WorkoutDay }
func (*WorkoutWeek) Clone ¶
func (w *WorkoutWeek) Clone() *WorkoutWeek
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
db
|
|
sqldb
Package sqldb implements the server.DB interface, backed by a sqlite database.
|
Package sqldb implements the server.DB interface, backed by a sqlite database. |
testing
|
|
testdb
Package testdb is an in-memory implementation of the server.DB interface.
|
Package testdb is an in-memory implementation of the server.DB interface. |
Click to show internal directories.
Click to hide internal directories.