Documentation
¶
Index ¶
- Constants
- Variables
- func New() supervisor.Pluggable
- type Actor
- type Cloudiness
- type DewpointTemperature
- type Fog
- type HighClouds
- type Humidity
- type Location
- type LowClouds
- type MaxTemperature
- type MediumClouds
- type MinTemperature
- type Precipitation
- type Pressure
- type Product
- type Products
- type Symbol
- type Temperature
- type WeatherMet
- type Weatherdata
- type WindDirection
- type WindSpeed
- type Zone
Constants ¶
View Source
const ( // Name ... Name = "weather_met" // DefaultApiUrl ... DefaultApiUrl = "https://api.met.no/weatherapi/locationforecast/2.0/classic" )
View Source
const ( EntityWeather = "weather_met" // Attribution ... Attribution = "Weather forecast from met.no, delivered by the Norwegian Meteorological Institute." // FuncEntityAction ... FuncEntityAction = "entityAction" Version = "0.0.1" )
Variables ¶
View Source
var F embed.FS
Functions ¶
Types ¶
type Actor ¶ added in v0.9.0
type Actor struct {
supervisor.BaseActor
Zone
// contains filtered or unexported fields
}
Actor ...
func NewActor ¶ added in v0.9.0
func NewActor(entity *m.Entity, service supervisor.Service) *Actor
NewActor ...
func (*Actor) SetState ¶ added in v0.9.0
func (e *Actor) SetState(params supervisor.EntityStateParams) error
SetState ...
type Cloudiness ¶
Cloudiness ...
type DewpointTemperature ¶
type DewpointTemperature struct {
Id string `xml:"id,attr"`
Unit string `xml:"unit,attr"`
Value string `xml:"value,attr"`
}
DewpointTemperature ...
type HighClouds ¶
HighClouds ...
type Location ¶
type Location struct {
Altitude string `xml:"altitude,attr"`
Latitude string `xml:"latitude,attr"`
Longitude string `xml:"longitude,attr"`
Temperature *Temperature `xml:"temperature,omitempty" json:"temperature,omitempty"`
WindDirection *WindDirection `xml:"windDirection,omitempty" json:"windDirection,omitempty"`
WindSpeed *WindSpeed `xml:"windSpeed,omitempty" json:"windSpeed,omitempty"`
Humidity *Humidity `xml:"humidity,omitempty" json:"humidity,omitempty"`
Pressure *Pressure `xml:"pressure,omitempty" json:"pressure,omitempty"`
Cloudiness *Cloudiness `xml:"cloudiness,omitempty" json:"cloudiness,omitempty"`
Fog *Fog `xml:"fog,omitempty" json:"fog,omitempty"`
LowClouds *LowClouds `xml:"lowClouds,omitempty" json:"lowClouds,omitempty"`
MediumClouds *MediumClouds `xml:"mediumClouds,omitempty" json:"mediumClouds,omitempty"`
HighClouds *HighClouds `xml:"highClouds,omitempty" json:"highClouds,omitempty"`
DewpointTemperature *DewpointTemperature `xml:"dewpointTemperature,omitempty" json:"dewpointTemperature,omitempty"`
Precipitation *Precipitation `xml:"precipitation,omitempty" json:"precipitation,omitempty"`
Symbol *Symbol `xml:"symbol,omitempty" json:"symbol,omitempty"`
MinTemperature *MinTemperature `xml:"minTemperature,omitempty" json:"minTemperature,omitempty"`
MaxTemperature *MaxTemperature `xml:"maxTemperature,omitempty" json:"maxTemperature,omitempty"`
}
Location ...
type MaxTemperature ¶
type MaxTemperature struct {
Id string `xml:"id,attr"`
Unit string `xml:"unit,attr"`
Value string `xml:"value,attr"`
}
MaxTemperature ...
type MediumClouds ¶
MediumClouds ...
type MinTemperature ¶
type MinTemperature struct {
Id string `xml:"id,attr"`
Unit string `xml:"unit,attr"`
Value string `xml:"value,attr"`
}
MinTemperature ...
type Precipitation ¶
Precipitation ...
type Pressure ¶
type Pressure struct {
Id string `xml:"id,attr"`
Unit string `xml:"unit,attr"`
Value string `xml:"value,attr"`
}
Pressure ...
type Product ¶
type Product struct {
Datatype string `xml:"datatype,attr"`
From time.Time `xml:"from,attr"`
To time.Time `xml:"to,attr"`
Location Location `xml:"location"`
}
Product ...
type Temperature ¶
type Temperature struct {
Id string `xml:"id,attr"`
Unit string `xml:"unit,attr"`
Value string `xml:"value,attr"`
}
Temperature ...
type WeatherMet ¶
type WeatherMet struct {
// contains filtered or unexported fields
}
WeatherMet ...
func NewWeatherMet ¶
func NewWeatherMet(adaptors *adaptors.Adaptors, crawler web.Crawler) (weather *WeatherMet)
NewWeatherMet ...
func (*WeatherMet) GetForecast ¶
func (p *WeatherMet) GetForecast(params Zone, now time.Time) (forecast m.AttributeValue, err error)
GetForecast ...
func (*WeatherMet) UpdateForecast ¶
func (p *WeatherMet) UpdateForecast(zone Zone) (forecast m.AttributeValue, err error)
UpdateForecast ...
type Weatherdata ¶
type Weatherdata struct {
XMLName xml.Name `xml:"weatherdata"`
Products Products `xml:"product>time"`
}
Weatherdata ...
type WindDirection ¶
type WindDirection struct {
Id string `xml:"id,attr"`
Deg string `xml:"deg,attr"`
Name string `xml:"name,attr"`
}
WindDirection ...
Click to show internal directories.
Click to hide internal directories.