Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Cawlumm/lyftr
/ functions
Functions
570 in github.com/Cawlumm/lyftr
⨍
Functions
570
◇
Types & classes
128
↓ 3 callers
Function
sqliteCode
sqliteCode returns the SQLite result code for err, or 0 if err is not a modernc SQLite error.
backend/utils/dberr.go:15
↓ 3 callers
Function
useServerInfiniteList
({ fetcher, pageSize = 20, rootMargin = '200px', deps = [], }: Options<T>)
web/src/hooks/useServerInfiniteList.ts:22
↓ 2 callers
Method
CreateSavedFood
(c *gin.Context)
backend/controllers/food.go:471
↓ 2 callers
Method
DeleteFoodLog
(c *gin.Context)
backend/controllers/food.go:151
↓ 2 callers
Method
DeleteSavedFood
(c *gin.Context)
backend/controllers/food.go:506
↓ 2 callers
Method
GetExerciseHistory
(c *gin.Context)
backend/controllers/exercises.go:72
↓ 2 callers
Method
ListFoodLogs
(c *gin.Context)
backend/controllers/food.go:27
↓ 2 callers
Method
ListSavedFoods
─── Saved Foods ──────────────────────────────────────────────────────────────
backend/controllers/food.go:461
↓ 2 callers
Function
NewHandler
(s *stores.Stores)
backend/controllers/handler.go:11
↓ 2 callers
Method
Register
(c *gin.Context)
backend/controllers/auth.go:14
↓ 2 callers
Function
_pad
(n: number)
web/e2e/food.spec.ts:8
↓ 2 callers
Function
adjust
(delta: number)
web/src/components/WeightInput.tsx:54
↓ 2 callers
Function
applySchema
()
backend/controllers/testhelper_test.go:43
↓ 2 callers
Function
busyErr
busyErr returns a real modernc SQLITE_BUSY error by writing from a second connection while a write lock is held on the first.
backend/utils/dberr_test.go:43
↓ 2 callers
Function
calcVolume
(w: types.Workout)
web/src/pages/Dashboard.tsx:32
↓ 2 callers
Method
changeOver
changeOver returns latest minus earliest weight within the last `days` days, or 0 with fewer than two entries in the window.
backend/stores/weight.go:192
↓ 2 callers
Function
clampValue
(raw: string | number, min = 0)
web/src/utils/number.ts:12
↓ 2 callers
Function
createProgram
(name: string, notes: string)
web/e2e/programs.spec.ts:23
↓ 2 callers
Function
dayBounds
dayBounds returns [00:00, next 00:00) for the given instant's calendar day. Range match (not SQLite date()) because timestamps store in Go's time.Stri
backend/stores/weight.go:80
↓ 2 callers
Function
doOFFRequest
(ctx context.Context, rawURL string)
backend/controllers/food.go:300
↓ 2 callers
Function
emit
(next: string)
web/src/components/WeightInput.tsx:49
↓ 2 callers
Function
ensureColumn
ensureColumn adds a column to a table if it's missing — idempotent on every boot.
backend/db/migrations.go:54
↓ 2 callers
Function
entryToResult
(e: types.FoodLog)
web/src/components/FoodLogModal.tsx:31
↓ 2 callers
Function
entryToResult
(e: types.FoodLog)
web/src/pages/LogFood.tsx:32
↓ 2 callers
Function
fetchAndStore
fetchAndStore claims the seeding flag for the duration of the sync.
backend/seed/exercises.go:100
↓ 2 callers
Function
fetchAndStoreLocked
fetchAndStoreLocked does the sync; the caller must hold the seeding flag.
backend/seed/exercises.go:109
↓ 2 callers
Function
fmtClock
(totalSeconds: number)
web/src/utils/workoutSets.ts:3
↓ 2 callers
Function
generateToken
(userID int64, email, tokenType string, dur time.Duration)
backend/utils/jwt.go:33
↓ 2 callers
Method
get
(id int64)
backend/stores/program.go:85
↓ 2 callers
Method
get
get re-reads by id (no user scope) — used after a user-scoped write.
backend/stores/workout.go:87
↓ 2 callers
Function
insertProgramExercises
(tx *sql.Tx, pid int64, exercises []models.CreateProgramExerciseReq)
backend/stores/program.go:149
↓ 2 callers
Function
insertWorkoutExercises
insertWorkoutExercises writes the exercises + their sets for a workout within tx.
backend/stores/workout.go:160
↓ 2 callers
Function
jumpToExercise
(idx: number)
web/src/pages/ActiveWorkout.tsx:130
↓ 2 callers
Function
load
(q: string)
web/src/components/ExercisePicker.tsx:28
↓ 2 callers
Function
load
(q: string)
web/src/pages/WorkoutExercisePicker.tsx:27
↓ 2 callers
Function
lookupExercise
(db *sql.DB, patterns []string)
backend/seed/demo_data.go:123
↓ 2 callers
Function
muscleHex
(m: string)
web/src/pages/Dashboard.tsx:63
↓ 2 callers
Function
normalizeLoggedAt
normalizeLoggedAt defaults a zero time to now and forces UTC: keeps the wire format consistent across deployments and lets a client-supplied offset ti
backend/controllers/weight.go:160
↓ 2 callers
Function
parseDayOrTime
parseDayOrTime accepts a full RFC3339 timestamp or a bare YYYY-MM-DD. Returns the parsed time, whether it was an exact timestamp (don't widen), and su
backend/controllers/weight.go:169
↓ 2 callers
Function
post
(path, data, token=None)
scripts/seed_food.py:47
↓ 2 callers
Function
recordCreatedUser
(token: string)
web/e2e/userRegistry.ts:14
↓ 2 callers
Function
resolveAPIBase
()
web/src/services/api.ts:12
↓ 2 callers
Function
savedToResult
(s: types.SavedFood)
web/src/components/FoodLogModal.tsx:45
↓ 2 callers
Function
savedToResult
(s: types.SavedFood)
web/src/pages/LogFood.tsx:47
↓ 2 callers
Function
scanExercise
(row scanner, e *models.Exercise)
backend/stores/exercise.go:27
↓ 2 callers
Function
scanFoodLog
(row interface{ Scan(...any) error }, f *models.FoodLog)
backend/stores/food.go:17
↓ 2 callers
Function
scanSavedFood
(row interface{ Scan(...any) error }, f *models.SavedFood)
backend/stores/food.go:135
↓ 2 callers
Function
seg
(active: boolean)
web/src/components/RestPicker.tsx:25
↓ 2 callers
Function
seg
(active: boolean)
web/src/pages/Settings.tsx:237
↓ 2 callers
Function
setLight
(page)
web/scripts/screenshots.mjs:33
↓ 2 callers
Function
testServerConnection
( base: string, )
web/src/services/api.ts:50
↓ 2 callers
Function
updateSet
(exerciseIndex: number, setIndex: number, field: string, value: any)
web/src/components/EditWorkoutModal.tsx:130
↓ 2 callers
Function
updateSet
(exerciseIndex: number, setIndex: number, field: string, value: any)
web/src/components/AddWorkoutModal.tsx:114
↓ 2 callers
Function
updateSet
(exIdx: number, setIdx: number, field: string, value: any)
web/src/components/AddProgramModal.tsx:71
↓ 2 callers
Function
updateSet
(exIdx: number, setIdx: number, field: string, value: any)
web/src/components/EditProgramModal.tsx:94
↓ 2 callers
Function
updateSet
(exIdx: number, setIdx: number, field: string, value: any)
web/src/pages/EditProgram.tsx:93
↓ 2 callers
Function
updateSet
(exIdx: number, setIdx: number, field: string, value: any)
web/src/pages/AddProgram.tsx:70
↓ 2 callers
Function
updateSet
(exIdx: number, setIdx: number, field: string, value: any)
web/src/pages/EditWorkout.tsx:81
↓ 2 callers
Function
useRestTimer
()
web/src/hooks/useRestTimer.ts:10
↓ 2 callers
Function
yAt
(v: number)
web/src/pages/Weight.tsx:66
↓ 1 callers
Method
Count
()
backend/stores/exercise.go:86
↓ 1 callers
Method
CountOn
CountOn returns how many workouts the user started on the given calendar day (YYYY-MM-DD). Used by the food daily-stats view (cross-entity composition
backend/stores/workout.go:254
↓ 1 callers
Method
CreateSaved
(uid int64, req models.SaveFoodRequest)
backend/stores/food.go:157
↓ 1 callers
Function
DBError
DBError maps a database error to an HTTP response and reports whether it wrote one. It deliberately ignores nil and sql.ErrNoRows: "no rows" means som
backend/utils/dberr.go:67
↓ 1 callers
Method
DailyMacros
DailyMacros returns the day's summed macros (WorkoutCount/Date are filled by the caller, which composes a WorkoutStore count — cross-entity stays in t
backend/stores/food.go:97
↓ 1 callers
Method
DeleteAccount
(c *gin.Context)
backend/controllers/user.go:56
↓ 1 callers
Method
DeleteProgram
(c *gin.Context)
backend/controllers/programs.go:101
↓ 1 callers
Method
DeleteSaved
(uid, id int64)
backend/stores/food.go:173
↓ 1 callers
Method
DeleteWeightLog
(c *gin.Context)
backend/controllers/weight.go:121
↓ 1 callers
Method
DeleteWorkout
(c *gin.Context)
backend/controllers/workouts.go:105
↓ 1 callers
Method
GetByEmail
GetByEmail loads a user incl. password_hash for login. sql.ErrNoRows if absent.
backend/stores/user.go:22
↓ 1 callers
Method
GetMe
(c *gin.Context)
backend/controllers/user.go:12
↓ 1 callers
Method
GetProgram
(c *gin.Context)
backend/controllers/programs.go:30
↓ 1 callers
Method
GetSettings
GetSettings returns the user's settings row, or sql.ErrNoRows if none (the controller owns the default fallback).
backend/stores/user.go:34
↓ 1 callers
Method
GetWorkout
(c *gin.Context)
backend/controllers/workouts.go:31
↓ 1 callers
Method
History
(uid int64, days int)
backend/stores/food.go:108
↓ 1 callers
Method
HistoryForExercise
(uid, exerciseID int64, limit int)
backend/stores/workout.go:296
↓ 1 callers
Function
InternalError
(c *gin.Context)
backend/utils/response.go:29
↓ 1 callers
Method
ListByDay
(uid int64, date string)
backend/stores/food.go:26
↓ 1 callers
Method
ListSaved
(uid int64)
backend/stores/food.go:140
↓ 1 callers
Function
NewActiveSessionStore
(db *sql.DB)
backend/stores/active_session.go:11
↓ 1 callers
Function
NewExerciseStore
(db *sql.DB)
backend/stores/exercise.go:15
↓ 1 callers
Function
NewFoodStore
(db *sql.DB)
backend/stores/food.go:13
↓ 1 callers
Function
NewProgramStore
(db *sql.DB)
backend/stores/program.go:13
↓ 1 callers
Function
NewUserStore
(db *sql.DB)
backend/stores/user.go:12
↓ 1 callers
Function
NewWeightStore
(db *sql.DB)
backend/stores/weight.go:13
↓ 1 callers
Function
NewWorkoutStore
(db *sql.DB)
backend/stores/workout.go:14
↓ 1 callers
Method
PRForExercise
PRForExercise returns the user's PR set for an exercise, or sql.ErrNoRows if they have no qualifying (non-warmup, weighted) set. Reads workout tables
backend/stores/workout.go:282
↓ 1 callers
Method
Reset
()
backend/stores/exercise.go:96
↓ 1 callers
Method
SeedStatus
()
backend/stores/exercise.go:95
↓ 1 callers
Method
ServerInfo
ServerInfo is a public, unauthenticated endpoint clients use to verify that a configured server URL is reachable and is actually a Lyftr backend — the
backend/controllers/server.go:14
↓ 1 callers
Function
ServiceUnavailable
ServiceUnavailable signals a transient failure the client may retry, such as a busy/locked database.
backend/utils/response.go:43
↓ 1 callers
Method
Stats
(uid int64)
backend/stores/weight.go:162
↓ 1 callers
Method
Sync
Sync / SeedStatus / Reset delegate to the seed subsystem (which owns the ExerciseDB fetch + the concurrency guard) so the controller stays SQL-free.
backend/stores/exercise.go:94
↓ 1 callers
Method
SyncExercises
SyncExercises is an admin-only endpoint to re-pull from ExerciseDB.
backend/controllers/exercises.go:91
↓ 1 callers
Method
UpdateProgram
(c *gin.Context)
backend/controllers/programs.go:70
↓ 1 callers
Method
UpdateWorkout
(c *gin.Context)
backend/controllers/workouts.go:74
↓ 1 callers
Method
Upsert
(uid int64, data string)
backend/stores/active_session.go:21
↓ 1 callers
Method
UpsertForDay
UpsertForDay enforces one entry per calendar day: update the day's existing entry if present, else insert. req.LoggedAt must already be normalized to
backend/stores/weight.go:87
↓ 1 callers
Method
UpsertSettings
UpsertSettings writes the settings and returns the stored row (no controller- to-controller call to render the response).
backend/stores/user.go:43
← previous
next →
101–200 of 570, ranked by callers