controller

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: Apache-2.0 Imports: 15 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 DeviceOfflineNotificationInfo added in v0.0.7

type DeviceOfflineNotificationInfo struct {
	DeviceId     string `json:"device_id" bson:"device_id"`
	OfflineSince int64  `json:"offline_since" bson:"offline_since"`
	Notified     bool   `json:"notified" bson:"notified"`
}

type DeviceState

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

type HubState

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

type Notification added in v0.0.7

type Notification struct {
	UserId  string `json:"userId" bson:"userId"`
	Title   string `json:"title" bson:"title"`
	Message string `json:"message" bson:"message"`
	Topic   string `json:"topic" bson:"topic"`
}

Jump to

Keyboard shortcuts

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