dataApi

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2023 License: MIT Imports: 14 Imported by: 1

Documentation

Overview

Example (TidePredictions)
package main

import (
	"context"
	"fmt"
	"log"
	"time"

	"github.com/ryan-lang/noaa-tidesandcurrents/client/dataApi"
)

func main() {

	// create a client
	c := dataApi.NewClient(false, "github.com/ryan-lang/noaa-tidesandcurrents")

	// create a request
	req := &dataApi.TidePredictionsRequest{
		StationID: "9447130",
		Date: &dataApi.DateParamBeginAndRange{
			BeginDate:  time.Date(2023, 4, 10, 0, 0, 0, 0, time.UTC),
			RangeHours: 1,
		},
		Interval: "10",
		Units:    "metric",
	}

	// make the request
	res, err := c.TidePredictions(context.Background(), req)
	if err != nil {
		log.Fatal(err)
	}

	// print the response
	for _, p := range res.Predictions {
		fmt.Printf("%f @ %s\n", p.Value, p.Time)
	}

}
Output:

1.346000 @ 2023-04-10 00:00:00 +0000 UTC
1.485000 @ 2023-04-10 00:10:00 +0000 UTC
1.624000 @ 2023-04-10 00:20:00 +0000 UTC
1.761000 @ 2023-04-10 00:30:00 +0000 UTC
1.896000 @ 2023-04-10 00:40:00 +0000 UTC
2.028000 @ 2023-04-10 00:50:00 +0000 UTC
2.156000 @ 2023-04-10 01:00:00 +0000 UTC

Index

Examples

Constants

