web

package
v0.0.0-...-3c92c33 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetLocationByCEPRequest

type GetLocationByCEPRequest struct {
	CEP string `json:"cep"`
}

GetLocationByCEPRequest - estrutura de entrada para busca de clima pelo CEP

type GetWeatherByLocalRequest

type GetWeatherByLocalRequest struct {
	Latitude  string `json:"latitude"`
	Longitude string `json:"longitude"`
}

GetWeatherByLocalRequest - estrutura de entrada para busca de clima pelo local

type Handler

type Handler struct {
	GetLatLonByCEP       usecase.GetLatLonByCEP
	GetWeatherByLocation usecase.GetWeatherUseCase
}

func NewHandler

func NewHandler(GetLatLonByCEP usecase.GetLatLonByCEP, GetWeatherByLocation usecase.GetWeatherUseCase) *Handler

NewHandler - cria um novo handler com os usecases

func (*Handler) GetLocationByCEP

func (wh *Handler) GetLocationByCEP(w http.ResponseWriter, r *http.Request)

GetLocationByCEP - busca de clima pelo CEP

func (*Handler) GetWeatherByLocal

func (wh *Handler) GetWeatherByLocal(w http.ResponseWriter, r *http.Request)

GetWeatherByLocal - busca de clima pelo local

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL