2026-03-20 09:44:53 -05:00
|
|
|
// service.go defines the inbound service contract consumed by HTTP handlers.
|
|
|
|
|
// Layer: adapters/inbound/httpapi boundary to application service.
|
|
|
|
|
package httpapi
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"context"
|
2026-06-12 14:05:33 +00:00
|
|
|
"time"
|
2026-03-20 09:44:53 -05:00
|
|
|
|
|
|
|
|
"gitea.maximumdirect.net/ejr/weatherapi/internal/app"
|
|
|
|
|
"gitea.maximumdirect.net/ejr/weatherfeeder/model"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// Service describes weather resource queries needed by the HTTP adapter.
|
|
|
|
|
type Service interface {
|
|
|
|
|
LatestObservation(ctx context.Context) (*model.WeatherObservation, error)
|
|
|
|
|
LatestHourlyForecast(ctx context.Context) (*model.WeatherForecastRun, error)
|
2026-03-27 22:39:17 -05:00
|
|
|
LatestNarrativeForecast(ctx context.Context) (*model.WeatherForecastRun, error)
|
2026-03-28 17:36:35 -05:00
|
|
|
LatestForecastDiscussion(ctx context.Context) (*model.WeatherForecastDiscussion, error)
|
2026-05-30 07:06:29 -05:00
|
|
|
LatestWeatherStoryRun(ctx context.Context) (*model.WeatherStoryRun, error)
|
|
|
|
|
LatestWeatherStory(ctx context.Context) (*model.WeatherStory, error)
|
2026-03-20 09:44:53 -05:00
|
|
|
LatestAlertRun(ctx context.Context) (*model.WeatherAlertRun, error)
|
2026-06-12 14:05:33 +00:00
|
|
|
LatestActiveAlertRun(ctx context.Context, activeAt time.Time) (*model.WeatherAlertRun, error)
|
2026-06-11 15:38:19 +00:00
|
|
|
LatestConvectiveOutlook(ctx context.Context, filter app.OutlookFilter) (*model.WeatherOutlookRun, error)
|
2026-03-20 09:44:53 -05:00
|
|
|
CurrentConditions(ctx context.Context) (*app.CurrentConditions, error)
|
|
|
|
|
}
|