26 lines
1.2 KiB
Go
26 lines
1.2 KiB
Go
// service.go defines the inbound service contract consumed by HTTP handlers.
|
|
// Layer: adapters/inbound/httpapi boundary to application service.
|
|
package httpapi
|
|
|
|
import (
|
|
"context"
|
|
"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)
|
|
LatestWeatherStoryRun(ctx context.Context) (*model.WeatherStoryRun, error)
|
|
LatestWeatherStory(ctx context.Context) (*model.WeatherStory, error)
|
|
LatestAlertRun(ctx context.Context) (*model.WeatherAlertRun, error)
|
|
LatestActiveAlertRun(ctx context.Context, activeAt time.Time) (*model.WeatherAlertRun, error)
|
|
LatestConvectiveOutlook(ctx context.Context, filter app.OutlookFilter) (*model.WeatherOutlookRun, error)
|
|
CurrentConditions(ctx context.Context) (*app.CurrentConditions, error)
|
|
}
|