routine

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(client *api.Client) (*api.Routine, error)

Run starts the interactive routine builder

Types

type BuilderModel

type BuilderModel struct {
	// contains filtered or unexported fields
}

BuilderModel is the routine builder TUI model

func NewBuilderModel

func NewBuilderModel(client *api.Client) BuilderModel

NewBuilderModel creates a new routine builder model

func (BuilderModel) CreatedRoutine

func (m BuilderModel) CreatedRoutine() *api.Routine

CreatedRoutine returns the created routine, if any

func (BuilderModel) Init

func (m BuilderModel) Init() tea.Cmd

Init initializes the model

func (BuilderModel) Update

func (m BuilderModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update handles messages

func (BuilderModel) View

func (m BuilderModel) View() string

View renders the model

type Mode

type Mode int

Mode represents the current interaction mode

const (
	ModeTitle Mode = iota
	ModeExerciseList
	ModeAddExercise
	ModeEditSets
	ModeConfirm
)

type RoutineExercise

type RoutineExercise struct {
	Template    api.ExerciseTemplate
	Sets        int
	RestSeconds int
	Notes       string
}

RoutineExercise represents an exercise in the routine being built

Jump to

Keyboard shortcuts

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