models

package
v1.5.5 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorDeviceNotFound                   = errors.New("ErrorDeviceNotFound")
	ErrorDeviceAuthNotFound               = errors.New("ErrorDeviceAuthNotFound")
	ErrorDeviceStatusRawNotFound          = errors.New("ErrorDeviceStatusRawNotFound")
	ErrorDeviceStatusAvailabilityNotFound = errors.New("ErrorDeviceStatusAvailabilityNotFound")

	ErrorDeviceStatusAmbientTempNotFound = errors.New("ErrorDeviceStatusAmbientTempNotFound")
)

Functions

This section is empty.

Types

type Device added in v1.4.0

type Device struct {
	Config          models_service.DeviceConfig
	Auth            *models_service.DeviceAuth
	DeviceStatus    DeviceStatus
	DeviceStatusRaw *models_service.DeviceStatusRaw
	MqttLastMessage MqttStatus
}

type DeviceStatus added in v1.4.0

type DeviceStatus struct {
	Availability *string
	AmbientTemp  *float32
}

type MqttDisplaySwitchMessage added in v1.4.0

type MqttDisplaySwitchMessage struct {
	UpdatedAt   time.Time
	IsDisplayOn bool
}

type MqttFanModeMessage

type MqttFanModeMessage struct {
	UpdatedAt time.Time
	FanMode   string
}

type MqttModeMessage

type MqttModeMessage struct {
	UpdatedAt time.Time
	Mode      string
}

type MqttStatus added in v1.4.0

type MqttStatus struct {
	FanMode       *MqttFanModeMessage
	SwingMode     *MqttSwingModeMessage
	Mode          *MqttModeMessage
	Temperature   *MqttTemperatureMessage
	DisplaySwitch *MqttDisplaySwitchMessage
}

type MqttSwingModeMessage

type MqttSwingModeMessage struct {
	UpdatedAt time.Time
	SwingMode string
}

type MqttTemperatureMessage

type MqttTemperatureMessage struct {
	UpdatedAt   time.Time
	Temperature float32
}

type ReadAmbientTempInput

type ReadAmbientTempInput struct {
	Mac string
}

type ReadAmbientTempReturn

type ReadAmbientTempReturn struct {
	Temperature float32
}

type ReadAuthedDevicesReturn

type ReadAuthedDevicesReturn struct {
	Macs []string
}

type ReadDeviceAuthInput

type ReadDeviceAuthInput struct {
	Mac string
}

type ReadDeviceAuthReturn

type ReadDeviceAuthReturn struct {
	Auth models_service.DeviceAuth
}

type ReadDeviceAvailabilityInput

type ReadDeviceAvailabilityInput struct {
	Mac string
}

type ReadDeviceAvailabilityReturn

type ReadDeviceAvailabilityReturn struct {
	Availability string
}

type ReadDeviceConfigInput

type ReadDeviceConfigInput struct {
	Mac string
}

type ReadDeviceConfigReturn

type ReadDeviceConfigReturn struct {
	Config models_service.DeviceConfig
}

type ReadDeviceStatusRawInput

type ReadDeviceStatusRawInput struct {
	Mac string
}

type ReadDeviceStatusRawReturn

type ReadDeviceStatusRawReturn struct {
	Status models_service.DeviceStatusRaw
}

type ReadMqttMessageInput

type ReadMqttMessageInput struct {
	Mac string
}

type ReadMqttMessageReturn

type ReadMqttMessageReturn struct {
	Temperature *MqttTemperatureMessage
	SwingMode   *MqttSwingModeMessage
	FanMode     *MqttFanModeMessage
	Mode        *MqttModeMessage
	IsDisplayOn *MqttDisplaySwitchMessage
}

type UpsertAmbientTempInput

type UpsertAmbientTempInput struct {
	Mac         string
	Temperature float32
}

type UpsertDeviceAuthInput

type UpsertDeviceAuthInput struct {
	Mac  string
	Auth models_service.DeviceAuth
}

type UpsertDeviceAvailabilityInput

type UpsertDeviceAvailabilityInput struct {
	Mac          string
	Availability string
}

type UpsertDeviceConfigInput

type UpsertDeviceConfigInput struct {
	Config models_service.DeviceConfig
}

type UpsertDeviceStatusRawInput

type UpsertDeviceStatusRawInput struct {
	Mac    string
	Status models_service.DeviceStatusRaw
}

type UpsertMqttDisplaySwitchMessageInput added in v1.4.0

type UpsertMqttDisplaySwitchMessageInput struct {
	Mac           string
	DisplaySwitch MqttDisplaySwitchMessage
}

type UpsertMqttFanModeMessageInput

type UpsertMqttFanModeMessageInput struct {
	Mac     string
	FanMode MqttFanModeMessage
}

type UpsertMqttModeMessageInput

type UpsertMqttModeMessageInput struct {
	Mac  string
	Mode MqttModeMessage
}

type UpsertMqttSwingModeMessageInput

type UpsertMqttSwingModeMessageInput struct {
	Mac       string
	SwingMode MqttSwingModeMessage
}

type UpsertMqttTemperatureMessageInput

type UpsertMqttTemperatureMessageInput struct {
	Mac         string
	Temperature MqttTemperatureMessage
}

Jump to

Keyboard shortcuts

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