store

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

func NewSQLite

func NewSQLite(path string) (*Store, error)

func (*Store) ActiveGymSession

func (s *Store) ActiveGymSession(workout data.Workout) (data.GymSession, error)

func (*Store) ActiveProgram

func (s *Store) ActiveProgram() (data.Program, error)

func (*Store) AddGymSessionEntry

func (s *Store) AddGymSessionEntry(session data.GymSession, exercise data.Exercise, sets int, reps int, repsDetail string, weight float64, notes string) error

func (*Store) ClearActiveProgram

func (s *Store) ClearActiveProgram() error

func (*Store) Close

func (s *Store) Close() error

func (*Store) CreateExercise

func (s *Store) CreateExercise(name string, sets int, reps int, workout data.Workout) error

func (*Store) CreateProgram

func (s *Store) CreateProgram(name string) (int64, error)

func (*Store) CreateWorkout

func (s *Store) CreateWorkout(name string, program data.Program) error

func (*Store) DB

func (s *Store) DB() *sql.DB

func (*Store) DeleteExercise

func (s *Store) DeleteExercise(exercise data.Exercise) error

func (*Store) DeleteGymSessionEntry

func (s *Store) DeleteGymSessionEntry(entry data.GymSessionEntry) error

func (*Store) DeleteProgram

func (s *Store) DeleteProgram(program data.Program) error

func (*Store) DeleteWorkout

func (s *Store) DeleteWorkout(workout data.Workout) error

func (*Store) FinishGymSession

func (s *Store) FinishGymSession(session data.GymSession, notes string) error

func (*Store) ListExerciseLogEntries

func (s *Store) ListExerciseLogEntries(program data.Program, exerciseName string, limit int) ([]data.GymSessionEntry, error)

func (*Store) ListExercises

func (s *Store) ListExercises(workout data.Workout) ([]data.Exercise, error)

func (*Store) ListGymSessionEntries

func (s *Store) ListGymSessionEntries(session data.GymSession) ([]data.GymSessionEntry, error)

func (*Store) ListGymSessions

func (s *Store) ListGymSessions(workout data.Workout, limit int) ([]data.GymSession, error)

func (*Store) ListPrograms

func (s *Store) ListPrograms() ([]data.Program, error)

func (*Store) ListWorkouts

func (s *Store) ListWorkouts(program data.Program) ([]data.Workout, error)

func (*Store) SelectExercise

func (s *Store) SelectExercise(arg string, workout data.Workout) (data.Exercise, error)

func (*Store) SelectGymSession

func (s *Store) SelectGymSession(id string, workout data.Workout) (data.GymSession, error)

func (*Store) SelectGymSessionByID

func (s *Store) SelectGymSessionByID(id int64) (data.GymSession, error)

func (*Store) SelectGymSessionEntry

func (s *Store) SelectGymSessionEntry(id string, workout data.Workout) (data.GymSessionEntry, error)

func (*Store) SelectProgram

func (s *Store) SelectProgram(arg string) (data.Program, error)

func (*Store) SelectWorkout

func (s *Store) SelectWorkout(arg string, program data.Program) (data.Workout, error)

func (*Store) SetActiveProgram

func (s *Store) SetActiveProgram(program data.Program) error

func (*Store) StartGymSession

func (s *Store) StartGymSession(workout data.Workout) (data.GymSession, error)

func (*Store) UpdateExercise

func (s *Store) UpdateExercise(exercise data.Exercise, name string, sets int, reps int) error

func (*Store) UpdateExerciseDefaults

func (s *Store) UpdateExerciseDefaults(exercise data.Exercise, sets int, reps int) error

func (*Store) UpdateGymSessionEntry

func (s *Store) UpdateGymSessionEntry(entry data.GymSessionEntry, sets int, reps int, repsDetail string, weight float64, notes string) error

func (*Store) UpdateProgram

func (s *Store) UpdateProgram(program data.Program, name string) error

func (*Store) UpdateWorkout

func (s *Store) UpdateWorkout(workout data.Workout, name string) error

Jump to

Keyboard shortcuts

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