weather_data

package
v0.0.0-...-2b4790d Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FloatSignal

type FloatSignal interface {
	Connect(slot FloatSlot, priority uint) signal.Connection
	Emit(data float64)
}

type FloatSlot

type FloatSlot func(data float64)

type Getter

type Getter interface {
	GetTemperature() float64
	GetPressure() float64
	GetHumidity() float64
}

type GetterPro

type GetterPro interface {
	Getter
	GetWind() (speed, direction float64)
}

type Setter

type Setter interface {
	SetTemperature(float64)
	SetPressure(float64)
	SetHumidity(float64)
	SetValues(temperature, pressure, humidity float64)
}

type SetterPro

type SetterPro interface {
	Setter
	SetWind(speed, direction float64)
	SetValuesPro(temperature, pressure, humidity, speed, direction float64)
}

type Signal

type Signal interface {
	DoOnTemperatureChange(slot FloatSlot, priority uint) signal.Connection
	DoOnPressureChange(slot FloatSlot, priority uint) signal.Connection
	DoOnHumidityChange(slot FloatSlot, priority uint) signal.Connection
}

type SignalPro

type SignalPro interface {
	Signal

	DoOnWindChange(slot WindSlot, priority uint) signal.Connection
}

type WeatherData

type WeatherData interface {
	Setter
	Getter
	Signal
}

type WeatherDataPro

type WeatherDataPro interface {
	SetterPro
	GetterPro
	SignalPro
}

func New

func New() WeatherDataPro

type WindInfo

type WindInfo struct {
	Speed     float64
	Direction float64
}

type WindSignal

type WindSignal interface {
	Connect(slot WindSlot, priority uint) signal.Connection
	Emit(data WindInfo)
}

type WindSlot

type WindSlot func(data WindInfo)

Jump to

Keyboard shortcuts

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