wsupload

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NullFloat64

type NullFloat64 struct {
	Valid   bool
	Float64 float64
}

func (NullFloat64) IsNull

func (v NullFloat64) IsNull() bool

func (NullFloat64) MarshalJSON

func (v NullFloat64) MarshalJSON() ([]byte, error)

MarshalJSON is the implementation of json.Marshaler

func (*NullFloat64) UnmarshalJSON

func (v *NullFloat64) UnmarshalJSON(data []byte) error

UnmarshalJSON is the implementation of json.Unmarshaler

func (NullFloat64) Value

func (v NullFloat64) Value() interface{}

type NullInt64

type NullInt64 struct {
	Valid bool
	Int64 int64
}

func (NullInt64) IsNull

func (v NullInt64) IsNull() bool

func (NullInt64) MarshalJSON

func (v NullInt64) MarshalJSON() ([]byte, error)

MarshalJSON is the implementation of json.Marshaler

func (*NullInt64) UnmarshalJSON

func (v *NullInt64) UnmarshalJSON(data []byte) error

UnmarshalJSON is the implementation of json.Unmarshaler

func (NullInt64) Value

func (v NullInt64) Value() interface{}

type Nullable

type Nullable interface {
	IsNull() bool
	Value() interface{}
}

type Observation

type Observation struct {
	StationID    string `ws:"ID" json:"station_id" influx:"station_id,tag" homeassistant:"Station ID"`
	SoftwareType string `ws:"softwaretype" json:"software_type" homeassistant:"Software type"`

	ObservationTime time.Time `` /* 144-byte string literal not displayed */

	OutsideTemperatureCelsius NullFloat64 `` /* 187-byte string literal not displayed */
	IndoorTemperatureCelsius  NullFloat64 `` /* 191-byte string literal not displayed */
	DewpointCelsius           NullFloat64 `` /* 166-byte string literal not displayed */
	WindchillCelsius          NullFloat64 `` /* 172-byte string literal not displayed */

	OutsideRelativeHumidity NullFloat64 `` /* 156-byte string literal not displayed */
	IndoorRelativeHumidity  NullFloat64 `` /* 160-byte string literal not displayed */

	RelativeAtmosphericPressurePascal NullFloat64 `` /* 210-byte string literal not displayed */
	AbsoluteAtmosphericPressurePascal NullFloat64 `` /* 213-byte string literal not displayed */

	UVIndex                           NullFloat64 `ws:"UV" json:"uv_index" homeassistant:"UV index,state_class=measurement,unit_of_measurement=UV"`
	SolarRadiationWattPerMeterSquared NullFloat64 `` /* 147-byte string literal not displayed */

	WindDirectionDegrees     NullInt64   `ws:"winddir" json:"wind_direction_degrees" homeassistant:"Wind direction,state_class=measurement,unit_of_measurement=°"`
	WindSpeedMetersPerSecond NullFloat64 `` /* 164-byte string literal not displayed */
	WindGustMetersPerSecond  NullFloat64 `` /* 161-byte string literal not displayed */

	HourlyRainMillimeters  NullFloat64 `` /* 133-byte string literal not displayed */
	DailyRainMillimeters   NullFloat64 `` /* 136-byte string literal not displayed */
	WeeklyRainMillimeters  NullFloat64 `` /* 139-byte string literal not displayed */
	MonthlyRainMillimeters NullFloat64 `` /* 142-byte string literal not displayed */
}

func Parse

func Parse(params url.Values, logger *zap.Logger) (*Observation, error)

type Publisher

type Publisher interface {
	Publish(obs *Observation) error

	Close() error
}

Jump to

Keyboard shortcuts

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