Refactor and complete providers

This commit is contained in:
2025-01-04 17:51:55 -05:00
parent 9094cb3d3e
commit 398cfdb77c
12 changed files with 401 additions and 109 deletions

15
pkg/provider/provider.go Normal file
View File

@@ -0,0 +1,15 @@
package provider
import (
"context"
"net/http"
"gitea.libretechconsulting.com/rmcguire/ambient-weather-local-exporter/pkg/weather"
)
// Simple interface used for converting Wunderground and
// Ambient Weather Network HTTP requests to a stable struct
type AmbientProvider interface {
ReqToWeather(context.Context, *http.Request) (*weather.WeatherUpdate, error)
Name() string
}