types

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Equipment

type Equipment struct {
	Name string
	Mass Mass
}

func Barbell

func Barbell() Equipment

func (Equipment) String

func (e Equipment) String() string

type Exercise

type Exercise struct {
	Name          string
	Equipment     Equipment
	WorkedMuscles []Muscle
}

func BarbellSquat

func BarbellSquat() Exercise

func NewExercise

func NewExercise(name string, equipment Equipment) Exercise

func (Exercise) String

func (e Exercise) String() string

type Float64Slice

type Float64Slice []float64

func (Float64Slice) Sum

func (s Float64Slice) Sum() float64

type Mass

type Mass Unit
const (
	ZeroMass Mass = 0.0

	Gram     Mass = 1.0
	KiloGram Mass = Gram * 1e+3

	Pound Mass = KiloGram * 0.45359237
)

func (Mass) AddFloat

func (m Mass) AddFloat(x float64) Mass

func (Mass) AddInt

func (m Mass) AddInt(x int64) Mass

func (Mass) DivFloat

func (m Mass) DivFloat(x float64) Mass

func (Mass) DivInt

func (m Mass) DivInt(x int64) Mass

func (Mass) Float64

func (m Mass) Float64() float64

func (Mass) MulFloat

func (m Mass) MulFloat(x float64) Mass

func (Mass) MulInt

func (m Mass) MulInt(x int64) Mass

func (Mass) String

func (m Mass) String() string

type MassSlice

type MassSlice []Mass

func (MassSlice) ToFloats

func (s MassSlice) ToFloats() (o Float64Slice)

type Muscle

type Muscle string
const (
	// arm
	TricepsBrachiiMuscle Muscle = "triceps_brachii"

	// hip
	GlutealMuscle Muscle = "gluteal"

	// leg
	QuadricepsFemorisMuscle Muscle = "quadriceps_femoris"
	BicepsFemorisMuscle     Muscle = "biceps_femoris"
)

type Set

type Set struct {
	Exercise    Exercise
	Weight      Mass
	Repetitions int64
}

func (Set) Volume

func (s Set) Volume() Mass

type SetSlice

type SetSlice []Set

func (SetSlice) Volume

func (s SetSlice) Volume() Mass

func (SetSlice) Volumes

func (s SetSlice) Volumes() (o MassSlice)

type Unit

type Unit float64

type Workout

type Workout struct {
	Since time.Time
	Until time.Time
	Sets  SetSlice
}

Jump to

Keyboard shortcuts

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