service

package
v0.0.0-...-623860c Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 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 DeviceManagementService

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

func (*DeviceManagementService) AddDeviceSubDevices

func (dms *DeviceManagementService) AddDeviceSubDevices(modelId, deviceId string, subDevices *models.DeviceSubDeviceList) error

func (*DeviceManagementService) CreateDevice

func (dms *DeviceManagementService) CreateDevice(modelId string, req *models.DeviceReq) (*models.Device, error)

func (*DeviceManagementService) CreateDeviceModel

func (dms *DeviceManagementService) CreateDeviceModel(dmReq *models.DeviceModelReq) (*models.DeviceModel, error)

func (*DeviceManagementService) CreateDeviceModelFeature

func (dms *DeviceManagementService) CreateDeviceModelFeature(modelId string, dmFeature *models.DeviceModelFeature) (*models.DeviceModel, error)

func (*DeviceManagementService) CreateDeviceModelFeatureOnEdge

func (dms *DeviceManagementService) CreateDeviceModelFeatureOnEdge(modelId string, dmFeature *models.DeviceModelFeature) (*models.DeviceModel, error)

func (*DeviceManagementService) CreateDeviceModelOnEdge

func (dms *DeviceManagementService) CreateDeviceModelOnEdge(dm *models.DeviceModel) (*models.DeviceModel, error)

func (*DeviceManagementService) CreateDeviceOnEdge

func (dms *DeviceManagementService) CreateDeviceOnEdge(device *models.Device) (*models.Device, error)

func (*DeviceManagementService) DeleteDevice

func (dms *DeviceManagementService) DeleteDevice(modelId, deviceId string) error

func (*DeviceManagementService) DeleteDeviceModel

func (dms *DeviceManagementService) DeleteDeviceModel(modelId string) error

func (*DeviceManagementService) DeleteDeviceModelFeature

func (dms *DeviceManagementService) DeleteDeviceModelFeature(modelId, featureId string) error

func (*DeviceManagementService) DeleteDeviceModelPlugin

func (dms *DeviceManagementService) DeleteDeviceModelPlugin(modelId, pluginName string) error

func (*DeviceManagementService) DeleteDeviceSubDevices

func (dms *DeviceManagementService) DeleteDeviceSubDevices(modelId, deviceId string, subDevices *models.DeviceSubDeviceList) error

func (*DeviceManagementService) ExportDeviceModels

func (dms *DeviceManagementService) ExportDeviceModels(keyword string) (*models.DeviceModelImport2ExportList, error)

func (*DeviceManagementService) ExportDevices

func (dms *DeviceManagementService) ExportDevices(modelId, keyword string) (*models.DeviceImport2ExportList, error)

func (*DeviceManagementService) GetDevice

func (dms *DeviceManagementService) GetDevice(modelId, deviceId string) (*models.Device, error)

func (*DeviceManagementService) GetDeviceModel

func (dms *DeviceManagementService) GetDeviceModel(modelId string) (*models.DeviceModel, error)

func (*DeviceManagementService) GetDeviceModelFeature

func (dms *DeviceManagementService) GetDeviceModelFeature(modelId, featureId string) (*models.DeviceModelFeature, error)

func (*DeviceManagementService) GetDeviceTopology

func (dms *DeviceManagementService) GetDeviceTopology(modelId, deviceId string) (*models.DeviceTopology, error)

func (*DeviceManagementService) ImportDeviceModels

func (dms *DeviceManagementService) ImportDeviceModels(
	dmImportList *models.DeviceModelImport2ExportList) (*models.DeviceModelList, error)

func (*DeviceManagementService) ImportDeviceModelsOnEdge

func (dms *DeviceManagementService) ImportDeviceModelsOnEdge(dmList *models.DeviceModelList) error

func (*DeviceManagementService) ImportDevices

func (dms *DeviceManagementService) ImportDevices(modelId string, deviceImportList *models.DeviceImport2ExportList) (*models.DeviceList, error)

func (*DeviceManagementService) ImportDevicesOnEdge

func (dms *DeviceManagementService) ImportDevicesOnEdge(deviceList *models.DeviceList) error

func (*DeviceManagementService) ListDeviceModelFeatures

func (dms *DeviceManagementService) ListDeviceModelFeatures(modelId string) (*models.DeviceModelFeatureList, error)

func (*DeviceManagementService) ListDeviceModels

func (dms *DeviceManagementService) ListDeviceModels(keyword string, filter bool) (*models.DeviceModelList, error)

func (*DeviceManagementService) ListDeviceSubDevices

func (dms *DeviceManagementService) ListDeviceSubDevices(modelId, deviceId, keyword string) (*models.DeviceList, error)

func (*DeviceManagementService) ListDevices

func (dms *DeviceManagementService) ListDevices(modelId, keyword string, filter bool) (*models.DeviceList, error)

func (*DeviceManagementService) UpdateDevice

