Documentation ¶
Overview ¶
******************************************************************************
- Copyright 2017 Dell Inc.
- Copyright (c) 2019 Intel Corporation *
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
- in compliance with the License. You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software distributed under the License
- is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- or implied. See the License for the specific language governing permissions and limitations under
- the License. ******************************************************************************
******************************************************************************
- Copyright 2017 Dell Inc.
- Copyright (c) 2019 Intel Corporation *
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
- in compliance with the License. You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software distributed under the License
- is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- or implied. See the License for the specific language governing permissions and limitations under
- the License. ******************************************************************************
******************************************************************************
- Copyright 2017 Dell Inc.
- Copyright (c) 2019 Intel Corporation *
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
- in compliance with the License. You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software distributed under the License
- is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- or implied. See the License for the specific language governing permissions and limitations under
- the License. ******************************************************************************
******************************************************************************
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
- in compliance with the License. You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software distributed under the License
- is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- or implied. See the License for the specific language governing permissions and limitations under
- the License. ******************************************************************************
******************************************************************************
- Copyright 2017 Dell Inc.
- Copyright (c) 2019 Intel Corporation *
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
- in compliance with the License. You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software distributed under the License
- is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- or implied. See the License for the specific language governing permissions and limitations under
- the License. ******************************************************************************
******************************************************************************
- Copyright 2017 Dell Inc.
- Copyright (c) 2019 Intel Corporation *
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
- in compliance with the License. You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software distributed under the License
- is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- or implied. See the License for the specific language governing permissions and limitations under
- the License. ******************************************************************************
Index ¶
- Variables
- type AdvConfigItf
- type AlertRuleApp
- type CategoryApp
- type ConJob
- type CosApp
- type DBClient
- type DMI
- type DataDBClient
- type DataResourceApp
- type DeviceAlert
- type DeviceCtlItf
- type DeviceItf
- type DeviceSyncItf
- type DocsApp
- type DriverDownConfigItf
- type DriverInInstanceDMI
- type DriverLibApp
- type DriverServiceApp
- type GatewayItf
- type GwConfigItf
- type HomePageItf
- type LanguageSDKApp
- type MessageItf
- type MessageStores
- type MonitorItf
- type NetworkItf
- type OpenApiDeviceItf
- type PersistDeviceItf
- type PersistItf
- type ProductCtlItf
- type ProductCtlOpenApiItf
- type ProductItf
- type PublishCallback
- type QuickNavigation
- type RuleEngineApp
- type Scene
- type SceneApp
- type Starter
- type SystemItf
- type SystemMonitor
- type ThingModelCtlItf
- type ThingModelItf
- type ThingModelTemplateApp
- type TyCloudMqttItf
- type UnitApp
- type UserDB
- type UserItf
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DriverModelInterfaceName = di.TypeInstanceToName((*DMI)(nil))
)
Functions ¶
This section is empty.
Types ¶
type AdvConfigItf ¶
type AdvConfigItf interface { GetAdvanceConfig(ctx context.Context) (dtos.AdvanceConfig, error) UpdateAdvanceConfig(ctx context.Context, cfg dtos.AdvanceConfig) error }
type AlertRuleApp ¶
type AlertRuleApp interface { AddAlertRule(ctx context.Context, req dtos.RuleAddRequest) (string, error) UpdateAlertRule(ctx context.Context, req dtos.RuleUpdateRequest) error UpdateAlertField(ctx context.Context, req dtos.RuleFieldUpdate) error AlertRuleById(ctx context.Context, id string) (dtos.RuleResponse, error) AlertRulesSearch(ctx context.Context, req dtos.AlertRuleSearchQueryRequest) ([]dtos.AlertRuleSearchQueryResponse, uint32, error) AlertRulesDelete(ctx context.Context, id string) error AlertRulesStop(ctx context.Context, id string) error AlertRulesStart(ctx context.Context, id string) error AlertRulesRestart(ctx context.Context, id string) error AlertIgnore(ctx context.Context, id string) error TreatedIgnore(ctx context.Context, id, message string) error AlertPlate(ctx context.Context, beforeTime int64) ([]dtos.AlertPlateQueryResponse, error) AlertSearch(ctx context.Context, req dtos.AlertSearchQueryRequest) ([]dtos.AlertSearchQueryResponse, uint32, error) AddAlert(ctx context.Context, req map[string]interface{}) error CheckRuleByProductId(ctx context.Context, productId string) error CheckRuleByDeviceId(ctx context.Context, deviceId string) error }
type CategoryApp ¶
type ConJob ¶
type ConJob interface { AddJobToRunQueue(j *jobs.JobSchedule) error DeleteJob(id string) }
type DBClient ¶
type DBClient interface { CloseSession() GetDBInstance() *gorm.DB DocsSearch(offset int, limit int, req dtos.DocsSearchQueryRequest) (docs []models.Doc, total uint32, edgeXErr error) BatchUpsertDocsTemplate(d []models.Doc) (int64, error) AddDeviceService(ds models.DeviceService) (models.DeviceService, error) DeviceServiceById(id string) (models.DeviceService, error) DeleteDeviceServiceById(id string) error UpdateDeviceService(ds models.DeviceService) error DeviceServicesSearch(offset int, limit int, req dtos.DeviceServiceSearchQueryRequest) ([]models.DeviceService, uint32, error) AddProduct(ds models.Product) (models.Product, error) ProductsSearch(offset int, limit int, preload bool, req dtos.ProductSearchQueryRequest) ([]models.Product, uint32, error) ProductById(id string) (models.Product, error) ProductByCloudId(id string) (models.Product, error) BatchUpsertProduct(d []models.Product) (int64, error) BatchSaveProduct(p []models.Product) error BatchDeleteProduct(products []models.Product) error BatchDeleteProperties(propertiesId []string) error BatchDeleteSystemProperties() error BatchInsertSystemProperties(p []models.Properties) (int64, error) BatchDeleteSystemEvents() error BatchInsertSystemEvents(p []models.Events) (int64, error) BatchDeleteEvents(eventId []string) error BatchDeleteActions(actionId []string) error DeleteProductById(id string) error BatchDeleteSystemActions() error BatchInsertSystemActions(p []models.Actions) (int64, error) DeleteProductObject(d models.Product) error UpdateProduct(ds models.Product) error AssociationsUpdateProduct(ds models.Product) error AssociationsDeleteProductObject(ds models.Product) error AddThingModelProperty(ds models.Properties) (models.Properties, error) BatchUpsertThingModel(ds interface{}) (int64, error) AddThingModelEvent(ds models.Events) (models.Events, error) AddThingModelAction(ds models.Actions) (models.Actions, error) UpdateThingModelProperty(ds models.Properties) error UpdateThingModelEvent(ds models.Events) error UpdateThingModelAction(ds models.Actions) error ThingModelDeleteProperty(id string) error ThingModelDeleteEvent(id string) error ThingModelDeleteAction(id string) error ThingModelPropertyById(id string) (models.Properties, error) ThingModelEventById(id string) (models.Events, error) ThingModelActionsById(id string) (models.Actions, error) SystemThingModelSearch(modelType, modelName string) (interface{}, error) CategoryTemplateSearch(offset int, limit int, req dtos.CategoryTemplateRequest) ([]models.CategoryTemplate, uint32, error) CategoryTemplateById(id string) (models.CategoryTemplate, error) BatchUpsertCategoryTemplate(d []models.CategoryTemplate) (int64, error) ThingModelTemplateSearch(offset int, limit int, req dtos.ThingModelTemplateRequest) ([]models.ThingModelTemplate, uint32, error) ThingModelTemplateByCategoryKey(categoryKey string) (models.ThingModelTemplate, error) BatchUpsertThingModelTemplate(d []models.ThingModelTemplate) (int64, error) UnitSearch(offset int, limit int, req dtos.UnitRequest) ([]models.Unit, uint32, error) BatchUpsertUnitTemplate(d []models.Unit) (int64, error) AddDevice(d models.Device) (string, error) DeviceById(id string) (models.Device, error) DeviceOnlineById(id string) (edgeXErr error) DeviceOfflineById(id string) (edgeXxErr error) DeviceOfflineByCloudInstanceId(id string) (edgeXErr error) MsgReportDeviceById(id string) (device models.Device, edgeXErr error) DeviceByCloudId(id string) (models.Device, error) DevicesSearch(offset int, limit int, req dtos.DeviceSearchQueryRequest) ([]models.Device, uint32, error) DeviceMqttAuthInfo(id string) (device models.MqttAuth, edgeXErr error) DriverMqttAuthInfo(id string) (device models.MqttAuth, edgeXErr error) AddMqttAuthInfo(auth models.MqttAuth) (string, error) AddOrUpdateAuth(auth models.MqttAuth) error BatchUpsertDevice(d []models.Device) (int64, error) BatchDeleteDevice(deviceIds []string) error BatchUnBindDevice(ids []string) error BatchBindDevice(ids []string, driverInstanceId string) error DeleteDeviceById(id string) error UpdateDevice(ds models.Device) error DeleteDeviceByCloudInstanceId(cloudInstanceId string) error AddDeviceLibrary(dl models.DeviceLibrary) (models.DeviceLibrary, error) DeviceLibraryById(id string) (models.DeviceLibrary, error) DeleteDeviceLibraryById(id string) error DeviceLibrariesSearch(offset int, limit int, req dtos.DeviceLibrarySearchQueryRequest) ([]models.DeviceLibrary, uint32, error) UpdateDeviceLibrary(dl models.DeviceLibrary) error DriverClassifySearch(offset int, limit int, req dtos.DriverClassifyQueryRequest) ([]models.DriverClassify, uint32, error) DockerConfigAdd(cfg models.DockerConfig) (models.DockerConfig, error) DockerConfigById(id string) (models.DockerConfig, error) DockerConfigUpdate(cfg models.DockerConfig) error DockerConfigDelete(id string) error DockerConfigsSearch(offset int, limit int, req dtos.DockerConfigSearchQueryRequest) ([]models.DockerConfig, uint32, error) AbilityByCode(model interface{}, code, productId string) (interface{}, error) //// 获取高级配置信息 GetAdvanceConfig() (models.AdvanceConfig, error) // 更新高级配置信息 UpdateAdvanceConfig(config models.AdvanceConfig) error AddMsgGather(msgGather models.MsgGather) error MsgGatherSearch(offset int, limit int, req dtos.MsgGatherSearchQueryRequest) (msgGather []models.MsgGather, count uint32, edgeXErr error) AddDataResource(dateResource models.DataResource) (string, error) UpdateDataResource(dateResource models.DataResource) error DelDataResource(id string) error UpdateDataResourceHealth(id string, health bool) error SearchDataResource(offset int, limit int, req dtos.DataResourceSearchQueryRequest) (dataResource []models.DataResource, count uint32, edgeXErr error) DataResourceById(id string) (models.DataResource, error) AddRuleEngine(ruleEngine models.RuleEngine) (string, error) UpdateRuleEngine(ruleEngine models.RuleEngine) error RuleEngineById(id string) (ruleEngine models.RuleEngine, edgeXErr error) RuleEngineSearch(offset int, limit int, req dtos.RuleEngineSearchQueryRequest) (ruleEngine []models.RuleEngine, count uint32, edgeXErr error) RuleEngineStart(id string) error RuleEngineStop(id string) error DeleteRuleEngineById(id string) error LanguageSdkByName(name string) (cloudService models.LanguageSdk, edgeXErr error) LanguageSearch(offset int, limit int, req dtos.LanguageSDKSearchQueryRequest) (languages []models.LanguageSdk, count uint32, edgeXErr error) AddLanguageSdk(cs models.LanguageSdk) (language models.LanguageSdk, edgeXErr error) UpdateLanguageSdk(ls models.LanguageSdk) error DeviceAlert UserDB Scene SystemMonitor }
type DMI ¶
type DMI interface { DriverInInstanceDMI StopAllInstance() }
type DataDBClient ¶
type DataDBClient interface { GetDataDBType() constants.DataType CloseSession() Insert(ctx context.Context, table string, data map[string]interface{}) (err error) GetDeviceProperty(req dtos.ThingModelPropertyDataRequest, device models.Device) ([]dtos.ReportData, int, error) GetDeviceService(req dtos.ThingModelServiceDataRequest, device models.Device, product models.Product) ([]dtos.SaveServiceIssueData, int, error) GetDeviceEvent(req dtos.ThingModelEventDataRequest, device models.Device, product models.Product) ([]dtos.EventData, int, error) CreateTable(ctx context.Context, stable, table string) (err error) DropTable(ctx context.Context, table string) (err error) CreateStable(ctx context.Context, product models.Product) (err error) DropStable(ctx context.Context, table string) (err error) AddDatabaseField(ctx context.Context, tableName string, specsType constants.SpecsType, code string, name string) (err error) DelDatabaseField(ctx context.Context, tableName, code string) (err error) ModifyDatabaseField(ctx context.Context, tableName string, specsType constants.SpecsType, code string, name string) (err error) GetDevicePropertyCount(dtos.ThingModelPropertyDataRequest) (int, error) GetDeviceEventCount(req dtos.ThingModelEventDataRequest) (int, error) GetDeviceMsgCountByGiveTime(deviceId string, startTime, endTime int64) (int, error) }
type DataResourceApp ¶
type DataResourceApp interface { AddDataResource(ctx context.Context, req dtos.AddDataResourceReq) (string, error) DataResourceById(ctx context.Context, id string) (models.DataResource, error) UpdateDataResource(ctx context.Context, req dtos.UpdateDataResource) error DelDataResourceById(ctx context.Context, id string) error DataResourceSearch(ctx context.Context, req dtos.DataResourceSearchQueryRequest) ([]models.DataResource, uint32, error) DataResourceType(ctx context.Context) []constants.DataResourceType DataResourceHealth(ctx context.Context, resourceId string) error }
type DeviceAlert ¶
type DeviceAlert interface { AddAlertRule(rule models.AlertRule) (models.AlertRule, error) UpdateAlertRule(rule models.AlertRule) error AlertRuleById(id string) (models.AlertRule, error) AlertRuleSearch(offset int, limit int, req dtos.AlertRuleSearchQueryRequest) (alertRules []models.AlertRule, total uint32, edgeXErr error) DeleteAlertRuleById(id string) error AlertRuleStart(id string) error AlertRuleStop(id string) error AlertListLastSend(alertRuleId string) (alertList models.AlertList, edgeXErr error) AddAlertList(alertRule models.AlertList) (models.AlertList, error) AlertPlate(beforeTime int64) (plate []dtos.AlertPlateQueryResponse, err error) AlertListSearch(offset int, limit int, req dtos.AlertSearchQueryRequest) (alertList []dtos.AlertSearchQueryResponse, total uint32, edgeXErr error) AlertIgnore(id string) (edgeXErr error) TreatedIgnore(id, message string) (edgeXErr error) }
type DeviceCtlItf ¶
type DeviceCtlItf interface { AddDevice(ctx context.Context, req dtos.DeviceAddRequest) (string, error) DevicesSearch(ctx context.Context, req dtos.DeviceSearchQueryRequest) ([]dtos.DeviceSearchQueryResponse, uint32, error) DevicesModelSearch(ctx context.Context, req dtos.DeviceSearchQueryRequest) ([]models.Device, uint32, error) DeviceById(ctx context.Context, id string) (dtos.DeviceInfoResponse, error) DeviceModelById(ctx context.Context, id string) (models.Device, error) DeviceByCloudId(ctx context.Context, id string) (models.Device, error) DeviceUpdate(ctx context.Context, req dtos.DeviceUpdateRequest) error DevicesBindDriver(ctx context.Context, req dtos.DevicesBindDriver) error DevicesUnBindDriver(ctx context.Context, req dtos.DevicesUnBindDriver) error DevicesBindProductId(ctx context.Context, req dtos.DevicesBindProductId) error ConnectIotPlatform(ctx context.Context, request *driverdevice.ConnectIotPlatformRequest) *driverdevice.ConnectIotPlatformResponse DisConnectIotPlatform(ctx context.Context, request *driverdevice.DisconnectIotPlatformRequest) *driverdevice.DisconnectIotPlatformResponse GetDeviceConnectStatus(ctx context.Context, request *driverdevice.GetDeviceConnectStatusRequest) *driverdevice.GetDeviceConnectStatusResponse DeviceMqttAuthInfo(ctx context.Context, id string) (dtos.DeviceAuthInfoResponse, error) AddMqttAuth(ctx context.Context, req dtos.AddMqttAuthInfoRequest) (string, error) DeleteDeviceById(ctx context.Context, id string) error BatchDeleteDevice(ctx context.Context, ids []string) error DeviceImportTemplateDownload(ctx context.Context, req dtos.DeviceImportTemplateRequest) (*dtos.ExportFile, error) DevicesImport(ctx context.Context, file *dtos.ImportFile, productId, driverInstanceId string) (int64, error) UploadValidated(ctx context.Context, file *dtos.ImportFile) error DevicesReportMsgGather(ctx context.Context) error DeviceAction(jobAction dtos.JobAction) dtos.DeviceExecRes DeviceInvokeThingService(invokeDeviceServiceReq dtos.InvokeDeviceServiceReq) (map[string]interface{}, error) SetDeviceProperty(req dtos.OpenApiSetDeviceThingModel) error DeviceEffectivePropertyData(deviceEffectivePropertyDataReq dtos.DeviceEffectivePropertyDataReq) (dtos.DeviceEffectivePropertyDataResponse, error) }
type DeviceItf ¶
type DeviceItf interface { DeviceCtlItf DeviceSyncItf OpenApiDeviceItf }
type DeviceSyncItf ¶
type DeviceSyncItf interface { }
type DriverDownConfigItf ¶
type DriverDownConfigItf interface { DownConfigAdd(ctx context.Context, req dtos.DockerConfigAddRequest) error DownConfigUpdate(ctx context.Context, req dtos.DockerConfigUpdateRequest) error DownConfigSearch(ctx context.Context, req dtos.DockerConfigSearchQueryRequest) ([]models.DockerConfig, uint32, error) DownConfigDel(ctx context.Context, id string) error }
type DriverInInstanceDMI ¶
type DriverInInstanceDMI interface { // DownApp 下载驱动 DownApp(cfg dtos.DockerConfig, app dtos.DeviceLibrary, toVersion string) (string, error) RemoveApp(app dtos.DeviceLibrary) error GetAllApp() []string // 检查驱动软件情况 StateApp(dockerImageId string) bool InstanceState(ins dtos.DeviceService) bool // StartInstance 启动实例 StartInstance(ins dtos.DeviceService, cfg dtos.RunServiceCfg) (string, error) // 返回服务所在的ip // StopInstance 停止实例 StopInstance(ins dtos.DeviceService) error // DeleteInstance 删除实例 DeleteInstance(ins dtos.DeviceService) error GetDriverInstanceLogPath(serviceName string) string // GetSelfIp 获取当前服务运行的内网ip GetSelfIp() string }
驱动相关接口
type DriverLibApp ¶
type DriverLibApp interface { AddDriverLib(ctx context.Context, dl dtos.DeviceLibraryAddRequest) error DeleteDeviceLibraryById(ctx context.Context, id string) error DeviceLibraryById(ctx context.Context, id string) (models.DeviceLibrary, error) DeviceLibrariesSearch(ctx context.Context, req dtos.DeviceLibrarySearchQueryRequest) ([]models.DeviceLibrary, uint32, error) UpdateDeviceLibrary(ctx context.Context, update dtos.UpdateDeviceLibrary) error UpgradeDeviceLibrary(ctx context.Context, req dtos.DeviceLibraryUpgradeRequest) error DriverLibById(dlId string) (models.DeviceLibrary, error) GetDriverClassify(ctx context.Context, req dtos.DriverClassifyQueryRequest) ([]dtos.DriverClassifyResponse, uint32, error) GetDeviceLibraryAndMirrorConfig(dlId string) (dl models.DeviceLibrary, dc models.DockerConfig, err error) DriverDownConfigItf }
type DriverServiceApp ¶
type DriverServiceApp interface { GetState(id string) int SetState(id string, state int) Start(id string) error // 升级 Stop(id string) error ReStart(id string) error Add(ctx context.Context, ds models.DeviceService) error Update(ctx context.Context, dto dtos.DeviceServiceUpdateRequest) error Del(ctx context.Context, id string) error Get(ctx context.Context, id string) (models.DeviceService, error) Search(ctx context.Context, req dtos.DeviceServiceSearchQueryRequest) ([]models.DeviceService, uint32, error) UpdateRunStatus(ctx context.Context, req dtos.UpdateDeviceServiceRunStatusRequest) error InProgress(id string) bool Upgrade(dl models.DeviceLibrary) error // 升级驱动实例 }
type GatewayItf ¶
type GwConfigItf ¶
type GwConfigItf interface { LoadGatewayConfig() error GetGatewayConfig() dtos.EdgeConfig }
type HomePageItf ¶
type HomePageItf interface {
HomePageInfo(ctx context.Context, req dtos.HomePageRequest) (response dtos.HomePageResponse, err error)
}
type LanguageSDKApp ¶
type MessageItf ¶
type MessageItf interface { TyCloudMqttItf }
type MessageStores ¶
type MessageStores interface { StoreRange() StoreMsgId(id string, ch string) LoadMsgChan(id string) (interface{}, bool) DeleteMsgId(id string) GenAckChan(id string) *messagestore.MsgAckChan }
type MonitorItf ¶
type MonitorItf interface {
GetSystemMetrics(ctx context.Context, query dtos.SystemMetricsQuery) (dtos.SystemMetricsResponse, error)
}
type NetworkItf ¶
type NetworkItf interface { GetNetworks(ctx context.Context) (dtos.ConfigNetWorkResponse, dtos.ConfigDnsResponse) ConfigNetWork(ctx context.Context, isFlush bool) (resp dtos.ConfigNetWorkResponse, err error) ConfigNetWorkUpdate(ctx context.Context, req dtos.ConfigNetworkUpdateRequest) error ConfigDns(ctx context.Context) (dtos.ConfigDnsResponse, error) ConfigDnsUpdate(ctx context.Context, req dtos.ConfigDnsUpdateRequest) error }
type OpenApiDeviceItf ¶
type OpenApiDeviceItf interface { OpenApiDeviceById(ctx context.Context, id string) (dtos.OpenApiDeviceInfoResponse, error) OpenApiDeviceStatusById(ctx context.Context, id string) (dtos.OpenApiDeviceStatus, error) OpenApiDevicesSearch(ctx context.Context, req dtos.DeviceSearchQueryRequest) ([]dtos.OpenApiDeviceInfoResponse, uint32, error) }
type PersistDeviceItf ¶
type PersistDeviceItf interface { SaveDeviceThingModelData(req dtos.ThingModelMessage) error SearchDeviceThingModelPropertyData(req dtos.ThingModelPropertyDataRequest) (interface{}, error) SearchDeviceThingModelHistoryPropertyData(req dtos.ThingModelPropertyDataRequest) (interface{}, int, error) SearchDeviceThingModelEventData(req dtos.ThingModelEventDataRequest) ([]dtos.ThingModelEventDataResponse, int, error) SearchDeviceThingModelServiceData(req dtos.ThingModelServiceDataRequest) ([]dtos.ThingModelServiceDataResponse, int, error) SearchDeviceMsgCount(startTime, endTime int64) (int, error) }
type PersistItf ¶
type PersistItf interface { PersistDeviceItf }
type ProductCtlItf ¶
type ProductCtlItf interface { ProductsSearch(ctx context.Context, req dtos.ProductSearchQueryRequest) ([]dtos.ProductSearchQueryResponse, uint32, error) ProductsModelSearch(ctx context.Context, req dtos.ProductSearchQueryRequest) ([]models.Product, uint32, error) ProductById(ctx context.Context, id string) (dtos.ProductSearchByIdResponse, error) ProductModelById(ctx context.Context, id string) (models.Product, error) ProductDelete(ctx context.Context, id string) error AddProduct(ctx context.Context, req dtos.ProductAddRequest) (string, error) ProductRelease(ctx context.Context, productId string) error ProductUnRelease(ctx context.Context, productId string) error CreateProductCallBack(productInfo models.Product) UpdateProductCallBack(productInfo models.Product) DeleteProductCallBack(productInfo models.Product) ProductCtlOpenApiItf }
type ProductCtlOpenApiItf ¶
type ProductCtlOpenApiItf interface { OpenApiAddProduct(ctx context.Context, req dtos.OpenApiAddProductRequest) (string, error) OpenApiUpdateProduct(ctx context.Context, req dtos.OpenApiUpdateProductRequest) error OpenApiProductById(ctx context.Context, id string) (dtos.ProductSearchByIdOpenApiResponse, error) OpenApiProductSearch(ctx context.Context, req dtos.ProductSearchQueryRequest) ([]dtos.ProductSearchOpenApiResponse, uint32, error) }
type ProductItf ¶
type ProductItf interface { ProductCtlItf }
type PublishCallback ¶
type QuickNavigation ¶
type QuickNavigation interface {
}type RuleEngineApp ¶
type RuleEngineApp interface { AddRuleEngine(ctx context.Context, req dtos.RuleEngineRequest) (string, error) UpdateRuleEngine(ctx context.Context, req dtos.RuleEngineUpdateRequest) error UpdateRuleEngineField(ctx context.Context, req dtos.RuleEngineFieldUpdateRequest) error RuleEngineById(ctx context.Context, id string) (dtos.RuleEngineResponse, error) RuleEngineSearch(ctx context.Context, req dtos.RuleEngineSearchQueryRequest) ([]dtos.RuleEngineSearchQueryResponse, uint32, error) RuleEngineDelete(ctx context.Context, id string) error RuleEngineStop(ctx context.Context, id string) error RuleEngineStart(ctx context.Context, id string) error RuleEngineStatus(ctx context.Context, id string) (map[string]interface{}, error) }
type Scene ¶
type Scene interface { AddScene(scene models.Scene) (models.Scene, error) SceneById(id string) (models.Scene, error) UpdateScene(scene models.Scene) error SceneStart(id string) error SceneStop(id string) error DeleteSceneById(id string) error SceneSearch(offset int, limit int, req dtos.SceneSearchQueryRequest) (scenes []models.Scene, total uint32, edgeXErr error) AddSceneLog(sceneLog models.SceneLog) (models.SceneLog, error) SceneLogSearch(offset int, limit int, req dtos.SceneLogSearchQueryRequest) (sceneLogs []models.SceneLog, total uint32, edgeXErr error) }
type SceneApp ¶
type SceneApp interface { AddScene(ctx context.Context, req dtos.SceneAddRequest) (string, error) UpdateScene(ctx context.Context, req dtos.SceneUpdateRequest) error SceneById(ctx context.Context, sceneId string) (models.Scene, error) SceneStartById(ctx context.Context, sceneId string) error SceneStopById(ctx context.Context, sceneId string) error DelSceneById(ctx context.Context, sceneId string) error SceneSearch(ctx context.Context, req dtos.SceneSearchQueryRequest) ([]models.Scene, uint32, error) CheckSceneByDeviceId(ctx context.Context, deviceId string) error SceneLogSearch(ctx context.Context, req dtos.SceneLogSearchQueryRequest) ([]models.SceneLog, uint32, error) EkuiperNotify(ctx context.Context, req map[string]interface{}) error }
type SystemItf ¶
type SystemItf interface { GwConfigItf AdvConfigItf NetworkItf GatewayItf }
先把这些临时放在这里
type SystemMonitor ¶
type SystemMonitor interface { UpdateSystemMetrics(stats dtos.SystemMetrics) error GetSystemMetrics(start, end int64) ([]dtos.SystemMetrics, error) RemoveRangeSystemMetrics(min, max string) error }
type ThingModelCtlItf ¶
type ThingModelCtlItf interface { ThingModelDelete(ctx context.Context, id string, thingModelType string) error AddThingModel(ctx context.Context, req dtos.ThingModelAddOrUpdateReq) (string, error) UpdateThingModel(ctx context.Context, req dtos.ThingModelAddOrUpdateReq) error SystemThingModelSearch(ctx context.Context, req dtos.SystemThingModelSearchReq) (interface{}, error) OpenApiAddThingModel(ctx context.Context, req dtos.OpenApiThingModelAddOrUpdateReq) error OpenApiQueryThingModel(ctx context.Context, productId string) (dtos.OpenApiQueryThingModel, error) OpenApiDeleteThingModel(ctx context.Context, req dtos.OpenApiThingModelDeleteReq) error }
type ThingModelItf ¶
type ThingModelItf interface { ThingModelCtlItf }
type ThingModelTemplateApp ¶
type ThingModelTemplateApp interface { ThingModelTemplateSearch(ctx context.Context, req dtos.ThingModelTemplateRequest) ([]dtos.ThingModelTemplateResponse, uint32, error) ThingModelTemplateByCategoryKey(ctx context.Context, categoryKey string) (dtos.ThingModelTemplateResponse, error) Sync(ctx context.Context, versionName string) (int64, error) }
type TyCloudMqttItf ¶
type TyCloudMqttItf interface { // ThingModelMsgReport 物模型消息上报到云端 ThingModelMsgReport(ctx context.Context, msg dtos.ThingModelMessage) (*drivercommon.CommonResponse, error) DeviceStatusToMessageBus(ctx context.Context, deviceId, deviceStatus string) }
type UserItf ¶
type UserItf interface { UserLogin(ctx context.Context, req dtos.LoginRequest) (res dtos.LoginResponse, err error) InitInfo() (res dtos.InitInfoResponse, err error) InitPassword(ctx context.Context, req dtos.InitPasswordRequest) error UpdateUserPassword(ctx context.Context, username string, req dtos.UpdatePasswordRequest) error OpenApiUserLogin(ctx context.Context, req dtos.LoginRequest) (res *dtos.TokenDetail, err error) CreateTokenDetail(userName string) (*dtos.TokenDetail, error) InitJwtKey() }
Click to show internal directories.
Click to hide internal directories.