controller

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

func New

func New(config config.Config) *Controller

func (*Controller) LogDevice

func (this *Controller) LogDevice(devicelog model.DeviceLog) error

func (*Controller) LogHub

func (this *Controller) LogHub(hublog model.HubLog) error

func (*Controller) UpdateDevice

func (this *Controller) UpdateDevice(command model.DeviceCommand) error

func (*Controller) UpdateHub

func (this *Controller) UpdateHub(command model.HubCommand) error

type DeviceState

type DeviceState struct {
	Device string `json:"device,omitempty" bson:"device,omitempty"`
	Online bool   `json:"online" bson:"online"`
}

type HubState

type HubState struct {
	Gateway string `json:"gateway,omitempty" bson:"gateway,omitempty"`
	Online  bool   `json:"online" bson:"online"`
}

Jump to

Keyboard shortcuts

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