View Source
const (
	RESP_DATE_LAYOUT = "2006-01-02 15:04"
	REQ_DATE_LAYOUT  = "20060102 15:04"

	RELATIVE_DATE_OPT_TODAY  RelativeDateOpt = "today"
	RELATIVE_DATE_OPT_LATEST RelativeDateOpt = "latest"
	RELATIVE_DATE_OPT_RECENT RelativeDateOpt = "recent"

	INTERVAL_PARAM_HILO   IntervalParam = "hilo"
	INTERVAL_PARAM_HOURLY IntervalParam = "h"
	INTERVAL_PARAM_1M     IntervalParam = "1"
	INTERVAL_PARAM_5M     IntervalParam = "5"
	INTERVAL_PARAM_6M     IntervalParam = "6"
	INTERVAL_PARAM_10M    IntervalParam = "10"
	INTERVAL_PARAM_15M    IntervalParam = "15"
	INTERVAL_PARAM_30M    IntervalParam = "30"
	INTERVAL_PARAM_60M    IntervalParam = "60"

	QUALITY_LEVEL_PRELIMINARY QualityLevel = "p"
	QUALITY_LEVEL_VERIFIED    QualityLevel = "v"

	VELOCITY_TYPE_DEFAULT   VelocityTypeParam = "default"
	VELOCITY_TYPE_SPEED_DIR VelocityTypeParam = "speed_dir"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AirGapData

type AirGapData struct {
	DataFlags *AirGapDataFlags
	Sigma     *float64
	Time      time.Time
	Value     *float64
}

func (*AirGapData) UnmarshalJSON

func (m *AirGapData) UnmarshalJSON(b []byte) error

type AirGapDataFlags

type AirGapDataFlags struct {
	Outliers                      int  // Count of number of 1 second samples that fall outside a 3-sigma band about the mean
	FlatToleranceExceeded         bool // A flag that when set to true indicates that the flat tolerance limit was exceeded
	RateOfChangeToleranceExceeded bool // A flag that when set to true indicates that the rate of change tolerance limit was exceeded
	LimitExceeded                 bool // A flag that when set to true indicates that either the maximum or minimum expected limit was exceeded
}

func (*AirGapDataFlags) UnmarshalJSON

func (d *AirGapDataFlags) UnmarshalJSON(data []byte) error

type AirGapResponse

type AirGapResponse struct {
	Data     []AirGapData
	Metadata Metadata
}

func (*AirGapResponse) UnmarshalJSON

func (m *AirGapResponse) UnmarshalJSON(b []byte) error

type AirPressureData

type AirPressureData struct {
	Flags AirPressureDataFlags
	Time  time.Time
	Value float64
}

func (*AirPressureData) UnmarshalJSON

func (m *AirPressureData) UnmarshalJSON(b []byte) error

type AirPressureDataFlags

type AirPressureDataFlags struct {
	MaxExceeded                   bool // A flag that when set to true indicates that the maximum limit was exceeded
	MinExceeded                   bool // A flag that when set to true indicates that the minimum limit was exceeded
	RateOfChangeToleranceExceeded bool // A flag that when set to true indicates that the rate of change tolerance limit was exceeded
}

func (*AirPressureDataFlags) UnmarshalJSON

func (d *AirPressureDataFlags) UnmarshalJSON(data []byte) error

type AirPressureResponse

type AirPressureResponse struct {
	Data     []AirPressureData
	Metadata Metadata
}

func (*AirPressureResponse) UnmarshalJSON

func (m *AirPressureResponse) UnmarshalJSON(b []byte) error

type AirTemperatureData

type AirTemperatureData struct {
	Flags AirTemperatureDataFlags
	Time  time.Time
	Value float64
}

func (*AirTemperatureData) UnmarshalJSON

func (m *AirTemperatureData) UnmarshalJSON(b []byte) error

type AirTemperatureDataFlags

type AirTemperatureDataFlags struct {
	MaxExceeded                   bool // A flag that when set to true indicates that the maximum limit was exceeded
	MinExceeded                   bool // A flag that when set to true indicates that the minimum limit was exceeded
	RateOfChangeToleranceExceeded bool // A flag that when set to true indicates that the rate of change tolerance limit was exceeded
}

func (*AirTemperatureDataFlags) UnmarshalJSON

func (d *AirTemperatureDataFlags) UnmarshalJSON(data []byte) error

type AirTemperatureResponse

type AirTemperatureResponse struct {
	Data     []AirTemperatureData
	Metadata Metadata
}

func (*AirTemperatureResponse) UnmarshalJSON

func (m *AirTemperatureResponse) UnmarshalJSON(b []byte) error

type Client

type Client struct {
	Verbose bool
	AppName string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(verbose bool, appName string) *Client

func (*Client) AirGap

func (c *Client) AirGap(ctx context.Context, req *StandardRequest) (*AirGapResponse, error)

func (*Client) AirPressure

func (c *Client) AirPressure(ctx context.Context, req *StandardRequest) (*AirPressureResponse, error)

func (*Client) AirTemperature

func (c *Client) AirTemperature(ctx context.Context, req *StandardRequest) (*AirTemperatureResponse, error)

func (*Client) Conductivity

func (c *Client) Conductivity(ctx context.Context, req *StandardRequest) (*ConductivityResponse, error)

func (*Client) Currents

func (c *Client) Currents(ctx context.Context, req *CurrentsRequest) (*CurrentsResponse, error)

func (*Client) CurrentsPredictions

func (c *Client) CurrentsPredictions(ctx context.Context, req *CurrentsPredictionsRequest) (*CurrentsPredictionsResponse, error)

func (*Client) DailyMean

func (c *Client) DailyMean(ctx context.Context, req *DailyMeanRequest) (*DailyMeanResponse, error)

func (*Client) Datums

func (c *Client) Datums(ctx context.Context, req *DatumsRequest) (*DatumsResponse, error)

func (*Client) HighLow

func (c *Client) HighLow(ctx context.Context, req *StandardRequest) (*HighLowResponse, error)

func (*Client) HourlyHeight

func (c *Client) HourlyHeight(ctx context.Context, req *StandardRequest) (*HourlyHeightResponse, error)

func (*Client) Humidity

func (c *Client) Humidity(ctx context.Context, req *StandardRequest) (*HumidityResponse, error)

func (*Client) MonthlyMean

func (c *Client) MonthlyMean(ctx context.Context, req *StandardRequest) (*MonthlyMeanResponse, error)

func (*Client) Salinity

func (c *Client) Salinity(ctx context.Context, req *StandardRequest) (*SalinityResponse, error)

func (*Client) TidePredictions

func (c *Client) TidePredictions(ctx context.Context, req *TidePredictionsRequest) (*TidePredictionsResponse, error)

func (*Client) Visibility

func (c *Client) Visibility(ctx context.Context, req *StandardRequest) (*VisibilityResponse, error)

func (*Client) WaterLevel

func (c *Client) WaterLevel(ctx context.Context, req *StandardRequest) (*WaterLevelResponse, error)

func (*Client) WaterLevelHiRes

func (c *Client) WaterLevelHiRes(ctx context.Context, req *StandardRequest) (*WaterLevelResponse, error)

func (*Client) WaterTemperature

func (c *Client) WaterTemperature(ctx context.Context, req *StandardRequest) (*WaterTemperatureResponse, error)

func (*Client) Wind

func (c *Client) Wind(ctx context.Context, req *StandardRequest) (*WindResponse, error)

type ConductivityData

type ConductivityData struct {
	Flags ConductivityDataFlags
	Time  time.Time
	Value float64
}

func (*ConductivityData) UnmarshalJSON

func (m *ConductivityData) UnmarshalJSON(b []byte) error

type ConductivityDataFlags

type ConductivityDataFlags struct {
	MaxExceeded                   bool // A flag that when set to true indicates that the maximum limit was exceeded
	MinExceeded                   bool // A flag that when set to true indicates that the minimum limit was exceeded
	RateOfChangeToleranceExceeded bool // A flag that when set to true indicates that the rate of change tolerance limit was exceeded
}

func (*ConductivityDataFlags) UnmarshalJSON

func (d *ConductivityDataFlags) UnmarshalJSON(data []byte) error

type ConductivityResponse

type ConductivityResponse struct {
	Data     []ConductivityData
	Metadata Metadata
}

func (*ConductivityResponse) UnmarshalJSON

func (m *ConductivityResponse) UnmarshalJSON(b []byte) error

type CurrentPrediction

type CurrentPrediction struct {
	Bin           string
	Depth         float64
	Direction     float64
	MeanEbbDir    float64
	MeanFloodDir  float64
	Speed         float64
	Time          time.Time
	VelocityMajor float64
}

func (*CurrentPrediction) UnmarshalJSON

func (m *CurrentPrediction) UnmarshalJSON(b []byte) error

type CurrentsData

type CurrentsData struct {
	Bin       *string
	Direction float64
	Speed     float64
	Time      time.Time
}

func (*CurrentsData) UnmarshalJSON

func (m *CurrentsData) UnmarshalJSON(b []byte) error

type CurrentsPredictionsData

type CurrentsPredictionsData struct {
	Predictions []CurrentPrediction
	Units       string
}

func (*CurrentsPredictionsData) UnmarshalJSON

func (m *CurrentsPredictionsData) UnmarshalJSON(b []byte) error

type CurrentsPredictionsRequest

type CurrentsPredictionsRequest struct {
	Bin          string            `url:"bin"`
	Date         DateParam         `url:"date"`
	Datum        string            `url:"datum"`
	Interval     IntervalParam     `url:"interval"`
	StationID    string            `url:"station"`
	TimeZone     string            `url:"time_zone"`
	Units        string            `url:"units"`
	VelocityType VelocityTypeParam `url:"velocity_type"`
}

func (*CurrentsPredictionsRequest) Validate

func (m *CurrentsPredictionsRequest) Validate() error

type CurrentsPredictionsResponse

type CurrentsPredictionsResponse struct {
	CurrentPredictions CurrentsPredictionsData
}

func (*CurrentsPredictionsResponse) UnmarshalJSON

func (m *CurrentsPredictionsResponse) UnmarshalJSON(b []byte) error

type CurrentsRequest

type CurrentsRequest struct {
	Bin       string        `url:"bin"`
	Date      DateParam     `url:"date"`
	Datum     string        `url:"datum"`
	Interval  IntervalParam `url:"interval"`
	StationID string        `url:"station"`
	TimeZone  string        `url:"time_zone"`
	Units     string        `url:"units"`
}

func (*CurrentsRequest) Validate

func (m *CurrentsRequest) Validate() error

type CurrentsResponse

type CurrentsResponse struct {
	Data     []CurrentsData
	Metadata Metadata
}

func (*CurrentsResponse) UnmarshalJSON

func (m *CurrentsResponse) UnmarshalJSON(b []byte) error

type DailyMeanData

type DailyMeanData struct {
	Flags DailyMeanDataFlags
	Time  time.Time
	Value float64
}

func (*DailyMeanData) UnmarshalJSON

func (m *DailyMeanData) UnmarshalJSON(b []byte) error

type DailyMeanDataFlags

type DailyMeanDataFlags struct {
	Inferred      bool //A flag that when set to true indicates that the water level value has been inferred
	LimitExceeded bool // A flag that when set to true indicates that either the maximum or minimum expected limit was exceeded
}

func (*DailyMeanDataFlags) UnmarshalJSON

func (d *DailyMeanDataFlags) UnmarshalJSON(data []byte) error

type DailyMeanRequest

type DailyMeanRequest struct {
	Date      DateParam     `url:"date"`
	Datum     string        `url:"datum"`
	Interval  IntervalParam `url:"interval"`
	StationID string        `url:"station"`
	TimeZone  string        `url:"time_zone"`
	Units     string        `url:"units"`
}

func (*DailyMeanRequest) Validate

func (m *DailyMeanRequest) Validate() error

type DailyMeanResponse

type DailyMeanResponse struct {
	Data     []DailyMeanData
	Metadata Metadata
}

func (*DailyMeanResponse) UnmarshalJSON

func (m *DailyMeanResponse) UnmarshalJSON(b []byte) error

type DateParam

type DateParam interface {
	Validate() error
	query.Encoder
}

different ways that date & time can be specified

type DateParamBeginAndEnd

type DateParamBeginAndEnd struct {
	BeginDate time.Time `url:"begin_date"`
	EndDate   time.Time `url:"end_date"`
}

func (*DateParamBeginAndEnd) EncodeValues

func (r *DateParamBeginAndEnd) EncodeValues(k string, v *url.Values) error

func (*DateParamBeginAndEnd) Validate

func (r *DateParamBeginAndEnd) Validate() error

type DateParamBeginAndRange

type DateParamBeginAndRange struct {
	BeginDate  time.Time `url:"begin_date"`
	RangeHours int32     `url:"range"`
}

func (*DateParamBeginAndRange) EncodeValues

func (r *DateParamBeginAndRange) EncodeValues(k string, v *url.Values) error

func (*DateParamBeginAndRange) Validate

func (r *DateParamBeginAndRange) Validate() error

type DateParamEndAndRange

type DateParamEndAndRange struct {
	EndDate    time.Time `url:"end_date"`
	RangeHours int32     `url:"range"`
}

func (*DateParamEndAndRange) EncodeValues

func (r *DateParamEndAndRange) EncodeValues(k string, v *url.Values) error

func (*DateParamEndAndRange) Validate

func (r *DateParamEndAndRange) Validate() error

type DateRange

type DateRange struct {
	RangeHours int32 `url:"range"`
}

func (*DateRange) EncodeValues

func (r *DateRange) EncodeValues(k string, v *url.Values) error

func (*DateRange) Validate

func (r *DateRange) Validate() error

type DateRelative

type DateRelative struct {
	Relative RelativeDateOpt `url:"date"`
}

func (*DateRelative) EncodeValues

func (r *DateRelative) EncodeValues(k string, v *url.Values) error

func (*DateRelative) Validate

func (r *DateRelative) Validate() error

type Datum

type Datum struct {
	Name  string
	Value float64
}

func (*Datum) UnmarshalJSON

func (m *Datum) UnmarshalJSON(b []byte) error

type DatumsRequest

type DatumsRequest struct {
	StationID string `url:"station"`
	Units     string `url:"units"`
}

func (*DatumsRequest) Validate

func (m *DatumsRequest) Validate() error

type DatumsResponse

type DatumsResponse struct {
	Datums []Datum
}

func (*DatumsResponse) UnmarshalJSON

func (m *DatumsResponse) UnmarshalJSON(b []byte) error

type ErrorDetail

type ErrorDetail struct {
	Message string `json:"message"`
}

type ErrorResponse

type ErrorResponse struct {
	Error ErrorDetail `json:"error"`
}

type HighLowData

type HighLowData struct {
	Flags HighLowDataFlags
	Time  time.Time
	Type  string
	Value float64
}

func (*HighLowData) UnmarshalJSON

func (m *HighLowData) UnmarshalJSON(b []byte) error

type HighLowDataFlags

type HighLowDataFlags struct {
	Inferred      bool //A flag that when set to true indicates that the water level value has been inferred
	LimitExceeded bool // A flag that when set to true indicates that either the maximum or minimum expected limit was exceeded
}

func (*HighLowDataFlags) UnmarshalJSON

func (d *HighLowDataFlags) UnmarshalJSON(data []byte) error

type HighLowResponse

type HighLowResponse struct {
	Data     []HighLowData
	Metadata Metadata
}

func (*HighLowResponse) UnmarshalJSON

func (m *HighLowResponse) UnmarshalJSON(b []byte) error

type HourlyHeightData

type HourlyHeightData struct {
	Flags HourlyHeightDataFlags
	Sigma float64
	Time  time.Time
	Value float64
}

func (*HourlyHeightData) UnmarshalJSON

func (m *HourlyHeightData) UnmarshalJSON(b []byte) error

type HourlyHeightDataFlags

type HourlyHeightDataFlags struct {
	Inferred      bool //A flag that when set to true indicates that the water level value has been inferred
	LimitExceeded bool // A flag that when set to true indicates that either the maximum or minimum expected limit was exceeded
}

func (*HourlyHeightDataFlags) UnmarshalJSON

func (d *HourlyHeightDataFlags) UnmarshalJSON(data []byte) error

type HourlyHeightResponse

type HourlyHeightResponse struct {
	Data     []HourlyHeightData
	Metadata Metadata
}

func (*HourlyHeightResponse) UnmarshalJSON

func (m *HourlyHeightResponse) UnmarshalJSON(b []byte) error

type HumidityData

type HumidityData struct {
	Flags HumidityDataFlags
	Time  time.Time
	Value *float64
}

func (*HumidityData) UnmarshalJSON

func (m *HumidityData) UnmarshalJSON(b []byte) error

type HumidityDataFlags

type HumidityDataFlags struct {
	MaxExceeded                   bool // A flag that when set to true indicates that the maximum limit was exceeded
	MinExceeded                   bool // A flag that when set to true indicates that the minimum limit was exceeded
	RateOfChangeToleranceExceeded bool // A flag that when set to true indicates that the rate of change tolerance limit was exceeded
}

func (*HumidityDataFlags) UnmarshalJSON

func (d *HumidityDataFlags) UnmarshalJSON(data []byte) error

type HumidityResponse

type HumidityResponse struct {
	Data     []HumidityData
	Metadata Metadata
}

func (*HumidityResponse) UnmarshalJSON

func (m *HumidityResponse) UnmarshalJSON(b []byte) error

type IntervalParam

type IntervalParam string

func (IntervalParam) Validate

func (i IntervalParam) Validate() error

type Metadata

type Metadata struct {
	Latitude    float64
	Longitude   float64
	StationID   string
	StationName string
}

func (*Metadata) UnmarshalJSON

func (m *Metadata) UnmarshalJSON(b []byte) error

type MonthlyMeanData

type MonthlyMeanData struct {
	DHQ      float64
	DLQ      float64
	DTL      float64
	GT       float64
	HWI      float64
	Highest  float64
	Inferred bool
	LWI      float64
	Lowest   float64
	MHHW     float64
	MHW      float64
	MLLW     float64
	MLW      float64
	MN       float64
	MSL      float64
	MTL      float64
	Month    string
	Year     string
}

func (*MonthlyMeanData) UnmarshalJSON

func (m *MonthlyMeanData) UnmarshalJSON(b []byte) error

type MonthlyMeanResponse

type MonthlyMeanResponse struct {
	Data     []MonthlyMeanData
	Metadata Metadata
}

func (*MonthlyMeanResponse) UnmarshalJSON

func (m *MonthlyMeanResponse) UnmarshalJSON(b []byte) error

type PreliminaryWaterLevelDataFlags

type PreliminaryWaterLevelDataFlags struct {
	Outliers                      int  // Count of number of 1 second samples that fall outside a 3-sigma band about the mean
	FlatToleranceExceeded         bool // A flag that when set to true indicates that the flat tolerance limit was exceeded
	RateOfChangeToleranceExceeded bool // A flag that when set to true indicates that the rate of change tolerance limit was exceeded
	LimitExceeded                 bool // A flag that when set to true indicates that either the maximum or minimum expected limit was exceeded
}

func (*PreliminaryWaterLevelDataFlags) UnmarshalJSON

func (d *PreliminaryWaterLevelDataFlags) UnmarshalJSON(data []byte) error

type QualityLevel

type QualityLevel string

type RelativeDateOpt

type RelativeDateOpt string

type SalinityData

type SalinityData struct {
	Salinity float64
	Time     time.Time
}

func (*SalinityData) UnmarshalJSON

func (m *SalinityData) UnmarshalJSON(b []byte) error

type SalinityResponse

type SalinityResponse struct {
	Data     []SalinityData
	Metadata Metadata
}

func (*SalinityResponse) UnmarshalJSON

func (m *SalinityResponse) UnmarshalJSON(b []byte) error

type StandardRequest

type StandardRequest struct {
	Date      DateParam     `url:"date"`
	Datum     string        `url:"datum"`
	Interval  IntervalParam `url:"interval"`
	StationID string        `url:"station"`
	TimeZone  string        `url:"time_zone"`
	Units     string        `url:"units"`
}

func (*StandardRequest) Validate

func (m *StandardRequest) Validate() error

type TidePrediction

type TidePrediction struct {
	Time  time.Time
	Type  *string
	Value float64
}

func (*TidePrediction) UnmarshalJSON

func (m *TidePrediction) UnmarshalJSON(b []byte) error

type TidePredictionsRequest

type TidePredictionsRequest struct {
	Date      DateParam     `url:"date"`
	Datum     string        `url:"datum"`
	Interval  IntervalParam `url:"interval"`
	StationID string        `url:"station"`
	TimeZone  string        `url:"time_zone"`
	Units     string        `url:"units"`
}

func (*TidePredictionsRequest) Validate

func (m *TidePredictionsRequest) Validate() error

type TidePredictionsResponse

type TidePredictionsResponse struct {
	Predictions []TidePrediction
}

func (*TidePredictionsResponse) UnmarshalJSON

func (m *TidePredictionsResponse) UnmarshalJSON(b []byte) error

type VelocityTypeParam

type VelocityTypeParam string

func (VelocityTypeParam) Validate

func (v VelocityTypeParam) Validate() error

type VerifiedWaterLevelDataFlags

type VerifiedWaterLevelDataFlags struct {
	Inferred                      bool //A flag that when set to true indicates that the water level value has been inferred
	FlatToleranceExceeded         bool // A flag that when set to true indicates that the flat tolerance limit was exceeded
	RateOfChangeToleranceExceeded bool // A flag that when set to true indicates that the rate of change tolerance limit was exceeded
	LimitExceeded                 bool // A flag that when set to true indicates that either the maximum or minimum expected limit was exceeded
}

func (*VerifiedWaterLevelDataFlags) UnmarshalJSON

func (d *VerifiedWaterLevelDataFlags) UnmarshalJSON(data []byte) error

type VisibilityData

type VisibilityData struct {
	Flags VisibilityDataFlags
	Time  time.Time
	Value float64
}

func (*VisibilityData) UnmarshalJSON

func (m *VisibilityData) UnmarshalJSON(b []byte) error

type VisibilityDataFlags

type VisibilityDataFlags struct {
	MaxExceeded                   bool // A flag that when set to true indicates that the maximum limit was exceeded
	MinExceeded                   bool // A flag that when set to true indicates that the minimum limit was exceeded
	RateOfChangeToleranceExceeded bool // A flag that when set to true indicates that the rate of change tolerance limit was exceeded
}

func (*VisibilityDataFlags) UnmarshalJSON

func (d *VisibilityDataFlags) UnmarshalJSON(data []byte) error

type VisibilityResponse

type VisibilityResponse struct {
	Data     []VisibilityData
	Metadata Metadata
}

func (*VisibilityResponse) UnmarshalJSON

func (m *VisibilityResponse) UnmarshalJSON(b []byte) error

type WaterLevelData

type WaterLevelData struct {
	DataFlags    WaterLevelDataFlags
	QualityLevel QualityLevel
	Sigma        *float64
	Time         time.Time
	Value        float64
}

func (*WaterLevelData) UnmarshalJSON

func (m *WaterLevelData) UnmarshalJSON(b []byte) error

custom unmarshal for WaterLevelData

type WaterLevelDataFlags

type WaterLevelDataFlags interface{}

type WaterLevelResponse

type WaterLevelResponse struct {
	Data     []WaterLevelData
	Metadata Metadata
}

func (*WaterLevelResponse) UnmarshalJSON

func (m *WaterLevelResponse) UnmarshalJSON(b []byte) error

type WaterTemperatureData

type WaterTemperatureData struct {
	Flags WaterTemperatureDataFlags
	Time  time.Time
	Value float64
}

func (*WaterTemperatureData) UnmarshalJSON

func (m *WaterTemperatureData) UnmarshalJSON(b []byte) error

type WaterTemperatureDataFlags

type WaterTemperatureDataFlags struct {
	MaxExceeded                   bool // A flag that when set to true indicates that the maximum limit was exceeded
	MinExceeded                   bool // A flag that when set to true indicates that the minimum limit was exceeded
	RateOfChangeToleranceExceeded bool // A flag that when set to true indicates that the rate of change tolerance limit was exceeded
}

func (*WaterTemperatureDataFlags) UnmarshalJSON

func (d *WaterTemperatureDataFlags) UnmarshalJSON(data []byte) error

type WaterTemperatureResponse

type WaterTemperatureResponse struct {
	Data     []WaterTemperatureData
	Metadata Metadata
}

func (*WaterTemperatureResponse) UnmarshalJSON

func (m *WaterTemperatureResponse) UnmarshalJSON(b []byte) error

type WindData

type WindData struct {
	Direction         float64
	DirectionCardinal string
	Flags             WindDataFlags
	Gust              float64
	Speed             float64
	Time              time.Time
}

func (*WindData) UnmarshalJSON

func (m *WindData) UnmarshalJSON(b []byte) error

type WindDataFlags

type WindDataFlags struct {
	MaxExceeded                   bool // A flag that when set to true indicates that the maximum limit was exceeded
	RateOfChangeToleranceExceeded bool // A flag that when set to true indicates that the rate of change tolerance limit was exceeded
}

func (*WindDataFlags) UnmarshalJSON

func (d *WindDataFlags) UnmarshalJSON(data []byte) error

type WindResponse

type WindResponse struct {
	Data     []WindData
	Metadata Metadata
}

func (*WindResponse) UnmarshalJSON

func (m *WindResponse) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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