-
Notifications
You must be signed in to change notification settings - Fork 1
/
dataset.go
35 lines (26 loc) · 941 Bytes
/
dataset.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package weatherkit
import "strings"
// The collection of weather information for a location.
type DataSet string
// The collection of weather information for a location.
type DataSets []DataSet
// String returns a comma delimited list of the data sets.
func (d DataSets) String() string {
dataSets := make([]string, len(d))
for i, v := range d {
dataSets[i] = string(v)
}
return strings.Join(dataSets, ",")
}
const (
// The current weather for the requested location.
DataSetCurrentWeather DataSet = "currentWeather"
// The daily forecast for the requested location.
DataSetForecastDaily DataSet = "forecastDaily"
// The hourly forecast for the requested location.
DataSetForecastHourly DataSet = "forecastHourly"
// The next hour forecast for the requested location.
DataSetForecastNextHour DataSet = "forecastNextHour"
// Weather alerts for the requested location.
DataSetWeatherAlerts DataSet = "weatherAlerts"
)