exercise

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.ExerciseTemplate, error)

Run starts the interactive exercise search

Types

type ExerciseItem

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

ExerciseItem represents an exercise in the list

func (ExerciseItem) Description

func (i ExerciseItem) Description() string

func (ExerciseItem) FilterValue

func (i ExerciseItem) FilterValue() string

func (ExerciseItem) Title

func (i ExerciseItem) Title() string

type SearchModel

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

SearchModel is the interactive exercise search model

func NewSearchModel

func NewSearchModel(client *api.Client) SearchModel

NewSearchModel creates a new exercise search model

func (SearchModel) Init

func (m SearchModel) Init() tea.Cmd

Init initializes the model

func (SearchModel) Selected

func (m SearchModel) Selected() *api.ExerciseTemplate

Selected returns the selected exercise, if any

func (SearchModel) Update

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

Update handles messages

func (SearchModel) View

func (m SearchModel) View() string

View renders the model

Jump to

Keyboard shortcuts

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