Documentation ¶
Index ¶
- func DeviceTypesEndpoints(control *Controller, router *httprouter.Router)
- func DevicesEndpoints(control *Controller, router *httprouter.Router)
- func HubsEndpoints(control *Controller, router *httprouter.Router)
- func LocalDevicesEndpoints(control *Controller, router *httprouter.Router)
- func Mock(ctx context.Context, config configuration.Config) (deviceManagerUrl string, deviceRepoUrl string, err error)
- func MockWithoutKafka(ctx context.Context) (deviceManagerUrl string, deviceRepoUrl string, err error)
- func ProtocolsEndpoints(control *Controller, router *httprouter.Router)
- type Controller
- func (this *Controller) DeviceLocalIdToId(id string) (result string, err error, code int)
- func (this *Controller) PublishDeviceCreate(device model.Device) (result interface{}, err error, code int)
- func (this *Controller) PublishDeviceDelete(id string) (err error, code int)
- func (this *Controller) PublishDeviceTypeCreate(devicetype model.DeviceType) (result interface{}, err error, code int)
- func (this *Controller) PublishDeviceTypeDelete(id string) (err error, code int)
- func (this *Controller) PublishDeviceTypeUpdate(id string, devicetype model.DeviceType) (result interface{}, err error, code int)
- func (this *Controller) PublishDeviceUpdate(id string, device model.Device) (result interface{}, err error, code int)
- func (this *Controller) PublishHubCreate(hub model.Hub) (result interface{}, err error, code int)
- func (this *Controller) PublishHubDelete(id string) (err error, code int)
- func (this *Controller) PublishHubUpdate(id string, hub model.Hub) (result interface{}, err error, code int)
- func (this *Controller) PublishProtocolCreate(protocol model.Protocol) (result interface{}, err error, code int)
- func (this *Controller) PublishProtocolDelete(id string) (err error, code int)
- func (this *Controller) PublishProtocolUpdate(id string, protocol model.Protocol) (result interface{}, err error, code int)
- func (this *Controller) ReadDevice(id string) (result interface{}, err error, code int)
- func (this *Controller) ReadDeviceType(id string) (result interface{}, err error, code int)
- func (this *Controller) ReadHub(id string) (result interface{}, err error, code int)
- func (this *Controller) ReadProtocol(id string) (result interface{}, err error, code int)
- type LoggerMiddleWare
- type MockProducer
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 MockWithoutKafka ¶
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 (*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 (*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 (*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 (*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)
Click to show internal directories.
Click to hide internal directories.