func (dms *DeviceManagementService) UpdateDevice(modelId, deviceId string, device *models.Device) (*models.Device, error)

func (*DeviceManagementService) UpdateDeviceCommand

func (dms *DeviceManagementService) UpdateDeviceCommand(modelId, deviceId, commandId string, command *models.DeviceCommandItem) (*models.Device, error)

func (*DeviceManagementService) UpdateDeviceModel

func (dms *DeviceManagementService) UpdateDeviceModel(modelId string, dm *models.DeviceModel) (*models.DeviceModel, error)

func (*DeviceManagementService) UpdateDeviceModelFeature

func (dms *DeviceManagementService) UpdateDeviceModelFeature(modelId, featureId string, dmFeature *models.DeviceModelFeature) (*models.DeviceModel, error)

func (*DeviceManagementService) UpdateDeviceProperty

func (dms *DeviceManagementService) UpdateDeviceProperty(modelId, deviceId, propertyId string, property *models.DevicePropertyItem) (*models.Device, error)

func (*DeviceManagementService) UploadDeviceModelPicture

func (dms *DeviceManagementService) UploadDeviceModelPicture(modelId, picPath string) error

func (*DeviceManagementService) UploadDeviceModelPlugin

func (dms *DeviceManagementService) UploadDeviceModelPlugin(modelId, pluginName, pluginPath string) (*models.DeviceModel, error)

type RestService

type RestService interface {
	// Device model interfaces
	CreateDeviceModel(dmReq *models.DeviceModelReq) (*models.DeviceModel, error)
	ImportDeviceModels(dmImportList *models.DeviceModelImport2ExportList) (*models.DeviceModelList, error)
	ExportDeviceModels(keyword string) (*models.DeviceModelImport2ExportList, error)
	UploadDeviceModelPicture(modelId, picPath string) error
	DeleteDeviceModel(modelId string) error
	ListDeviceModels(keyword string, filter bool) (*models.DeviceModelList, error)
	GetDeviceModel(modelId string) (*models.DeviceModel, error)
	UpdateDeviceModel(modelId string, dm *models.DeviceModel) (*models.DeviceModel, error)
	CreateDeviceModelFeature(modelId string, dmFeature *models.DeviceModelFeature) (*models.DeviceModel, error)
	ListDeviceModelFeatures(modelId string) (*models.DeviceModelFeatureList, error)
	GetDeviceModelFeature(modelId, featureId string) (*models.DeviceModelFeature, error)
	UpdateDeviceModelFeature(modelId, featureId string, dmFeature *models.DeviceModelFeature) (*models.DeviceModel, error)
	DeleteDeviceModelFeature(modelId, featureId string) error
	UploadDeviceModelPlugin(modelId, pluginName, pluginPath string) (*models.DeviceModel, error)
	DeleteDeviceModelPlugin(modelId, pluginName string) error
	// Device model interfaces on edge
	CreateDeviceModelOnEdge(dm *models.DeviceModel) (*models.DeviceModel, error)
	CreateDeviceModelFeatureOnEdge(modelId string, dmFeature *models.DeviceModelFeature) (*models.DeviceModel, error)
	ImportDeviceModelsOnEdge(dmList *models.DeviceModelList) error
	// Device interfaces
	ListDevices(modelId, keyword string, filter bool) (*models.DeviceList, error)
	CreateDevice(modelId string, req *models.DeviceReq) (*models.Device, error)
	DeleteDevice(modelId, deviceId string) error
	GetDevice(modelId, deviceId string) (*models.Device, error)
	UpdateDevice(modelId, deviceId string, device *models.Device) (*models.Device, error)
	UpdateDeviceProperty(modelId, deviceId, propertyId string, property *models.DevicePropertyItem) (*models.Device, error)
	UpdateDeviceCommand(modelId, deviceId, commandId string, command *models.DeviceCommandItem) (*models.Device, error)
	ListDeviceSubDevices(modelId, deviceId, keyword string) (*models.DeviceList, error)
	AddDeviceSubDevices(modelId, deviceId string, subDevices *models.DeviceSubDeviceList) error
	DeleteDeviceSubDevices(modelId, deviceId string, subDevices *models.DeviceSubDeviceList) error
	GetDeviceTopology(modelId, deviceId string) (*models.DeviceTopology, error)
	ExportDevices(modelId, keyword string) (*models.DeviceImport2ExportList, error)
	ImportDevices(modelId string, deviceImportList *models.DeviceImport2ExportList) (*models.DeviceList, error)
	// Device interfaces on edge
	CreateDeviceOnEdge(device *models.Device) (*models.Device, error)
	ImportDevicesOnEdge(deviceList *models.DeviceList) error
}

func NewDeviceManagementService

func NewDeviceManagementService(cfg *config.DeviceManagementConfig, stopCh <-chan struct{}) (RestService, error)

Jump to

Keyboard shortcuts

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