Refactor and complete providers
This commit is contained in:
15
pkg/provider/provider.go
Normal file
15
pkg/provider/provider.go
Normal 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
|
||||
}
|
Reference in New Issue
Block a user