修改domain包
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
package device
|
||||
|
||||
import "git.huangwc.com/pig/pig-farm-controller/internal/infra/models"
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.huangwc.com/pig/pig-farm-controller/internal/infra/models"
|
||||
)
|
||||
|
||||
// 设备行为
|
||||
type DeviceAction string
|
||||
@@ -21,10 +25,10 @@ var (
|
||||
type Service interface {
|
||||
|
||||
// Switch 用于切换指定设备的状态, 比如启动和停止
|
||||
Switch(device *models.Device, action DeviceAction) error
|
||||
Switch(ctx context.Context, device *models.Device, action DeviceAction) error
|
||||
|
||||
// Collect 用于发起对指定区域主控下的多个设备的批量采集请求。
|
||||
Collect(regionalControllerID uint, devicesToCollect []*models.Device) error
|
||||
Collect(ctx context.Context, regionalControllerID uint, devicesToCollect []*models.Device) error
|
||||
}
|
||||
|
||||
// 设备操作指令通用结构(最外层)
|
||||
|
||||
Reference in New Issue
Block a user