Documentation ¶
Index ¶
- Constants
- type Observation
- func (s *Observation) GetDailyRainfall() (mm float64, err error)
- func (s *Observation) GetHumidity() (rh int, err error)
- func (s *Observation) GetMaximumWindSpeed() (speed float64, err error)
- func (s *Observation) GetPressure() (hPa float64, err error)
- func (s *Observation) GetSunHours() (hours int, err error)
- func (s *Observation) GetTemperature(celsius bool) (tempture float64, err error)
- func (o *Observation) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
- type Observations
Constants ¶
View Source
const ObservationsDataID = "O-A0001-001"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Observation ¶
type Observation struct { StationName string CityName string CitySN int TownName string TownSN int WeatherElements map[string]interface{} // contains filtered or unexported fields }
func (*Observation) GetDailyRainfall ¶
func (s *Observation) GetDailyRainfall() (mm float64, err error)
GetDailyRainfall returns daily rainfall of the station in millimeters.
func (*Observation) GetHumidity ¶
func (s *Observation) GetHumidity() (rh int, err error)
GetHumidity returns percentage of relative humidity.
func (*Observation) GetMaximumWindSpeed ¶
func (s *Observation) GetMaximumWindSpeed() (speed float64, err error)
GetMaximumWindSpeed returns maximum wind speed in meter per second (m/s).
func (*Observation) GetPressure ¶
func (s *Observation) GetPressure() (hPa float64, err error)
func (*Observation) GetSunHours ¶
func (s *Observation) GetSunHours() (hours int, err error)
GetSunHours returns Sun hours
func (*Observation) GetTemperature ¶
func (s *Observation) GetTemperature(celsius bool) (tempture float64, err error)
func (*Observation) UnmarshalXML ¶
func (o *Observation) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type Observations ¶
type Observations map[string]*Observation
func GetObservations ¶
func GetObservations(apiKey string) (*Observations, error)
func (Observations) UnmarshalXML ¶
func (os Observations) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
Click to show internal directories.
Click to hide internal directories.