with garth

This commit is contained in:
2025-08-28 09:58:24 -07:00
parent dc5bfcb281
commit 73258c0b41
31 changed files with 983 additions and 738 deletions

View File

@@ -15,12 +15,12 @@ type MockServer struct {
mu sync.Mutex
// Endpoint handlers
activitiesHandler http.HandlerFunc
activitiesHandler http.HandlerFunc
activityDetailsHandler http.HandlerFunc
uploadHandler http.HandlerFunc
userHandler http.HandlerFunc
healthHandler http.HandlerFunc
authHandler http.HandlerFunc
uploadHandler http.HandlerFunc
userHandler http.HandlerFunc
healthHandler http.HandlerFunc
authHandler http.HandlerFunc
}
// NewMockServer creates a new mock Garmin Connect server
@@ -67,6 +67,13 @@ func (m *MockServer) SetActivitiesHandler(handler http.HandlerFunc) {
m.activitiesHandler = handler
}
// SetUploadHandler sets a custom handler for upload endpoint
func (m *MockServer) SetUploadHandler(handler http.HandlerFunc) {
m.mu.Lock()
defer m.mu.Unlock()
m.uploadHandler = handler
}
// Default handler implementations would follow for each endpoint
// ...