Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiHandler ¶ added in v1.1.0
func NewApiHandler ¶ added in v1.1.0
func NewApiHandler(httpClient *http.Client) *ApiHandler
func (*ApiHandler) Weather ¶ added in v1.1.0
func (h *ApiHandler) Weather(ctx echo.Context) error
Weather fetches the latest weather forecast for Amsterdam.
@Summary Weather forecast @Description Performs an external api call to get weather forecast @Tags weather @ID weather-forecast @Produce json @Success 200 {object} WeatherForecast "OK" @Failure 503 {object} WeatherForecast "Service Unavailable" @Router /weather/amsterdam [get]
type ForecastLocation ¶ added in v1.1.0
type ForecastLocation string // @name forecastLocation
ForecastLocation defines the location of the weather forecast.
type ForecastSummary ¶ added in v1.1.0
type ForecastSummary string // @name forecastSummary
ForecastSummary the specifics of the weather forecast.
type Handler ¶
type Handler struct{}
Handler defines the http router implementation for health endpoints.
func (*Handler) Live ¶
Live performs a live check.
@Summary Live healthcheck @Description Performs a live check @Tags health @ID health-live @Produce json @Success 200 {object} ServiceHealth "OK" @Failure 503 {object} ServiceHealth "Service Unavailable" @Router /health/live [get]
type ServiceHealth ¶
type ServiceHealth struct {
ServiceStatus ServiceHealthStatus `json:"status"`
Description ServiceHealthDescription `json:"description"`
CompletedAt time.Time `json:"completed_at"`
}
ServiceHealth defines the health of the service.
type ServiceHealthDescription ¶
type ServiceHealthDescription string // @name serviceHealthDescription
ServiceHealthDescription describes the state of the service status.
type ServiceHealthStatus ¶
type ServiceHealthStatus string // @name serviceHealthStatus
ServiceHealthStatus defines the status of the service.
type WeatherForecast ¶ added in v1.1.0
type WeatherForecast struct {
Location ForecastLocation `json:"location"`
Summary ForecastSummary `json:"summary"`
} // @name WeatherForecast
WeatherForecast provides information about the weather