first commit
This commit is contained in:
34
internal/providers/types.go
Normal file
34
internal/providers/types.go
Normal file
@@ -0,0 +1,34 @@
|
||||
package providers
|
||||
|
||||
import "time"
|
||||
|
||||
type Site struct {
|
||||
Name string
|
||||
Latitude float64
|
||||
Longitude float64
|
||||
}
|
||||
|
||||
type HourlyForecastPoint struct {
|
||||
TS time.Time
|
||||
TempC *float64
|
||||
RH *float64
|
||||
PressureMSLH *float64
|
||||
WindMS *float64
|
||||
WindGustMS *float64
|
||||
WindDirDeg *float64
|
||||
PrecipMM *float64
|
||||
PrecipProb *float64
|
||||
CloudCover *float64
|
||||
}
|
||||
|
||||
type ForecastResult struct {
|
||||
RetrievedAt time.Time
|
||||
Model string
|
||||
Hourly []HourlyForecastPoint
|
||||
Raw map[string]any
|
||||
}
|
||||
|
||||
type Provider interface {
|
||||
Name() string
|
||||
Fetch(ctxDone <-chan struct{}, site Site, model string) (*ForecastResult, error)
|
||||
}
|
||||
Reference in New Issue
Block a user