services

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

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

Go to latest
Published: Nov 28, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeviceService

type DeviceService struct {
	URL      string
	Id       string
	Token    string
	Endpoint string
	// contains filtered or unexported fields
}

func (*DeviceService) GetDeviceLocation

func (s *DeviceService) GetDeviceLocation(ctx context.Context) (*alexa.DeviceLocationResponse, error)

type ForecasterResponse

type ForecasterResponse struct {
	Currently struct {
		ApparentTemperature  float64 `json:"apparentTemperature"`
		CloudCover           float64 `json:"cloudCover"`
		DewPoint             float64 `json:"dewPoint"`
		Humidity             float64 `json:"humidity"`
		Icon                 string  `json:"icon"`
		NearestStormBearing  int     `json:"nearestStormBearing"`
		NearestStormDistance int     `json:"nearestStormDistance"`
		Ozone                float64 `json:"ozone"`
		PrecipIntensity      float64 `json:"precipIntensity"`
		PrecipProbability    float64 `json:"precipProbability"`
		//pressure: 1009.26
		Summary     string  `json:"summary"`
		Temperature float64 `json:"temperature"`
		Time        int64
		//uvIndex: 0
		//visibility: 10
		WindBearing int     `json:"windBearing"`
		WindGust    float64 `json:"windGust"`
		WindSpeed   float64 `json:"windSpeed"`
	} `json:"currently"`
	Hourly []Hour `json:"hourly"`
}

type ForecasterService

type ForecasterService struct {
	URL    string
	Lat    float64
	Lon    float64
	Client http.Client
}

func (*ForecasterService) GetCurrentFishingRating

func (s *ForecasterService) GetCurrentFishingRating(ctx context.Context) ([]Hour, error)

func (*ForecasterService) GetFullFishingForecast

func (s *ForecasterService) GetFullFishingForecast(ctx context.Context) (*ForecasterResponse, error)

type GeoPoint

type GeoPoint struct {
	Coordinates []float64
}

type GeoResource

type GeoResource struct {
	Address struct {
		AdminDistrict    string
		AdminDistrict2   string
		CountryRegion    string
		FormattedAddress string
		Locality         string
		PostalCode       string
	} `json:"address"`
	Confidence        string   `json:"confidence"`
	EntityType        string   `json:"entityType"`
	GeoPoint          GeoPoint `json:"point"`
	StatusCode        int
	StatusDescription string
}

type GeoResourceSet

type GeoResourceSet struct {
	EstimatedTotal int           `json:"estimatedTotal"`
	GeoResources   []GeoResource `json:"resources"`
}

type GeocodeResponse

type GeocodeResponse struct {
	AuthenticationResultCode string           `json:"authenticationResultCode"`
	GeoResourceSets          []GeoResourceSet `json:"resourceSets"`
}

type GeocodeService

type GeocodeService struct {
	URL           string
	UsrIp         string
	CountryRegion string
	PostalCode    string
	Key           string
	Client        http.Client
}

func (*GeocodeService) GetAddressGeocodePoint

func (s *GeocodeService) GetAddressGeocodePoint(ctx context.Context) (*GeocodeResponse, error)

func (*GeocodeService) GetGeoPoint

func (s *GeocodeService) GetGeoPoint(ctx context.Context) (GeoPoint, error)

type Hour

type Hour struct {
	Icon              string  `json:"icon"`
	PrecipProbability float64 `json:"precipProbability"`
	Rating            int     `json:"rating"`
	Temperature       float64 `json:"temperature"`
	Time              int64   `json:"time"`
	WindSpeed         float64 `json:"windSpeed"`
}

Jump to

Keyboard shortcuts

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