Versions in this module Expand all Collapse all v0 v0.2.3 Oct 6, 2023 Changes in this version type IEMNotFoundError + Code int v0.2.2 Oct 6, 2023 Changes in this version type Station + ArchiveBegins time.Time + Timezone string v0.2.1 Oct 6, 2023 Changes in this version + const Comma + const MissingEmpty + const MissingM + const MissingNull + const No + const OnlyComma + const OnlyTDF + const TDF + const TraceEmpty + const TraceFloat + const TraceNull + const TraceT + const Yes + type Client struct + func NewClient() *Client + func NewClientWithOptions(opts ...ClientOption) *Client + func (c *Client) Networks() NetworkService + func (c *Client) Stations() StationService + func (c *Client) Weather() WeatherService + type ClientOption func(*Client) + func WithNetworkService(service NetworkService) ClientOption + func WithWeatherService(service WeatherService) ClientOption + type IEMNetowrkJsonResposne struct + Data []*Network + type IEMNetworkService struct + func (s *IEMNetworkService) GetNetworks(ctx context.Context) ([]*Network, error) + type IEMNotFoundError struct + Detail string + func (err IEMNotFoundError) Error() string + type IEMStationService struct + func (s *IEMStationService) GetStation(ctx context.Context, stationId string) (*Station, error) + func (s *IEMStationService) GetStations(ctx context.Context, networkId string) ([]*Station, error) + type IEMStationsJsonResponse struct + Data []*Station + type IEMWeatherData struct + Altimeter float64 + CloudCoverageL1 string + CloudCoverageL2 string + CloudCoverageL3 string + CloudHeightL1 float64 + CloudHeightL2 float64 + CloudHeightL3 float64 + DewPointC float64 + DewPointF float64 + Elevation string + Feel float64 + IceAccretion1HR float64 + IceAccretion3HR float64 + IceAccretion6HR float64 + Lat float64 + Lon float64 + METAR string + PeakWindDirection float64 + PeakWindGustKnots float64 + PeakWindGustMPH float64 + PeakWindTime *time.Time + PrecipInch float64 + PrecipMM float64 + PresentWeatherCodes string + RelativeHumidity float64 + SeaLevelPressure float64 + SnowDepth float64 + Station string + TemperatureC float64 + TemperatureF float64 + Time *time.Time + Visibility float64 + WindDirection float64 + WindGustKnots float64 + WindGustMPH float64 + WindSpeedKnots float64 + WindSpeedMPH float64 + func ParseWeatherData(reader io.Reader, query *WeatherDataQueryBuilder) ([]*IEMWeatherData, error) + type IEMWeatherService struct + func (s *IEMWeatherService) Get(ctx context.Context, query *WeatherDataQueryBuilder) ([]*IEMWeatherData, error) + type Network struct + Id string + Index int + Name string + Tz string + WindroseUpdate time.Time + type NetworkService interface + GetNetworks func(ctx context.Context) ([]*Network, error) + type Station struct + ClimateSite string + Country string + County string + Elevation float64 + Id string + Index int + Latitude float64 + Longitude float64 + Name string + Network string + Online bool + Params string + PlotName string + State string + Synop float64 + type StationService interface + GetStation func(ctx context.Context, stationId string) (*Station, error) + GetStations func(ctx context.Context, networkId string) ([]*Station, error) + type TestWeatherService struct + func (s *TestWeatherService) GetWeatherAtStation(ctx context.Context, query *WeatherDataQueryBuilder) ([]*IEMWeatherData, error) + type WeatherDataData string + const All + const Altimeter + const CloudCoverageL1 + const CloudCoverageL2 + const CloudCoverageL3 + const CloudHeightL1 + const CloudHeightL2 + const CloudHeightL3 + const DewPointC + const DewPointF + const Feel + const IceAccretion1HR + const IceAccretion3HR + const IceAccretion6HR + const METAR + const PeakWindDirection + const PeakWindGustKnots + const PeakWindGustMPH + const PeakWindTime + const PrecipInch + const PrecipMM + const PresentWeatherCodes + const RelativeHumidity + const SeaLevelPressure + const SnowDepth + const TempC + const TempF + const Visibility + const WindDirection + const WindGustKnots + const WindGustMPH + const WindSpeedKnots + const WindSpeedMPH + type WeatherDataQueryBuilder struct + func NewWeatherDataQuery() *WeatherDataQueryBuilder + func (b *WeatherDataQueryBuilder) BuildUrl() (url.Values, error) + func (b *WeatherDataQueryBuilder) Data(data ...WeatherDataData) *WeatherDataQueryBuilder + func (b *WeatherDataQueryBuilder) Elevation(elev bool) *WeatherDataQueryBuilder + func (b *WeatherDataQueryBuilder) End(t time.Time) *WeatherDataQueryBuilder + func (b *WeatherDataQueryBuilder) Format(format WeatherDataQueryFormat) *WeatherDataQueryBuilder + func (b *WeatherDataQueryBuilder) LatLon(latlon bool) *WeatherDataQueryBuilder + func (b *WeatherDataQueryBuilder) Missing(missing WeatherDataQueryMissing) *WeatherDataQueryBuilder + func (b *WeatherDataQueryBuilder) ReportType(types ...int) *WeatherDataQueryBuilder + func (b *WeatherDataQueryBuilder) Start(t time.Time) *WeatherDataQueryBuilder + func (b *WeatherDataQueryBuilder) Stations(stations ...string) *WeatherDataQueryBuilder + func (b *WeatherDataQueryBuilder) Timezone(tz string) *WeatherDataQueryBuilder + func (b *WeatherDataQueryBuilder) Trace(trace WeatherDataQueryTrace) *WeatherDataQueryBuilder + type WeatherDataQueryBuilderError struct + func (err WeatherDataQueryBuilderError) Error() string + type WeatherDataQueryFormat string + type WeatherDataQueryMissing string + type WeatherDataQueryTrace string + type WeatherDataQueryYesNo string + type WeatherService interface + Get func(ctx context.Context, query *WeatherDataQueryBuilder) ([]*IEMWeatherData, error) v0.2.0 Oct 5, 2023 v0.1.2 Oct 5, 2023