topic

package
v0.0.0-...-6312dd6 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SetProperty = "SetProperty"
	GetDevices  = "GetDevices"
	GetThings   = "GetMapOfThings"

	Pair    = "pair"
	Unpair  = "unpair"
	Pending = "pending"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DeviceActionStatusMessage

type DeviceActionStatusMessage struct {
	DeviceId string
	Action   actions.ActionDescription
}

type DeviceAddedMessage

type DeviceAddedMessage struct {
	DeviceId string
	devices.Device
}

type DeviceConnectedMessage

type DeviceConnectedMessage struct {
	DeviceId  string
	Connected bool
}

type DevicePropertyChangedMessage

type DevicePropertyChangedMessage struct {
	DeviceId     string
	PropertyName string
	properties.PropertyDescription
}

type ThingActionDescription

type ThingActionDescription struct {
	Id            string         `json:"id,omitempty"`
	Name          string         `json:"name,omitempty"`
	Input         map[string]any `json:"input,omitempty"`
	Status        string         `json:"status,omitempty"`
	TimeRequested string         `json:"timeRequested,omitempty"`
	TimeCompleted string         `json:"timeCompleted,omitempty"`
}

type ThingActionStatusMessage

type ThingActionStatusMessage struct {
	ThingId string
	Action  ThingActionDescription
}

type ThingAddedMessage

type ThingAddedMessage struct {
	ThingId string
	Data    []byte
}

type ThingConnectedMessage

type ThingConnectedMessage struct {
	ThingId   string
	Connected bool
}

type ThingEventMessage

type ThingEventMessage struct {
	ThingId string
}

type ThingModifyMessage

type ThingModifyMessage struct {
	ThingId string
}

type ThingPropertyChangedMessage

type ThingPropertyChangedMessage struct {
	ThingId      string
	PropertyName string
	Value        any
}

type ThingRemovedMessage

type ThingRemovedMessage struct {
	ThingId string
}

type Topic

type Topic string
const (
	ThingAdded           Topic = "thingAdded"
	ThingRemoved         Topic = "thingRemoved"
	ThingConnected       Topic = "thingConnected"
	ThingModify          Topic = "thingModify"
	ThingPropertyChanged Topic = "thingPropertyChanged"
	ThingEvent           Topic = "thingEvent"
	ThingActionStatus    Topic = "thingActionStatus"

	DeviceAdded           Topic = "deviceAdded"
	DevicePropertyChanged Topic = "devicePropertyChanged"
	DeviceActionStatus    Topic = "deviceActionStatus"
	DeviceEvent           Topic = "deviceEvent"
	DeviceRemoved         Topic = "deviceRemoved"
	DeviceConnected       Topic = "deviceConnected"
	AdapterAdded          Topic = "adapterAdded"

	PairingTimeout Topic = "pairingTimeout"
)
const (
	ValueChanged Topic = "valueChanged"
	StateChanged Topic = "stateChanged"
)

func (Topic) ToString

func (t Topic) ToString() string

Jump to

Keyboard shortcuts

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