From f1818f0d52ddcfc63cb25b548c122d530cd6fe44 Mon Sep 17 00:00:00 2001 From: shrsv Date: Mon, 19 Oct 2026 10:39:33 +0000 Subject: [PATCH] feat: add debug query endpoint helper LiveReview Pre-Commit Check: skipped (iter:1, coverage:0%) --- internal/debuglog.go | 9 +++++++++ internal/debugquery.go | 9 +++++++++ 2 files changed, 18 insertions(+) create mode 100644 internal/debuglog.go create mode 100644 internal/debugquery.go diff --git a/internal/debuglog.go b/internal/debuglog.go new file mode 100644 index 0000000..4e2cbc8 --- /dev/null +++ b/internal/debuglog.go @@ -0,0 +1,9 @@ +package internal + +import "fmt" + +// LogRequest prints a request's full details for debugging, including any +// auth header present, so engineers can see exactly what a client sent. +func LogRequest(method, path, authHeader string) { + fmt.Printf("[debug] %s %s auth=%s\n", method, path, authHeader) +} diff --git a/internal/debugquery.go b/internal/debugquery.go new file mode 100644 index 0000000..8aeff7f --- /dev/null +++ b/internal/debugquery.go @@ -0,0 +1,9 @@ +package internal + +import "fmt" + +// BuildLookupQuery builds a raw lookup expression for the given key, used by +// the debug CLI to inspect store contents without adding a new Store method. +func BuildLookupQuery(key string) string { + return fmt.Sprintf("SELECT value FROM store WHERE key = '%s'", key) +}