noaa

package
v0.0.0-...-b7d5911 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataResponse

type DataResponse struct {
	Query *models.NOAAQuery
	URL   string

	Metadata    StationMeta   `json:"metadata,omitempty"`
	Data        []Datum       `json:"data,omitempty"`
	Predictions []Datum       `json:"predictions,omitempty"`
	Error       ResponseError `json:"error,omitempty"`
}

func (*DataResponse) Frames

func (r *DataResponse) Frames() (data.Frames, error)

type Datum

type Datum struct {
	T  string `json:"t,omitempty"`
	V  string `json:"v,omitempty"`
	S  string `json:"s,omitempty"`
	TY string `json:"ty,omitempty"`
	D  string `json:"d,omitempty"`
	DR string `json:"dr,omitempty"`
	G  string `json:"g,omitempty"`
	F  string `json:"f,omitempty"`
	Q  string `json:"q,omitempty"`
}

type NOAAClient

func NewNOAAClient

func NewNOAAClient() NOAAClient

func (*NOAAClient) Fetch

func (c *NOAAClient) Fetch(ctx context.Context, q *models.NOAAQuery) ([]byte, error)

func (*NOAAClient) Query

func (c *NOAAClient) Query(ctx context.Context, q *models.NOAAQuery) data.Framer

type ResponseError

type ResponseError struct {
	Message string `json:"message,omitempty"`
}

type StationMeta

type StationMeta struct {
	ID   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
	Lat  string `json:"lat,omitempty"`
	Lon  string `json:"lon,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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