summaryrefslogtreecommitdiff
path: root/internal/store/sqlite.go
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-01-19 09:54:42 -1000
committerPeter Stone <thepeterstone@gmail.com>2026-01-19 09:54:42 -1000
commita38abc90ee4fe00bf0fbdf897c5ef93e80e0c256 (patch)
tree0936c38580482f9de52e8b1e8c207e8d11f3457b /internal/store/sqlite.go
parent2215aaa458b318edb16337ab56cf658117023eb4 (diff)
Refactor: Add cache key constants and configurable template path
Code quality improvements: - Define CacheKey* constants in store package for type safety - Add TemplateDir to config (default: web/templates, env: TEMPLATE_DIR) - Update handlers to use store.CacheKey* instead of hardcoded strings - Update NewTabsHandler to accept templateDir parameter - Use filepath.Join for cross-platform template path construction Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'internal/store/sqlite.go')
-rw-r--r--internal/store/sqlite.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/store/sqlite.go b/internal/store/sqlite.go
index 259bd0f..5f58fd4 100644
--- a/internal/store/sqlite.go
+++ b/internal/store/sqlite.go
@@ -13,6 +13,14 @@ import (
"task-dashboard/internal/models"
)
+// Cache key constants
+const (
+ CacheKeyTodoistTasks = "todoist_tasks"
+ CacheKeyTrelloBoards = "trello_boards"
+ CacheKeyObsidianNotes = "obsidian_notes"
+ CacheKeyPlanToEatMeals = "plantoeat_meals"
+)
+
type Store struct {
db *sql.DB
}