iot

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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(ctx context.Context, config configuration.Config) (deviceManagerUrl string, deviceRepoUrl string, err error)

func MockWithoutKafka

func MockWithoutKafka(ctx context.Context) (deviceManagerUrl string, deviceRepoUrl string, 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) 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) 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)

type MockProducer

type MockProducer struct {
}

func (MockProducer) Close

func (this MockProducer) Close()

func (MockProducer) Log

func (this MockProducer) Log(logger *log.Logger)

func (MockProducer) Produce

func (this MockProducer) Produce(topic string, message string) (err error)

func (MockProducer) ProduceWithKey

func (this MockProducer) ProduceWithKey(topic string, message string, key string) (err error)

Jump to

Keyboard shortcuts

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