Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ViaCepResponse ¶
type ViaCepResponse struct { Erro bool `json:"erro"` Cep string `json:"cep"` Logradouro string `json:"logradouro"` Complemento string `json:"complemento"` Bairro string `json:"bairro"` Localidade string `json:"localidade"` UF string `json:"uf"` IBGE string `json:"ibge"` GIA string `json:"gia"` DDD string `json:"ddd"` SIAFI string `json:"siafi"` }
type ViaCepService ¶
type ViaCepService interface {
QueryCep(ctx context.Context, cep string) (*ViaCepResponse, error)
}
func NewViaCepService ¶
func NewViaCepService() ViaCepService
type ViaCepServiceImpl ¶
type ViaCepServiceImpl struct {
// contains filtered or unexported fields
}
func (*ViaCepServiceImpl) QueryCep ¶
func (s *ViaCepServiceImpl) QueryCep(ctx context.Context, cep string) (*ViaCepResponse, error)
type WeatherApiResponse ¶
type WeatherApiResponse struct { Location WeatherApiResponseLocation `json:"location"` Current WeatherApiResponseCurrent `json:"current"` }
type WeatherApiResponseCurrent ¶
type WeatherApiResponseCurrent struct {
TemperatureCelsius float64 `json:"temp_c"`
}
type WeatherApiService ¶
type WeatherApiService interface {
QueryWeather(ctx context.Context, location string) (*WeatherApiResponse, error)
}
func NewWeatherApiService ¶
func NewWeatherApiService() WeatherApiService
type WeatherApiServiceImpl ¶
type WeatherApiServiceImpl struct {
// contains filtered or unexported fields
}
func (*WeatherApiServiceImpl) QueryWeather ¶
func (s *WeatherApiServiceImpl) QueryWeather(ctx context.Context, location string) (*WeatherApiResponse, error)
Click to show internal directories.
Click to hide internal directories.