Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Analysis ¶
type Analysis struct { GeneralCondition []string GeneralText []string SurfMax []string SurfMin []string SurfRange []string SurfText []string Units string }
Analysis is a collection of high-level surf info.
type Client ¶
Client is the SurflineF HTTP Client.
func DefaultClient ¶
DefaultClient returns a default configured SurflineF Client.
type DataPoint ¶
type DataPoint struct { Localtime string `json:"Localtime"` Unixtime int `json:"time"` Type string `json:"type"` Height float32 `json:"height"` }
DataPoint is a single tide prediction.
type Forecast ¶
Forecast is the root JSON struct for forecast data.
func (*Forecast) UnmarshalJSON ¶
UnmarshalJSON is a custom unmarshaller for Forecast.
type Query ¶
type Query struct { Resources []string `url:"resources,comma,omitempty"` Days int `url:"days,omitempty"` GetAllSpots bool `url:"getAllSpots,omitempty"` Aggregate bool `url:"aggregate,omitempty"` Units string `url:"units,omitempty"` FullAnalysis bool `url:"fullAnalysis,omitempty"` ShowOptimal bool `url:"showOptimal,omitempty"` Interpolate bool `url:"interpolate,omitempty"` }
Query is used to build Forecast query params. False, nil or empty values are ignored.
func (*Query) QueryString ¶
QueryString builds a query string from a Query.
type Surf ¶
type Surf struct { SwellDirection1 [][]int `json:"swell_direction1"` SwellDirection2 [][]int `json:"swell_direction2"` SwellDirection3 [][]int `json:"swell_direction3"` SwellPeriod1 [][]float32 `json:"swell_period1"` SwellPeriod2 [][]float32 `json:"swell_period2"` SwellPeriod3 [][]float32 `json:"swell_period3"` SwellHeight1 [][]float32 `json:"swell_height1"` SwellHeight2 [][]float32 `json:"swell_height2"` SwellHeight3 [][]float32 `json:"swell_height3"` SurfMin [][]float32 `json:"surf_min"` SurfMax [][]float32 `json:"surf_max"` PeriodSchedule [][]string `json:"periodSchedule"` DateStamp [][]string `json:"dateStamp"` Units string `json:"units"` AggregatePeriod [][]float32 `json:"agg_period1"` AggregateHeight [][]float32 `json:"agg_height1"` AggregateSpread [][]int `json:"agg_spread1"` AggregateDirection [][]int `json:"agg_direction1"` AggregateLocation [][]int `json:"agg_location"` AggregateSurfMin [][]float32 `json:"agg_surf_min"` AggregateSurfMax [][]float32 `json:"agg_surf_max"` }
Surf is a collection of detailed swell info. Agregate data is only available when the aggregate query param is true for the Forecast.
type Tide ¶
type Tide struct {
DataPoints []DataPoint `json:"dataPoints"`
}
Tide is a collection of tide predictions.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.