iot

package
v0.0.35 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CharacteristicsEndpoints

func CharacteristicsEndpoints(control *Controller, router *httprouter.Router)

func DeviceTypesEndpoints

func DeviceTypesEndpoints(control *Controller, router *httprouter.Router)

func DevicesEndpoints

func DevicesEndpoints(control *Controller, router *httprouter.Router)

func HubsEndpoints

func HubsEndpoints(control *Controller, router *httprouter.Router)

func LocalDevicesEndpoints

func LocalDevicesEndpoints(control *Controller, router *httprouter.Router)

func Mock

func Mock(config configuration.Config, ctx context.Context) (err error)

func ProtocolsEndpoints

func ProtocolsEndpoints(control *Controller, router *httprouter.Router)

Types

type Controller

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

func (*Controller) DeviceLocalIdToId

func (this *Controller) DeviceLocalIdToId(id string) (result string, err error, code int)

func (*Controller) PublishCharacteristicCreate

func (this *Controller) PublishCharacteristicCreate(characteristic model.Characteristic) (result interface{}, err error, code int)

func (*Controller) PublishCharacteristicDelete

func (this *Controller) PublishCharacteristicDelete(id string) (err error, code int)

func (*Controller) PublishCharacteristicUpdate

func (this *Controller) PublishCharacteristicUpdate(id string, characteristic model.Characteristic) (result interface{}, err error, code int)

func (*Controller) PublishDeviceCreate

func (this *Controller) PublishDeviceCreate(device model.Device) (result interface{}, err error, code int)

func (*Controller) PublishDeviceDelete

func (this *Controller) PublishDeviceDelete(id string) (err error, code int)

func (*Controller) PublishDeviceTypeCreate

func (this *Controller) PublishDeviceTypeCreate(devicetype model.DeviceType) (result interface{}, err error, code int)

func (*Controller) PublishDeviceTypeDelete

func (this *Controller) PublishDeviceTypeDelete(id string) (err error, code int)

func (*Controller) PublishDeviceTypeUpdate

func (this *Controller) PublishDeviceTypeUpdate(id string, devicetype model.DeviceType) (result interface{}, err error, code int)

func (*Controller) PublishDeviceUpdate

func (this *Controller) PublishDeviceUpdate(id string, device model.Device) (result interface{}, err error, code int)

func (*Controller) PublishHubCreate

func (this *Controller) PublishHubCreate(hub model.Hub) (result interface{}, err error, code int)

func (*Controller) PublishHubDelete

func (this *Controller) PublishHubDelete(id string) (err error, code int)

func (*Controller) PublishHubUpdate

func (this *Controller) PublishHubUpdate(id string, hub model.Hub) (result interface{}, err error, code int)

func (*Controller) PublishProtocolCreate

func (this *Controller) PublishProtocolCreate(protocol model.Protocol) (result interface{}, err error, code int)

func (*Controller) PublishProtocolDelete

func (this *Controller) PublishProtocolDelete(id string) (err error, code int)

func (*Controller) PublishProtocolUpdate

func (this *Controller) PublishProtocolUpdate(id string, protocol model.Protocol) (result interface{}, err error, code int)

func (*Controller) ReadCharacteristic

func (this *Controller) ReadCharacteristic(id string) (result interface{}, err error, code int)

func (*Controller) ReadDevice

func (this *Controller) ReadDevice(id string) (result interface{}, err error, code int)

func (*Controller) ReadDeviceType

func (this *Controller) ReadDeviceType(id string) (result interface{}, err error, code int)

func (*Controller) ReadHub

func (this *Controller) ReadHub(id string) (result interface{}, err error, code int)

func (*Controller) ReadProtocol

func (this *Controller) ReadProtocol(id string) (result interface{}, err error, code int)

type LoggerMiddleWare

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

func NewLogger

func NewLogger(handler http.Handler, logLevel string) *LoggerMiddleWare

func (*LoggerMiddleWare) ServeHTTP

func (this *LoggerMiddleWare) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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