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
Function
TestDeleteSavedFood_success
─── DeleteSavedFood ──────────────────────────────────────────────────────────
backend/controllers/food_test.go:896
Function
TestDeleteWeightLog_ownershipEnforced
(t *testing.T)
backend/controllers/weight_test.go:395
Function
TestDeleteWorkout_ownershipEnforced
(t *testing.T)
backend/controllers/workouts_test.go:140
Function
TestGetDailyStats_empty
─── GetDailyStats ────────────────────────────────────────────────────────────
backend/controllers/food_test.go:408
Function
TestGetDailyStats_scopedByUser
(t *testing.T)
backend/controllers/food_test.go:459
Function
TestGetDailyStats_sumsMacrosCorrectly
(t *testing.T)
backend/controllers/food_test.go:426
Function
TestGetExerciseHistory_empty
(t *testing.T)
backend/controllers/exercises_test.go:148
Function
TestGetExerciseHistory_returnsSessionsGrouped
(t *testing.T)
backend/controllers/exercises_test.go:170
Function
TestGetExercisePRs_ignoresWarmup
(t *testing.T)
backend/controllers/exercises_test.go:89
Function
TestGetExercisePRs_invalidID
(t *testing.T)
backend/controllers/exercises_test.go:135
Function
TestGetExercisePRs_isolatesUser
(t *testing.T)
backend/controllers/exercises_test.go:111
Function
TestGetExercisePRs_noHistory
(t *testing.T)
backend/controllers/exercises_test.go:39
Function
TestGetExercisePRs_returnsBestSet
(t *testing.T)
backend/controllers/exercises_test.go:57
Function
TestGetFoodHistory_defaultsDaysTo30
(t *testing.T)
backend/controllers/food_test.go:529
Function
TestGetFoodHistory_empty
─── GetFoodHistory ───────────────────────────────────────────────────────────
backend/controllers/food_test.go:481
Function
TestGetFoodHistory_groupsByDay
(t *testing.T)
backend/controllers/food_test.go:498
Function
TestGetFoodLog_invalidID
(t *testing.T)
backend/controllers/food_test.go:163
Function
TestGetFoodLog_ownershipEnforced
(t *testing.T)
backend/controllers/food_test.go:148
Function
TestGetFoodLog_success
─── GetFoodLog ───────────────────────────────────────────────────────────────
backend/controllers/food_test.go:129
Function
TestGetMe_deletedAccountReturns401
TestGetMe_deletedAccountReturns401 covers the review fix: GetMe used to fall through utils.DBError (which ignores sql.ErrNoRows) and return 200 with a
backend/controllers/review_fixes_test.go:11
Function
TestGetProgram_ownershipEnforced
(t *testing.T)
backend/controllers/programs_test.go:96
Function
TestGetWeightStats_latestPrefersNewestSameDay
(t *testing.T)
backend/controllers/weight_test.go:99
Function
TestGetWeightStats_noData
(t *testing.T)
backend/controllers/weight_test.go:459
Function
TestGetWeightStats_richFields
(t *testing.T)
backend/controllers/weight_test.go:416
Function
TestGetWorkout_ownershipEnforced
(t *testing.T)
backend/controllers/workouts_test.go:116
Function
TestListFoodLogs_empty
─── ListFoodLogs ─────────────────────────────────────────────────────────────
backend/controllers/food_test.go:80
Function
TestListFoodLogs_scopedByDateAndUser
(t *testing.T)
backend/controllers/food_test.go:97
Function
TestListProgramsConcurrentDoesNotExhaustPool
TestListProgramsConcurrentDoesNotExhaustPool is the program-side twin of the workout test above (ProgramStore.loadExercises uses the same close-then-l
backend/controllers/concurrency_test.go:78
Function
TestListPrograms_empty
(t *testing.T)
backend/controllers/programs_test.go:11
Function
TestListPrograms_filtersBySearchQuery
(t *testing.T)
backend/controllers/programs_test.go:222
Function
TestListSavedFoods_alphabeticalAndScopedByUser
(t *testing.T)
backend/controllers/food_test.go:823
Function
TestListSavedFoods_empty
─── ListSavedFoods ───────────────────────────────────────────────────────────
backend/controllers/food_test.go:806
Function
TestListWeightLogs_dateRange
(t *testing.T)
backend/controllers/weight_test.go:119
Function
TestListWeightLogs_dateRangeExactRFC3339
Regression: an RFC3339 timestamp must be honored exactly without any TZ padding. Callers that pass precise bounds expect exclusive control.
backend/controllers/weight_test.go:171
Function
TestListWeightLogs_dateRangeWestTimezone
Regression: a YYYY-MM-DD `to` should include entries logged late on that day for users in west-of-UTC timezones. Their `${date}T12:00:00` local stored
backend/controllers/weight_test.go:146
Function
TestListWeightLogs_empty
(t *testing.T)
backend/controllers/weight_test.go:25
Function
TestListWeightLogs_orderedDescAndScopedByUser
(t *testing.T)
backend/controllers/weight_test.go:42
Function
TestListWeightLogs_sameDayNewestFirst
Regression: multiple logs on the same calendar day share an identical logged_at (the frontend stamps every same-day entry at noon). Without an `id` ti
backend/controllers/weight_test.go:76
Function
TestListWorkoutsConcurrentDoesNotExhaustPool
Regression test for #30: list handlers used to run nested queries while a parent rows cursor was still open, so each request needed multiple pool conn
backend/controllers/concurrency_test.go:18
Function
TestListWorkouts_empty
(t *testing.T)
backend/controllers/workouts_test.go:11
Function
TestListWorkouts_filtersBySearchQuery
(t *testing.T)
backend/controllers/workouts_test.go:234
Function
TestListWorkouts_limitCap
(t *testing.T)
backend/controllers/workouts_test.go:206
Function
TestLogFood_barcodeTooLong
(t *testing.T)
backend/controllers/food_test.go:276
Function
TestLogFood_defaultsServingsToOne
(t *testing.T)
backend/controllers/food_test.go:209
Function
TestLogFood_imageURLTooLong
(t *testing.T)
backend/controllers/food_test.go:259
Function
TestLogFood_missingName
(t *testing.T)
backend/controllers/food_test.go:230
Function
TestLogFood_nameTooLong
(t *testing.T)
backend/controllers/food_test.go:243
Function
TestLogFood_success
─── LogFood ──────────────────────────────────────────────────────────────────
backend/controllers/food_test.go:178
Function
TestLogWeight_differentDaysCoexist
Different days still create separate entries.
backend/controllers/weight_test.go:255
Function
TestLogWeight_normalizesOffsetToUTC
A client-supplied non-UTC offset timestamp must not 500; it's normalized to UTC (a non-UTC time.Time otherwise fails to scan back from SQLite).
backend/controllers/weight_test.go:276
Function
TestLogWeight_rejectsImplausiblyLarge
(t *testing.T)
backend/controllers/weight_test.go:306
Function
TestLogWeight_rejectsNonPositive
(t *testing.T)
backend/controllers/weight_test.go:293
Function
TestLogWeight_sameDayUpdatesInPlace
One weight per calendar day: re-logging a day the user already logged updates that entry in place rather than creating a duplicate.
backend/controllers/weight_test.go:215
Function
TestLogWeight_success
(t *testing.T)
backend/controllers/weight_test.go:192
Function
TestLookupBarcode_invalidFormat
─── LookupBarcode ────────────────────────────────────────────────────────────
backend/controllers/food_test.go:654
Function
TestLookupBarcode_productNotFound
(t *testing.T)
backend/controllers/food_test.go:695
Function
TestLookupBarcode_rateLimited
(t *testing.T)
backend/controllers/food_test.go:713
Function
TestLookupBarcode_success
(t *testing.T)
backend/controllers/food_test.go:668
Function
TestOffBrands_arrayInput
(t *testing.T)
backend/controllers/food_test.go:557
Function
TestOffBrands_nullInput
(t *testing.T)
backend/controllers/food_test.go:567
Function
TestOffBrands_stringInput
─── offBrands.UnmarshalJSON ──────────────────────────────────────────────────
backend/controllers/food_test.go:547
Function
TestOffProductToResult_fallsBackTo100g
(t *testing.T)
backend/controllers/food_test.go:603
Function
TestOffProductToResult_joinsMultipleBrands
(t *testing.T)
backend/controllers/food_test.go:641
Function
TestOffProductToResult_rejectsJavascriptImageURL
(t *testing.T)
backend/controllers/food_test.go:630
Function
TestOffProductToResult_rejectsNonHTTPSImageURL
(t *testing.T)
backend/controllers/food_test.go:619
Function
TestOffProductToResult_usesServingWhenAvailable
─── offProductToResult ───────────────────────────────────────────────────────
backend/controllers/food_test.go:579
Function
TestParseOrigins
(t *testing.T)
backend/routes/cors_test.go:9
Function
TestProgramRestSecondsRoundTrips
(t *testing.T)
backend/controllers/rest_timer_test.go:31
Function
TestRegister_duplicateEmailReturns409
TestRegister_duplicateEmailReturns409 confirms a genuine duplicate is still a conflict, and is now distinguishable from the lock case above.
backend/controllers/sqlite_lock_test.go:70
Function
TestRegister_lockedDBReturns503
TestRegister_lockedDBReturns503 reproduces issue #25: when the database is locked, Register must return a retryable 503 — not a misleading "email alre
backend/controllers/sqlite_lock_test.go:41
Function
TestSearchFood_missingQuery
─── SearchFood ───────────────────────────────────────────────────────────────
backend/controllers/food_test.go:732
Function
TestSearchFood_rateLimited
(t *testing.T)
backend/controllers/food_test.go:772
Function
TestSearchFood_success
(t *testing.T)
backend/controllers/food_test.go:744
Function
TestSearchFood_upstreamError
(t *testing.T)
backend/controllers/food_test.go:788
Function
TestServerInfo
(t *testing.T)
backend/controllers/server_test.go:10
Function
TestUpdateFoodLog_notFound
(t *testing.T)
backend/controllers/food_test.go:348
Function
TestUpdateFoodLog_ownershipEnforced
(t *testing.T)
backend/controllers/food_test.go:324
Function
TestUpdateFoodLog_success
─── UpdateFoodLog ────────────────────────────────────────────────────────────
backend/controllers/food_test.go:295
Function
TestUpdateProgram_replacesExercises
(t *testing.T)
backend/controllers/programs_test.go:138
Function
TestUpdateWeightLog_dedupsOnTargetDay
Editing an entry's date onto a day that already has another entry keeps the day to a single entry (the edited one) — consistent with the log-time upse
backend/controllers/weight_test.go:344
Function
TestUpdateWeightLog_ownershipEnforced
(t *testing.T)
backend/controllers/weight_test.go:373
Function
TestUpdateWeightLog_success
(t *testing.T)
backend/controllers/weight_test.go:319
Function
TestUpdateWorkout_preservesStartedAt
(t *testing.T)
backend/controllers/workouts_test.go:168
Function
TestWorkoutRestSecondsRoundTrips
Per-exercise rest_seconds (#33) must persist through create + the re-read load.
backend/controllers/rest_timer_test.go:9
Function
Tooltip
({ content, children, side = 'top' }: TooltipProps)
web/src/components/Tooltip.tsx:10
Function
TopBar
({ onBack, s }: { onBack: () => void; s: types.ActiveSession })
web/src/pages/GymModeWorkout.tsx:129
Function
TrendChart
({ points, wUnit }: { points: ChartPoint[]; wUnit: string })
web/src/pages/Weight.tsx:52
Function
Unauthorized
(c *gin.Context, msg string)
backend/utils/response.go:21
Method
UnmarshalJSON
(data []byte)
backend/controllers/food.go:214
Method
Update
Update edits an entry the user owns (sql.ErrNoRows if not theirs), then drops any other same-day entry so the day keeps a single entry. req.LoggedAt U
backend/stores/weight.go:128
Method
Update
Update replaces a user-owned program and its children in one tx. sql.ErrNoRows if the program isn't theirs (nothing is mutated).
backend/stores/program.go:121
Method
Update
Update replaces a user-owned workout and its children in one tx. sql.ErrNoRows if the workout isn't theirs (nothing is mutated).
backend/stores/workout.go:126
Method
UpdateSettings
(c *gin.Context)
backend/controllers/user.go:42
Method
UpsertActiveSession
(c *gin.Context)
backend/controllers/active_session.go:24
Function
UserID
(c *gin.Context)
backend/middleware/auth.go:41
Function
UserMenu
()
web/src/components/Layout.tsx:97
Function
ValidateToken
(tokenStr string)
backend/utils/jwt.go:46
Function
ValidationError
(c *gin.Context, err error)
backend/utils/response.go:33
Function
Version
Version returns the build-time version. Unlike C.Version it needs no Load(), so the --version flag can report it without touching env or the database.
backend/config/config.go:40
Function
Weight
()
web/src/pages/Weight.tsx:208
← previous
next →
401–500 of 570, ranked by callers