orm

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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ORMStorage

type ORMStorage struct {
	DB *gorm.DB
}

func (*ORMStorage) AddDeviceSubDevices

func (orms *ORMStorage) AddDeviceSubDevices(modelId, deviceId string, subDevices *models.DeviceSubDeviceList) error

func (*ORMStorage) CreateDevice

func (orms *ORMStorage) CreateDevice(modelId string, req *models.DeviceReq, existedDeviceId, updateTimestamp string) (*models.Device, error)

func (*ORMStorage) CreateDeviceModel

func (orms *ORMStorage) CreateDeviceModel(req *models.DeviceModelReq, picURL, existedModelId, creationTimestamp string) (*models.DeviceModel, error)

func (*ORMStorage) CreateDeviceModelFeature

func (orms *ORMStorage) CreateDeviceModelFeature(modelId string, created bool, dmFeature *models.DeviceModelFeature) (*models.DeviceModel, error)

func (*ORMStorage) DeleteDevice

func (orms *ORMStorage) DeleteDevice(modelId, deviceId string) error

func (*ORMStorage) DeleteDeviceModel

func (orms *ORMStorage) DeleteDeviceModel(modelId string) error

func (*ORMStorage) DeleteDeviceModelFeature

func (orms *ORMStorage) DeleteDeviceModelFeature(modelId, featureId string) error

func (*ORMStorage) DeleteDeviceModelPlugin

func (orms *ORMStorage) DeleteDeviceModelPlugin(modelId, pluginName string) error

func (*ORMStorage) DeleteDeviceSubDevices

func (orms *ORMStorage) DeleteDeviceSubDevices(modelId, deviceId string, subDevices *models.DeviceSubDeviceList) error

func (*ORMStorage) ExportDeviceModels

func (orms *ORMStorage) ExportDeviceModels(keyword string) (*models.DeviceModelImport2ExportList, error)

func (*ORMStorage) ExportDevices

func (orms *ORMStorage) ExportDevices(modelId, keyword string) (*models.DeviceImport2ExportList, error)

func (*ORMStorage) GetDevice

func (orms *ORMStorage) GetDevice(modelId, deviceId string) (*models.Device, error)

func (*ORMStorage) GetDeviceModel

func (orms *ORMStorage) GetDeviceModel(modelId string) (*models.DeviceModel, error)

func (*ORMStorage) GetDeviceModelFeature

func (orms *ORMStorage) GetDeviceModelFeature(modelId, featureId string) (*models.DeviceModelFeature, error)

func (*ORMStorage) ImportDeviceModels

func (orms *ORMStorage) ImportDeviceModels(dmImportList *models.DeviceModelImport2ExportList) (*models.DeviceModelList, error)

func (*ORMStorage) ImportDeviceModelsOnEdge

func (orms *ORMStorage) ImportDeviceModelsOnEdge(dmList *models.DeviceModelList) error

func (*ORMStorage) ImportDevices

func (orms *ORMStorage) ImportDevices(modelId string, deviceImportList *models.DeviceImport2ExportList) (*models.DeviceList, error)

func (*ORMStorage) ImportDevicesOnEdge

func (orms *ORMStorage) ImportDevicesOnEdge(deviceList *models.DeviceList) error

func (*ORMStorage) ListDeviceModels

func (orms *ORMStorage) ListDeviceModels(keyword string, filter bool) (*models.DeviceModelList, error)

func (*ORMStorage) ListDeviceSubDevices

func (orms *ORMStorage) ListDeviceSubDevices(modelId, deviceId, keyword string) (*models.DeviceList, error)

func (*ORMStorage) ListDevices

func (orms *ORMStorage) ListDevices(modelId, keyword string, filter bool) (*models.DeviceList, error)

func (*ORMStorage) UpdateDevice

func (orms *ORMStorage) UpdateDevice(modelId, deviceId string, device *models.Device) (*models.Device, error)

func (*ORMStorage) UpdateDeviceCommand

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

func (*ORMStorage) UpdateDeviceModel

func (orms *ORMStorage) UpdateDeviceModel(modelId string, dm *models.DeviceModel) (*models.DeviceModel, error)

func (*ORMStorage) UpdateDeviceModelFeature

func (orms *ORMStorage) UpdateDeviceModelFeature(modelId, featureId string, dmFeature *models.DeviceModelFeature) (*models.DeviceModel, error)

func (*ORMStorage) UpdateDeviceModelPicture

func (orms *ORMStorage) UpdateDeviceModelPicture(modelId, picURL string) (*models.DeviceModel, error)

func (*ORMStorage) UpdateDeviceModelPlugin

func (orms *ORMStorage) UpdateDeviceModelPlugin(modelId string, plugin *models.DeviceModelPlugin) (*models.DeviceModel, error)

func (*ORMStorage) UpdateDeviceProperty

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

Jump to

Keyboard shortcuts

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