Documentation ¶
Index ¶
- type GeoNameService
- func (s *GeoNameService) GetCoordinates(json map[string]interface{}) (models.Coordinates, error)
- func (s *GeoNameService) ValidateCity(city string, country string) (string, models.Coordinates, error)
- func (s *GeoNameService) ValidateCountry(country string) (string, error)
- func (s *GeoNameService) ValidateTotalResultsCount(json map[string]interface{}) error
- type GeoService
- type HHTPSender
- type Sender
- type WeatherPredictorService
- func (w *WeatherPredictorService) GetDateFormatted(time time.Time) string
- func (w *WeatherPredictorService) GetParamsFromWeatherData(weatherData models.WeatherData) []*utils.HTTPParam
- func (w *WeatherPredictorService) GetTemperatureAndChart(weatherData models.WeatherData) (float64, string, error)
- func (w *WeatherPredictorService) GetWeatherPredictionMessage(weatherData models.WeatherData, chatID int64) (tgbotapi.Chattable, error)
- type WeatherService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GeoNameService ¶
type GeoNameService struct {
// contains filtered or unexported fields
}
func NewGeoNameService ¶
func NewGeoNameService(sender Sender, logger models.Logger, fuzzy float64) GeoNameService
func (*GeoNameService) GetCoordinates ¶
func (s *GeoNameService) GetCoordinates(json map[string]interface{}) (models.Coordinates, error)
func (*GeoNameService) ValidateCity ¶
func (s *GeoNameService) ValidateCity(city string, country string) (string, models.Coordinates, error)
func (*GeoNameService) ValidateCountry ¶
func (s *GeoNameService) ValidateCountry(country string) (string, error)
func (*GeoNameService) ValidateTotalResultsCount ¶
func (s *GeoNameService) ValidateTotalResultsCount(json map[string]interface{}) error
type GeoService ¶
type HHTPSender ¶
func (*HHTPSender) SendGetRequest ¶
func (s *HHTPSender) SendGetRequest(URL string) ([]byte, error)
type WeatherPredictorService ¶
type WeatherPredictorService struct { URL string // contains filtered or unexported fields }
func NewWeatherPredictorService ¶
func NewWeatherPredictorService(URL string, sender Sender, log models.Logger) WeatherPredictorService
func (*WeatherPredictorService) GetDateFormatted ¶
func (w *WeatherPredictorService) GetDateFormatted(time time.Time) string
func (*WeatherPredictorService) GetParamsFromWeatherData ¶
func (w *WeatherPredictorService) GetParamsFromWeatherData(weatherData models.WeatherData) []*utils.HTTPParam
func (*WeatherPredictorService) GetTemperatureAndChart ¶
func (w *WeatherPredictorService) GetTemperatureAndChart(weatherData models.WeatherData) (float64, string, error)
func (*WeatherPredictorService) GetWeatherPredictionMessage ¶
func (w *WeatherPredictorService) GetWeatherPredictionMessage(weatherData models.WeatherData, chatID int64) (tgbotapi.Chattable, error)
type WeatherService ¶
Click to show internal directories.
Click to hide internal directories.