otamanagelogic

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: AGPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

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 PushMessageToDevice added in v1.1.1

func PushMessageToDevice(ctx context.Context, svcCtx *svc.ServiceContext, device *relationDB.DmOtaFirmwareDevice, pi *dm.ProductInfo, payload []byte) error

Types

type OtaFirmwareDeviceCancelLogic

type OtaFirmwareDeviceCancelLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

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

type OtaFirmwareDeviceConfirmLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

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

type OtaFirmwareDeviceIndexLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

func NewOtaFirmwareDeviceIndexLogic

func NewOtaFirmwareDeviceIndexLogic(ctx context.Context, svcCtx *svc.ServiceContext) *OtaFirmwareDeviceIndexLogic

func (*OtaFirmwareDeviceIndexLogic) OtaFirmwareDeviceIndex

查询指定升级批次下的设备升级作业列表

type OtaFirmwareDeviceRetryLogic

type OtaFirmwareDeviceRetryLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

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

func (l *OtaFirmwareInfoDeleteLogic) OtaFirmwareInfoDelete(in *dm.WithID) (*dm.Empty, error)

删除升级包

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

升级包列表

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

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

type OtaModuleInfoCreateLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

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

type OtaModuleInfoDeleteLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

func NewOtaModuleInfoDeleteLogic

func NewOtaModuleInfoDeleteLogic(ctx context.Context, svcCtx *svc.ServiceContext) *OtaModuleInfoDeleteLogic

func (*OtaModuleInfoDeleteLogic) OtaModuleInfoDelete

func (l *OtaModuleInfoDeleteLogic) OtaModuleInfoDelete(in *dm.WithID) (*dm.Empty, error)

type OtaModuleInfoIndexLogic

type OtaModuleInfoIndexLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

func NewOtaModuleInfoIndexLogic

func NewOtaModuleInfoIndexLogic(ctx context.Context, svcCtx *svc.ServiceContext) *OtaModuleInfoIndexLogic

func (*OtaModuleInfoIndexLogic) OtaModuleInfoIndex

type OtaModuleInfoReadLogic

type OtaModuleInfoReadLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

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

type OtaModuleInfoUpdateLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

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 (*SendMessageToDevicesLogic) DevicesTimeout

func (l *SendMessageToDevicesLogic) DevicesTimeout(jobInfo *relationDB.DmOtaFirmwareJob) error

func (*SendMessageToDevicesLogic) PushMessageToDevices

func (l *SendMessageToDevicesLogic) PushMessageToDevices(jobInfo *relationDB.DmOtaFirmwareJob) error

Jump to

Keyboard shortcuts

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