17 lines
441 B
Go
17 lines
441 B
Go
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)
|
|
ProxyReq(context.Context, *weather.WeatherUpdate) error
|
|
Name() string
|
|
}
|