summaryrefslogtreecommitdiff
path: root/internal/api/interfaces.go
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-01-22 15:28:06 -1000
committerPeter Stone <thepeterstone@gmail.com>2026-01-22 15:31:50 -1000
commite97a1bc259d3aa91956ec73a522421cdb621ae57 (patch)
treea9f424ef97673c0dd7da8cee6044413e6417b626 /internal/api/interfaces.go
parentdb5deb2330448c75ba6b719e6a397832362b222a (diff)
Add Google Calendar integration
- Add GoogleCalendarClient for fetching upcoming events - Add GoogleCalendarAPI interface and CalendarEvent model - Add config for GOOGLE_CREDENTIALS_FILE and GOOGLE_CALENDAR_ID - Display events in Planning tab with date/time formatting - Update handlers and tests to support optional calendar client Config env vars: - GOOGLE_CREDENTIALS_FILE: Path to service account JSON - GOOGLE_CALENDAR_ID: Calendar ID (defaults to "primary") Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'internal/api/interfaces.go')
-rw-r--r--internal/api/interfaces.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/internal/api/interfaces.go b/internal/api/interfaces.go
index 32d0120..e2521f4 100644
--- a/internal/api/interfaces.go
+++ b/internal/api/interfaces.go
@@ -34,9 +34,15 @@ type PlanToEatAPI interface {
AddMealToPlanner(ctx context.Context, recipeID string, date time.Time, mealType string) error
}
+// GoogleCalendarAPI defines the interface for Google Calendar operations
+type GoogleCalendarAPI interface {
+ GetUpcomingEvents(ctx context.Context, maxResults int) ([]models.CalendarEvent, error)
+}
+
// Ensure concrete types implement interfaces
var (
- _ TodoistAPI = (*TodoistClient)(nil)
- _ TrelloAPI = (*TrelloClient)(nil)
- _ PlanToEatAPI = (*PlanToEatClient)(nil)
+ _ TodoistAPI = (*TodoistClient)(nil)
+ _ TrelloAPI = (*TrelloClient)(nil)
+ _ PlanToEatAPI = (*PlanToEatClient)(nil)
+ _ GoogleCalendarAPI = (*GoogleCalendarClient)(nil)
)