Documentation ¶
Overview ¶
Package spacewatch provides functionality for checking if the International Space Station is visible from the Earth.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ISSStatusHandler ¶
type ISSStatusHandler struct { ApiKey string Log *log.Logger StatusChecker func(apikey string) (Status, error) }
func (*ISSStatusHandler) Get ¶
func (s *ISSStatusHandler) Get(w http.ResponseWriter, r *http.Request)
type Location ¶
Location holds coordinates information.
func GetISSLocation ¶
GetISSLocation is a high level function that knows how to return current location (lat/long) of the International Space Station.
GetISSLocation uses default implementation of the iss client.
type Status ¶
type Status struct { // Lat/Long are coordinates of the ISS. Lat float64 `json:"lat"` Long float64 `json:"long"` Timezone string `json:"timezone"` CloudCoverage int `json:"cloud_coverage"` DayPart string `json:"day_part"` // IsVisible is calculated based on // cloud coverage and part of the day. IsVisible bool `json:"is_visible"` }
Status represents the ISS status report.
func GetISSStatus ¶
GetISSStatus holds the core logic used for generating ISS status update. It takes APIKEY required by the undelying weather service and return the Status struct, or error if any of the internal operation fail.
GetISSStatus leverages deafult clients for ISS location and weather status.
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
Package iss provides functions for reading position latitude/longitude of the International Space Station.
|
Package iss provides functions for reading position latitude/longitude of the International Space Station. |
Package weather provides functions for checking various weather conditions for given latitude and longitude.
|
Package weather provides functions for checking various weather conditions for given latitude and longitude. |