Documentation ¶
Index ¶
- func GenPayload(ctx context.Context, svcCtx *svc.ServiceContext, ...) ([]byte, error)
- func GenUpgradeParams(ctx context.Context, svcCtx *svc.ServiceContext, ...) (*msgOta.UpgradeData, error)
- func PushMessageToDevice(ctx context.Context, svcCtx *svc.ServiceContext, ...) error
- func ToFirmwareDeviceInfo(ctx context.Context, svcCtx *svc.ServiceContext, ...) *dm.OtaFirmwareDeviceInfo
- func ToFirmwareInfoPb(ctx context.Context, svcCtx *svc.ServiceContext, ...) *dm.OtaFirmwareInfo
- type OtaFirmwareDeviceCancelLogic
- type OtaFirmwareDeviceConfirmLogic
- type OtaFirmwareDeviceIndexLogic
- type OtaFirmwareDeviceRetryLogic
- type OtaFirmwareInfoCreateLogic
- type OtaFirmwareInfoDeleteLogic
- type OtaFirmwareInfoIndexLogic
- type OtaFirmwareInfoReadLogic
- type OtaFirmwareInfoUpdateLogic
- type OtaFirmwareJobCreateLogic
- type OtaFirmwareJobIndexLogic
- type OtaFirmwareJobReadLogic
- type OtaFirmwareJobUpdateLogic
- type OtaModuleInfoCreateLogic
- type OtaModuleInfoDeleteLogic
- type OtaModuleInfoIndexLogic
- type OtaModuleInfoReadLogic
- type OtaModuleInfoUpdateLogic
- type SendMessageToDevicesLogic
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenPayload ¶ added in v1.1.1
func GenPayload(ctx context.Context, svcCtx *svc.ServiceContext, jobInfo *relationDB.DmOtaFirmwareJob) ([]byte, error)
func GenUpgradeParams ¶
func GenUpgradeParams(ctx context.Context, svcCtx *svc.ServiceContext, firmware *relationDB.DmOtaFirmwareInfo, files []*relationDB.DmOtaFirmwareFile) (*msgOta.UpgradeData, error)
func PushMessageToDevice ¶ added in v1.1.1
func PushMessageToDevice(ctx context.Context, svcCtx *svc.ServiceContext, device *relationDB.DmOtaFirmwareDevice, pi *dm.ProductInfo, payload []byte) error
func ToFirmwareDeviceInfo ¶
func ToFirmwareDeviceInfo(ctx context.Context, svcCtx *svc.ServiceContext, in *relationDB.DmOtaFirmwareDevice) *dm.OtaFirmwareDeviceInfo
func ToFirmwareInfoPb ¶
func ToFirmwareInfoPb(ctx context.Context, svcCtx *svc.ServiceContext, in *relationDB.DmOtaFirmwareInfo) *dm.OtaFirmwareInfo
Types ¶
type OtaFirmwareDeviceCancelLogic ¶
func NewOtaFirmwareDeviceCancelLogic ¶
func NewOtaFirmwareDeviceCancelLogic(ctx context.Context, svcCtx *svc.ServiceContext) *OtaFirmwareDeviceCancelLogic
func (*OtaFirmwareDeviceCancelLogic) OtaFirmwareDeviceCancel ¶
func (l *OtaFirmwareDeviceCancelLogic) OtaFirmwareDeviceCancel(in *dm.OtaFirmwareDeviceCancelReq) (*dm.Empty, error)
取消指定批次下的设备升级作业
type OtaFirmwareDeviceConfirmLogic ¶
func NewOtaFirmwareDeviceConfirmLogic ¶
func NewOtaFirmwareDeviceConfirmLogic(ctx context.Context, svcCtx *svc.ServiceContext) *OtaFirmwareDeviceConfirmLogic
func (*OtaFirmwareDeviceConfirmLogic) OtaFirmwareDeviceConfirm ¶
func (l *OtaFirmwareDeviceConfirmLogic) OtaFirmwareDeviceConfirm(in *dm.OtaFirmwareDeviceConfirmReq) (*dm.Empty, error)
app确认设备升级
type OtaFirmwareDeviceIndexLogic ¶
func NewOtaFirmwareDeviceIndexLogic ¶
func NewOtaFirmwareDeviceIndexLogic(ctx context.Context, svcCtx *svc.ServiceContext) *OtaFirmwareDeviceIndexLogic
func (*OtaFirmwareDeviceIndexLogic) OtaFirmwareDeviceIndex ¶
func (l *OtaFirmwareDeviceIndexLogic) OtaFirmwareDeviceIndex(in *dm.OtaFirmwareDeviceIndexReq) (*dm.OtaFirmwareDeviceIndexResp, error)
查询指定升级批次下的设备升级作业列表
type OtaFirmwareDeviceRetryLogic ¶
func NewOtaFirmwareDeviceRetryLogic ¶
func NewOtaFirmwareDeviceRetryLogic(ctx context.Context, svcCtx *svc.ServiceContext) *OtaFirmwareDeviceRetryLogic
func (*OtaFirmwareDeviceRetryLogic) OtaFirmwareDeviceRetry ¶
func (l *OtaFirmwareDeviceRetryLogic) OtaFirmwareDeviceRetry(in *dm.OtaFirmwareDeviceRetryReq) (*dm.Empty, error)
重新升级指定批次下升级失败或升级取消的设备升级作业
type OtaFirmwareInfoCreateLogic ¶
type OtaFirmwareInfoCreateLogic struct { logx.Logger PiDB *relationDB.ProductInfoRepo OfDB *relationDB.OtaFirmwareInfoRepo // contains filtered or unexported fields }
func NewOtaFirmwareInfoCreateLogic ¶
func NewOtaFirmwareInfoCreateLogic(ctx context.Context, svcCtx *svc.ServiceContext) *OtaFirmwareInfoCreateLogic
func (*OtaFirmwareInfoCreateLogic) CheckOtaFirmwareInfo ¶
func (l *OtaFirmwareInfoCreateLogic) CheckOtaFirmwareInfo(in *dm.OtaFirmwareInfoCreateReq) (bool, error)
func (*OtaFirmwareInfoCreateLogic) OtaFirmwareInfoCreate ¶
func (l *OtaFirmwareInfoCreateLogic) OtaFirmwareInfoCreate(in *dm.OtaFirmwareInfoCreateReq) (*dm.WithID, error)
添加升级包
type OtaFirmwareInfoDeleteLogic ¶
type OtaFirmwareInfoDeleteLogic struct { logx.Logger PiDB *relationDB.ProductInfoRepo OfDB *relationDB.OtaFirmwareInfoRepo OffDB *relationDB.OtaFirmwareFileRepo // contains filtered or unexported fields }
func NewOtaFirmwareInfoDeleteLogic ¶
func NewOtaFirmwareInfoDeleteLogic(ctx context.Context, svcCtx *svc.ServiceContext) *OtaFirmwareInfoDeleteLogic
func (*OtaFirmwareInfoDeleteLogic) OtaFirmwareInfoDelete ¶
删除升级包
type OtaFirmwareInfoIndexLogic ¶
type OtaFirmwareInfoIndexLogic struct { logx.Logger PiDB *relationDB.ProductInfoRepo OfDB *relationDB.OtaFirmwareInfoRepo // contains filtered or unexported fields }
func NewOtaFirmwareInfoIndexLogic ¶
func NewOtaFirmwareInfoIndexLogic(ctx context.Context, svcCtx *svc.ServiceContext) *OtaFirmwareInfoIndexLogic
func (*OtaFirmwareInfoIndexLogic) OtaFirmwareInfoIndex ¶
func (l *OtaFirmwareInfoIndexLogic) OtaFirmwareInfoIndex(in *dm.OtaFirmwareInfoIndexReq) (*dm.OtaFirmwareInfoIndexResp, error)
升级包列表
type OtaFirmwareInfoReadLogic ¶
type OtaFirmwareInfoReadLogic struct { logx.Logger PiDB *relationDB.ProductInfoRepo OfDB *relationDB.OtaFirmwareInfoRepo OffDB *relationDB.OtaFirmwareFileRepo // contains filtered or unexported fields }
func NewOtaFirmwareInfoReadLogic ¶
func NewOtaFirmwareInfoReadLogic(ctx context.Context, svcCtx *svc.ServiceContext) *OtaFirmwareInfoReadLogic
func (*OtaFirmwareInfoReadLogic) OtaFirmwareInfoRead ¶
func (l *OtaFirmwareInfoReadLogic) OtaFirmwareInfoRead(in *dm.WithID) (*dm.OtaFirmwareInfo, error)
查询升级包
type OtaFirmwareInfoUpdateLogic ¶
type OtaFirmwareInfoUpdateLogic struct { logx.Logger PiDB *relationDB.ProductInfoRepo OfDB *relationDB.OtaFirmwareInfoRepo // contains filtered or unexported fields }
func NewOtaFirmwareInfoUpdateLogic ¶
func NewOtaFirmwareInfoUpdateLogic(ctx context.Context, svcCtx *svc.ServiceContext) *OtaFirmwareInfoUpdateLogic
func (*OtaFirmwareInfoUpdateLogic) OtaFirmwareInfoUpdate ¶
func (l *OtaFirmwareInfoUpdateLogic) OtaFirmwareInfoUpdate(in *dm.OtaFirmwareInfoUpdateReq) (*dm.WithID, error)
修改升级包
type OtaFirmwareJobCreateLogic ¶
type OtaFirmwareJobCreateLogic struct { logx.Logger OjDB *relationDB.OtaJobRepo OfDB *relationDB.OtaFirmwareInfoRepo OtDB *relationDB.OtaFirmwareDeviceRepo DiDB *relationDB.DeviceInfoRepo OffDB *relationDB.OtaFirmwareFileRepo GdDB *relationDB.GroupDeviceRepo // contains filtered or unexported fields }
func NewOtaFirmwareJobCreateLogic ¶
func NewOtaFirmwareJobCreateLogic(ctx context.Context, svcCtx *svc.ServiceContext) *OtaFirmwareJobCreateLogic
func (*OtaFirmwareJobCreateLogic) OtaFirmwareJobCreate ¶
func (l *OtaFirmwareJobCreateLogic) OtaFirmwareJobCreate(in *dm.OtaFirmwareJobInfo) (*dm.WithID, error)
创建静态升级批次
type OtaFirmwareJobIndexLogic ¶
type OtaFirmwareJobIndexLogic struct { logx.Logger OjDB *relationDB.OtaJobRepo // contains filtered or unexported fields }
func NewOtaFirmwareJobIndexLogic ¶
func NewOtaFirmwareJobIndexLogic(ctx context.Context, svcCtx *svc.ServiceContext) *OtaFirmwareJobIndexLogic
func (*OtaFirmwareJobIndexLogic) OtaFirmwareJobIndex ¶
func (l *OtaFirmwareJobIndexLogic) OtaFirmwareJobIndex(in *dm.OtaFirmwareJobIndexReq) (*dm.OtaFirmwareJobIndexResp, error)
type OtaFirmwareJobReadLogic ¶
type OtaFirmwareJobReadLogic struct { logx.Logger OjDB *relationDB.OtaJobRepo // contains filtered or unexported fields }
func NewOtaFirmwareJobReadLogic ¶
func NewOtaFirmwareJobReadLogic(ctx context.Context, svcCtx *svc.ServiceContext) *OtaFirmwareJobReadLogic
func (*OtaFirmwareJobReadLogic) OtaFirmwareJobRead ¶
func (l *OtaFirmwareJobReadLogic) OtaFirmwareJobRead(in *dm.WithID) (*dm.OtaFirmwareJobInfo, error)
//获取设备所在的升级包升级批次列表
type OtaFirmwareJobUpdateLogic ¶
type OtaFirmwareJobUpdateLogic struct { logx.Logger OjDB *relationDB.OtaJobRepo // contains filtered or unexported fields }
func NewOtaFirmwareJobUpdateLogic ¶
func NewOtaFirmwareJobUpdateLogic(ctx context.Context, svcCtx *svc.ServiceContext) *OtaFirmwareJobUpdateLogic
func (*OtaFirmwareJobUpdateLogic) OtaFirmwareJobUpdate ¶
func (l *OtaFirmwareJobUpdateLogic) OtaFirmwareJobUpdate(in *dm.OtaFirmwareJobInfo) (*dm.Empty, error)
取消动态升级策略
type OtaModuleInfoCreateLogic ¶
func NewOtaModuleInfoCreateLogic ¶
func NewOtaModuleInfoCreateLogic(ctx context.Context, svcCtx *svc.ServiceContext) *OtaModuleInfoCreateLogic
func (*OtaModuleInfoCreateLogic) OtaModuleInfoCreate ¶
func (l *OtaModuleInfoCreateLogic) OtaModuleInfoCreate(in *dm.OtaModuleInfo) (*dm.WithID, error)
type OtaModuleInfoDeleteLogic ¶
func NewOtaModuleInfoDeleteLogic ¶
func NewOtaModuleInfoDeleteLogic(ctx context.Context, svcCtx *svc.ServiceContext) *OtaModuleInfoDeleteLogic
func (*OtaModuleInfoDeleteLogic) OtaModuleInfoDelete ¶
type OtaModuleInfoIndexLogic ¶
func NewOtaModuleInfoIndexLogic ¶
func NewOtaModuleInfoIndexLogic(ctx context.Context, svcCtx *svc.ServiceContext) *OtaModuleInfoIndexLogic
func (*OtaModuleInfoIndexLogic) OtaModuleInfoIndex ¶
func (l *OtaModuleInfoIndexLogic) OtaModuleInfoIndex(in *dm.OtaModuleInfoIndexReq) (*dm.OtaModuleInfoIndexResp, error)
type OtaModuleInfoReadLogic ¶
func NewOtaModuleInfoReadLogic ¶
func NewOtaModuleInfoReadLogic(ctx context.Context, svcCtx *svc.ServiceContext) *OtaModuleInfoReadLogic
func (*OtaModuleInfoReadLogic) OtaModuleInfoRead ¶
func (l *OtaModuleInfoReadLogic) OtaModuleInfoRead(in *dm.WithIDCode) (*dm.OtaModuleInfo, error)
type OtaModuleInfoUpdateLogic ¶
func NewOtaModuleInfoUpdateLogic ¶
func NewOtaModuleInfoUpdateLogic(ctx context.Context, svcCtx *svc.ServiceContext) *OtaModuleInfoUpdateLogic
func (*OtaModuleInfoUpdateLogic) OtaModuleInfoUpdate ¶
func (l *OtaModuleInfoUpdateLogic) OtaModuleInfoUpdate(in *dm.OtaModuleInfo) (*dm.Empty, error)
type SendMessageToDevicesLogic ¶
type SendMessageToDevicesLogic struct { logx.Logger DiDB *relationDB.DeviceInfoRepo GdDB *relationDB.GroupDeviceRepo OtDB *relationDB.OtaFirmwareDeviceRepo OjDB *relationDB.OtaJobRepo OfDB *relationDB.OtaFirmwareInfoRepo OffDB *relationDB.OtaFirmwareFileRepo // contains filtered or unexported fields }
func NewSendMessageToDevicesLogic ¶
func NewSendMessageToDevicesLogic(ctx context.Context, svcCtx *svc.ServiceContext) *SendMessageToDevicesLogic
func (*SendMessageToDevicesLogic) AddDevice ¶
func (l *SendMessageToDevicesLogic) AddDevice(dmOtaJob *relationDB.DmOtaFirmwareJob) error
func (*SendMessageToDevicesLogic) DevicesTimeout ¶
func (l *SendMessageToDevicesLogic) DevicesTimeout(jobInfo *relationDB.DmOtaFirmwareJob) error
func (*SendMessageToDevicesLogic) PushMessageToDevices ¶
func (l *SendMessageToDevicesLogic) PushMessageToDevices(jobInfo *relationDB.DmOtaFirmwareJob) error
Source Files ¶
- assemble.go
- otaFirmwareDeviceCancelLogic.go
- otaFirmwareDeviceConfirmLogic.go
- otaFirmwareDeviceIndexLogic.go
- otaFirmwareDeviceRetryLogic.go
- otaFirmwareInfoCreateLogic.go
- otaFirmwareInfoDeleteLogic.go
- otaFirmwareInfoIndexLogic.go
- otaFirmwareInfoReadLogic.go
- otaFirmwareInfoUpdateLogic.go
- otaFirmwareJobCreateLogic.go
- otaFirmwareJobIndexLogic.go
- otaFirmwareJobReadLogic.go
- otaFirmwareJobUpdateLogic.go
- otaModuleInfoCreateLogic.go
- otaModuleInfoDeleteLogic.go
- otaModuleInfoIndexLogic.go
- otaModuleInfoReadLogic.go
- otaModuleInfoUpdateLogic.go
- sendMessageToDevicesLogic.go
Click to show internal directories.
Click to hide internal directories.