Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HealthHandler ¶
type HealthHandler struct {
// contains filtered or unexported fields
}
func NewHealthHandler ¶
func NewHealthHandler(u usecase.HealthCheckUseCase) *HealthHandler
func (*HealthHandler) GetHealth ¶
func (h *HealthHandler) GetHealth(w http.ResponseWriter, r *http.Request)
GetHealth é o handler responsável por retornar informações sobre a saúde do serviço @Summary Retorna informações sobre a saúde do serviço @Description Retorna informações sobre a saúde do serviço, como uso de CPU, memória e tempo de atividade @Tags Health @Produce json @Success 200 {object} health.HealthStats @Failure 500 {string} string "Internal Server Error" @Router /health [get]
type WeatherHandler ¶
type WeatherHandler struct {
Usecase contract.WeatherByCepUsecase
}
func NewWeatherHandler ¶
func NewWeatherHandler(uc contract.WeatherByCepUsecase) *WeatherHandler
func (*WeatherHandler) GetWeatherByCep ¶
func (h *WeatherHandler) GetWeatherByCep(w http.ResponseWriter, r *http.Request)
GetWeatherByCep é o handler que consulta o (CEP), encontra a localidade e retorna o clima atual. @Summary Consulta o clima atual de uma localidade a partir do CEP @Description Consulta o clima atual de uma localidade a partir do CEP. Retorna a cidade e a temperatura atual em Celsius, Fahrenheit e Kelvin. @Tags Weather @Produce json @param cep path string true "CEP para buscar a temperatura" @Success 200 {object} WeatherResponseSummary @Failure 422 {string} string "invalid zipcode" @Failure 404 {string} string "can not find zipcode" @Failure 500 {string} string "internal server error" @Router /weather/{cep} [get]