Files

26 lines
1.2 KiB
Go
Raw Permalink Normal View History

// 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"
"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)
LatestNarrativeForecast(ctx context.Context) (*model.WeatherForecastRun, error)
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)
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)
CurrentConditions(ctx context.Context) (*app.CurrentConditions, error)
}