deviceMsgManage

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package device 设备操作日志

Package repo 本文件是提供设备模型数据存储的信息

Package device 设备操作日志

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HubLogRepo

type HubLogRepo interface {
	InitProduct(ctx context.Context, productID string) error
	DropProduct(ctx context.Context, productID string) error
	DropDevice(ctx context.Context, productID string, deviceName string) error
}

type SDKLogRepo

type SDKLogRepo interface {
	InitProduct(ctx context.Context, productID string) error
	InitDevice(ctx context.Context, productID string, deviceName string) error
	DropProduct(ctx context.Context, productID string) error
	DropDevice(ctx context.Context, productID string, deviceName string) error
}

type SchemaDataRepo

type SchemaDataRepo interface {
	// InitProduct 初始化产品的物模型相关表及日志记录表
	InitProduct(ctx context.Context, t *schema.Model, productID string) error
	// DeleteProduct 删除产品时需要删除产品下的所有表
	DeleteProduct(ctx context.Context, t *schema.Model, productID string) error
	// InitDevice 创建设备时为设备创建单独的表
	InitDevice(ctx context.Context, t *schema.Model, productID string, deviceName string) error
	// DeleteDevice 删除设备时需要删除设备的所有表
	DeleteDevice(ctx context.Context, t *schema.Model, productID string, deviceName string) error
	// UpdateProduct 修改产品物模型 只支持新增和删除,不支持修改数据类型
	UpdateProduct(ctx context.Context, oldT *schema.Model, newt *schema.Model, productID string) error
	CreateProperty(ctx context.Context, p *schema.Property, productID string) error
	DeleteProperty(ctx context.Context, productID string, identifier string) error
	UpdateProperty(ctx context.Context, oldP *schema.Property, newP *schema.Property, productID string) error
}

Jump to

Keyboard shortcuts

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