31 Star 292 Fork 111

联犀/things

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
deviceMsg.go 17.31 KB
一键复制 编辑 原始数据 按行查看 历史
杨磊 提交于 2024-10-21 17:05 . feat: 添加协议服务器状态
// Code generated by goctl. DO NOT EDIT.
// goctl 1.7.1
// Source: dm.proto
package devicemsg
import (
"context"
"gitee.com/unitedrhino/things/service/dmsvr/internal/svc"
"gitee.com/unitedrhino/things/service/dmsvr/pb/dm"
"github.com/zeromicro/go-zero/zrpc"
"google.golang.org/grpc"
)
type (
ActionRespReq = dm.ActionRespReq
ActionSendReq = dm.ActionSendReq
ActionSendResp = dm.ActionSendResp
CommonSchemaCreateReq = dm.CommonSchemaCreateReq
CommonSchemaIndexReq = dm.CommonSchemaIndexReq
CommonSchemaIndexResp = dm.CommonSchemaIndexResp
CommonSchemaInfo = dm.CommonSchemaInfo
CommonSchemaUpdateReq = dm.CommonSchemaUpdateReq
CompareInt64 = dm.CompareInt64
CompareString = dm.CompareString
CustomTopic = dm.CustomTopic
DeviceCore = dm.DeviceCore
DeviceCountInfo = dm.DeviceCountInfo
DeviceCountReq = dm.DeviceCountReq
DeviceCountResp = dm.DeviceCountResp
DeviceError = dm.DeviceError
DeviceGatewayBindDevice = dm.DeviceGatewayBindDevice
DeviceGatewayIndexReq = dm.DeviceGatewayIndexReq
DeviceGatewayIndexResp = dm.DeviceGatewayIndexResp
DeviceGatewayMultiCreateReq = dm.DeviceGatewayMultiCreateReq
DeviceGatewayMultiSaveReq = dm.DeviceGatewayMultiSaveReq
DeviceGatewaySign = dm.DeviceGatewaySign
DeviceInfo = dm.DeviceInfo
DeviceInfoBindReq = dm.DeviceInfoBindReq
DeviceInfoCanBindReq = dm.DeviceInfoCanBindReq
DeviceInfoCount = dm.DeviceInfoCount
DeviceInfoCountReq = dm.DeviceInfoCountReq
DeviceInfoDeleteReq = dm.DeviceInfoDeleteReq
DeviceInfoIndexReq = dm.DeviceInfoIndexReq
DeviceInfoIndexResp = dm.DeviceInfoIndexResp
DeviceInfoMultiBindReq = dm.DeviceInfoMultiBindReq
DeviceInfoMultiBindResp = dm.DeviceInfoMultiBindResp
DeviceInfoMultiUpdateReq = dm.DeviceInfoMultiUpdateReq
DeviceInfoReadReq = dm.DeviceInfoReadReq
DeviceModuleVersion = dm.DeviceModuleVersion
DeviceModuleVersionIndexReq = dm.DeviceModuleVersionIndexReq
DeviceModuleVersionIndexResp = dm.DeviceModuleVersionIndexResp
DeviceModuleVersionReadReq = dm.DeviceModuleVersionReadReq
DeviceMoveReq = dm.DeviceMoveReq
DeviceOnlineMultiFix = dm.DeviceOnlineMultiFix
DeviceOnlineMultiFixReq = dm.DeviceOnlineMultiFixReq
DeviceProfile = dm.DeviceProfile
DeviceProfileIndexReq = dm.DeviceProfileIndexReq
DeviceProfileIndexResp = dm.DeviceProfileIndexResp
DeviceProfileReadReq = dm.DeviceProfileReadReq
DeviceTransferReq = dm.DeviceTransferReq
DeviceTypeCountReq = dm.DeviceTypeCountReq
DeviceTypeCountResp = dm.DeviceTypeCountResp
Empty = dm.Empty
EventLogIndexReq = dm.EventLogIndexReq
EventLogIndexResp = dm.EventLogIndexResp
EventLogInfo = dm.EventLogInfo
Firmware = dm.Firmware
FirmwareFile = dm.FirmwareFile
FirmwareInfo = dm.FirmwareInfo
FirmwareInfoDeleteReq = dm.FirmwareInfoDeleteReq
FirmwareInfoDeleteResp = dm.FirmwareInfoDeleteResp
FirmwareInfoIndexReq = dm.FirmwareInfoIndexReq
FirmwareInfoIndexResp = dm.FirmwareInfoIndexResp
FirmwareInfoReadReq = dm.FirmwareInfoReadReq
FirmwareInfoReadResp = dm.FirmwareInfoReadResp
FirmwareResp = dm.FirmwareResp
GatewayCanBindIndexReq = dm.GatewayCanBindIndexReq
GatewayCanBindIndexResp = dm.GatewayCanBindIndexResp
GatewayGetFoundReq = dm.GatewayGetFoundReq
GatewayNotifyBindSendReq = dm.GatewayNotifyBindSendReq
GroupDeviceIndexReq = dm.GroupDeviceIndexReq
GroupDeviceIndexResp = dm.GroupDeviceIndexResp
GroupDeviceMultiDeleteReq = dm.GroupDeviceMultiDeleteReq
GroupDeviceMultiSaveReq = dm.GroupDeviceMultiSaveReq
GroupInfo = dm.GroupInfo
GroupInfoCreateReq = dm.GroupInfoCreateReq
GroupInfoIndexReq = dm.GroupInfoIndexReq
GroupInfoIndexResp = dm.GroupInfoIndexResp
GroupInfoUpdateReq = dm.GroupInfoUpdateReq
HubLogIndexReq = dm.HubLogIndexReq
HubLogIndexResp = dm.HubLogIndexResp
HubLogInfo = dm.HubLogInfo
IDPath = dm.IDPath
IDPathWithUpdate = dm.IDPathWithUpdate
OtaFirmwareDeviceCancelReq = dm.OtaFirmwareDeviceCancelReq
OtaFirmwareDeviceConfirmReq = dm.OtaFirmwareDeviceConfirmReq
OtaFirmwareDeviceIndexReq = dm.OtaFirmwareDeviceIndexReq
OtaFirmwareDeviceIndexResp = dm.OtaFirmwareDeviceIndexResp
OtaFirmwareDeviceInfo = dm.OtaFirmwareDeviceInfo
OtaFirmwareDeviceRetryReq = dm.OtaFirmwareDeviceRetryReq
OtaFirmwareFile = dm.OtaFirmwareFile
OtaFirmwareFileIndexReq = dm.OtaFirmwareFileIndexReq
OtaFirmwareFileIndexResp = dm.OtaFirmwareFileIndexResp
OtaFirmwareFileInfo = dm.OtaFirmwareFileInfo
OtaFirmwareFileReq = dm.OtaFirmwareFileReq
OtaFirmwareFileResp = dm.OtaFirmwareFileResp
OtaFirmwareInfo = dm.OtaFirmwareInfo
OtaFirmwareInfoCreateReq = dm.OtaFirmwareInfoCreateReq
OtaFirmwareInfoIndexReq = dm.OtaFirmwareInfoIndexReq
OtaFirmwareInfoIndexResp = dm.OtaFirmwareInfoIndexResp
OtaFirmwareInfoUpdateReq = dm.OtaFirmwareInfoUpdateReq
OtaFirmwareJobIndexReq = dm.OtaFirmwareJobIndexReq
OtaFirmwareJobIndexResp = dm.OtaFirmwareJobIndexResp
OtaFirmwareJobInfo = dm.OtaFirmwareJobInfo
OtaJobByDeviceIndexReq = dm.OtaJobByDeviceIndexReq
OtaJobDynamicInfo = dm.OtaJobDynamicInfo
OtaJobStaticInfo = dm.OtaJobStaticInfo
OtaModuleInfo = dm.OtaModuleInfo
OtaModuleInfoIndexReq = dm.OtaModuleInfoIndexReq
OtaModuleInfoIndexResp = dm.OtaModuleInfoIndexResp
PageInfo = dm.PageInfo
PageInfo_OrderBy = dm.PageInfo_OrderBy
Point = dm.Point
ProductCategory = dm.ProductCategory
ProductCategoryIndexReq = dm.ProductCategoryIndexReq
ProductCategoryIndexResp = dm.ProductCategoryIndexResp
ProductCategorySchemaIndexReq = dm.ProductCategorySchemaIndexReq
ProductCategorySchemaIndexResp = dm.ProductCategorySchemaIndexResp
ProductCategorySchemaMultiSaveReq = dm.ProductCategorySchemaMultiSaveReq
ProductCustom = dm.ProductCustom
ProductCustomReadReq = dm.ProductCustomReadReq
ProductCustomUi = dm.ProductCustomUi
ProductInfo = dm.ProductInfo
ProductInfoDeleteReq = dm.ProductInfoDeleteReq
ProductInfoIndexReq = dm.ProductInfoIndexReq
ProductInfoIndexResp = dm.ProductInfoIndexResp
ProductInfoReadReq = dm.ProductInfoReadReq
ProductInitReq = dm.ProductInitReq
ProductRemoteConfig = dm.ProductRemoteConfig
ProductSchemaCreateReq = dm.ProductSchemaCreateReq
ProductSchemaDeleteReq = dm.ProductSchemaDeleteReq
ProductSchemaIndexReq = dm.ProductSchemaIndexReq
ProductSchemaIndexResp = dm.ProductSchemaIndexResp
ProductSchemaInfo = dm.ProductSchemaInfo
ProductSchemaMultiCreateReq = dm.ProductSchemaMultiCreateReq
ProductSchemaTslImportReq = dm.ProductSchemaTslImportReq
ProductSchemaTslReadReq = dm.ProductSchemaTslReadReq
ProductSchemaTslReadResp = dm.ProductSchemaTslReadResp
ProductSchemaUpdateReq = dm.ProductSchemaUpdateReq
PropertyControlMultiSendReq = dm.PropertyControlMultiSendReq
PropertyControlMultiSendResp = dm.PropertyControlMultiSendResp
PropertyControlSendMsg = dm.PropertyControlSendMsg
PropertyControlSendReq = dm.PropertyControlSendReq
PropertyControlSendResp = dm.PropertyControlSendResp
PropertyGetReportSendReq = dm.PropertyGetReportSendReq
PropertyGetReportSendResp = dm.PropertyGetReportSendResp
PropertyLogIndexReq = dm.PropertyLogIndexReq
PropertyLogIndexResp = dm.PropertyLogIndexResp
PropertyLogInfo = dm.PropertyLogInfo
PropertyLogLatestIndexReq = dm.PropertyLogLatestIndexReq
ProtocolConfigField = dm.ProtocolConfigField
ProtocolConfigInfo = dm.ProtocolConfigInfo
ProtocolInfo = dm.ProtocolInfo
ProtocolInfoIndexReq = dm.ProtocolInfoIndexReq
ProtocolInfoIndexResp = dm.ProtocolInfoIndexResp
ProtocolService = dm.ProtocolService
ProtocolServiceIndexReq = dm.ProtocolServiceIndexReq
ProtocolServiceIndexResp = dm.ProtocolServiceIndexResp
RemoteConfigCreateReq = dm.RemoteConfigCreateReq
RemoteConfigIndexReq = dm.RemoteConfigIndexReq
RemoteConfigIndexResp = dm.RemoteConfigIndexResp
RemoteConfigLastReadReq = dm.RemoteConfigLastReadReq
RemoteConfigLastReadResp = dm.RemoteConfigLastReadResp
RemoteConfigPushAllReq = dm.RemoteConfigPushAllReq
RespReadReq = dm.RespReadReq
RootCheckReq = dm.RootCheckReq
SdkLogIndexReq = dm.SdkLogIndexReq
SdkLogIndexResp = dm.SdkLogIndexResp
SdkLogInfo = dm.SdkLogInfo
SendLogIndexReq = dm.SendLogIndexReq
SendLogIndexResp = dm.SendLogIndexResp
SendLogInfo = dm.SendLogInfo
SendMsgReq = dm.SendMsgReq
SendMsgResp = dm.SendMsgResp
SendOption = dm.SendOption
ShadowIndex = dm.ShadowIndex
ShadowIndexResp = dm.ShadowIndexResp
SharePerm = dm.SharePerm
StatusLogIndexReq = dm.StatusLogIndexReq
StatusLogIndexResp = dm.StatusLogIndexResp
StatusLogInfo = dm.StatusLogInfo
TimeRange = dm.TimeRange
UserDeviceCollectSave = dm.UserDeviceCollectSave
UserDeviceShareIndexReq = dm.UserDeviceShareIndexReq
UserDeviceShareIndexResp = dm.UserDeviceShareIndexResp
UserDeviceShareInfo = dm.UserDeviceShareInfo
UserDeviceShareMultiAcceptReq = dm.UserDeviceShareMultiAcceptReq
UserDeviceShareMultiDeleteReq = dm.UserDeviceShareMultiDeleteReq
UserDeviceShareMultiInfo = dm.UserDeviceShareMultiInfo
UserDeviceShareMultiToken = dm.UserDeviceShareMultiToken
UserDeviceShareReadReq = dm.UserDeviceShareReadReq
WithID = dm.WithID
WithIDChildren = dm.WithIDChildren
WithIDCode = dm.WithIDCode
WithProfile = dm.WithProfile
DeviceMsg interface {
// 获取设备sdk调试日志
SdkLogIndex(ctx context.Context, in *SdkLogIndexReq, opts ...grpc.CallOption) (*SdkLogIndexResp, error)
// 获取设备调试信息记录登入登出,操作
HubLogIndex(ctx context.Context, in *HubLogIndexReq, opts ...grpc.CallOption) (*HubLogIndexResp, error)
SendLogIndex(ctx context.Context, in *SendLogIndexReq, opts ...grpc.CallOption) (*SendLogIndexResp, error)
StatusLogIndex(ctx context.Context, in *StatusLogIndexReq, opts ...grpc.CallOption) (*StatusLogIndexResp, error)
// 获取设备数据信息
PropertyLogLatestIndex(ctx context.Context, in *PropertyLogLatestIndexReq, opts ...grpc.CallOption) (*PropertyLogIndexResp, error)
// 获取设备数据信息
PropertyLogIndex(ctx context.Context, in *PropertyLogIndexReq, opts ...grpc.CallOption) (*PropertyLogIndexResp, error)
// 获取设备数据信息
EventLogIndex(ctx context.Context, in *EventLogIndexReq, opts ...grpc.CallOption) (*EventLogIndexResp, error)
// 获取设备影子列表
ShadowIndex(ctx context.Context, in *PropertyLogLatestIndexReq, opts ...grpc.CallOption) (*ShadowIndexResp, error)
// 获取网关可以绑定的子设备列表
GatewayCanBindIndex(ctx context.Context, in *GatewayCanBindIndexReq, opts ...grpc.CallOption) (*GatewayCanBindIndexResp, error)
}
defaultDeviceMsg struct {
cli zrpc.Client
}
directDeviceMsg struct {
svcCtx *svc.ServiceContext
svr dm.DeviceMsgServer
}
)
func NewDeviceMsg(cli zrpc.Client) DeviceMsg {
return &defaultDeviceMsg{
cli: cli,
}
}
func NewDirectDeviceMsg(svcCtx *svc.ServiceContext, svr dm.DeviceMsgServer) DeviceMsg {
return &directDeviceMsg{
svr: svr,
svcCtx: svcCtx,
}
}
// 获取设备sdk调试日志
func (m *defaultDeviceMsg) SdkLogIndex(ctx context.Context, in *SdkLogIndexReq, opts ...grpc.CallOption) (*SdkLogIndexResp, error) {
client := dm.NewDeviceMsgClient(m.cli.Conn())
return client.SdkLogIndex(ctx, in, opts...)
}
// 获取设备sdk调试日志
func (d *directDeviceMsg) SdkLogIndex(ctx context.Context, in *SdkLogIndexReq, opts ...grpc.CallOption) (*SdkLogIndexResp, error) {
return d.svr.SdkLogIndex(ctx, in)
}
// 获取设备调试信息记录登入登出,操作
func (m *defaultDeviceMsg) HubLogIndex(ctx context.Context, in *HubLogIndexReq, opts ...grpc.CallOption) (*HubLogIndexResp, error) {
client := dm.NewDeviceMsgClient(m.cli.Conn())
return client.HubLogIndex(ctx, in, opts...)
}
// 获取设备调试信息记录登入登出,操作
func (d *directDeviceMsg) HubLogIndex(ctx context.Context, in *HubLogIndexReq, opts ...grpc.CallOption) (*HubLogIndexResp, error) {
return d.svr.HubLogIndex(ctx, in)
}
func (m *defaultDeviceMsg) SendLogIndex(ctx context.Context, in *SendLogIndexReq, opts ...grpc.CallOption) (*SendLogIndexResp, error) {
client := dm.NewDeviceMsgClient(m.cli.Conn())
return client.SendLogIndex(ctx, in, opts...)
}
func (d *directDeviceMsg) SendLogIndex(ctx context.Context, in *SendLogIndexReq, opts ...grpc.CallOption) (*SendLogIndexResp, error) {
return d.svr.SendLogIndex(ctx, in)
}
func (m *defaultDeviceMsg) StatusLogIndex(ctx context.Context, in *StatusLogIndexReq, opts ...grpc.CallOption) (*StatusLogIndexResp, error) {
client := dm.NewDeviceMsgClient(m.cli.Conn())
return client.StatusLogIndex(ctx, in, opts...)
}
func (d *directDeviceMsg) StatusLogIndex(ctx context.Context, in *StatusLogIndexReq, opts ...grpc.CallOption) (*StatusLogIndexResp, error) {
return d.svr.StatusLogIndex(ctx, in)
}
// 获取设备数据信息
func (m *defaultDeviceMsg) PropertyLogLatestIndex(ctx context.Context, in *PropertyLogLatestIndexReq, opts ...grpc.CallOption) (*PropertyLogIndexResp, error) {
client := dm.NewDeviceMsgClient(m.cli.Conn())
return client.PropertyLogLatestIndex(ctx, in, opts...)
}
// 获取设备数据信息
func (d *directDeviceMsg) PropertyLogLatestIndex(ctx context.Context, in *PropertyLogLatestIndexReq, opts ...grpc.CallOption) (*PropertyLogIndexResp, error) {
return d.svr.PropertyLogLatestIndex(ctx, in)
}
// 获取设备数据信息
func (m *defaultDeviceMsg) PropertyLogIndex(ctx context.Context, in *PropertyLogIndexReq, opts ...grpc.CallOption) (*PropertyLogIndexResp, error) {
client := dm.NewDeviceMsgClient(m.cli.Conn())
return client.PropertyLogIndex(ctx, in, opts...)
}
// 获取设备数据信息
func (d *directDeviceMsg) PropertyLogIndex(ctx context.Context, in *PropertyLogIndexReq, opts ...grpc.CallOption) (*PropertyLogIndexResp, error) {
return d.svr.PropertyLogIndex(ctx, in)
}
// 获取设备数据信息
func (m *defaultDeviceMsg) EventLogIndex(ctx context.Context, in *EventLogIndexReq, opts ...grpc.CallOption) (*EventLogIndexResp, error) {
client := dm.NewDeviceMsgClient(m.cli.Conn())
return client.EventLogIndex(ctx, in, opts...)
}
// 获取设备数据信息
func (d *directDeviceMsg) EventLogIndex(ctx context.Context, in *EventLogIndexReq, opts ...grpc.CallOption) (*EventLogIndexResp, error) {
return d.svr.EventLogIndex(ctx, in)
}
// 获取设备影子列表
func (m *defaultDeviceMsg) ShadowIndex(ctx context.Context, in *PropertyLogLatestIndexReq, opts ...grpc.CallOption) (*ShadowIndexResp, error) {
client := dm.NewDeviceMsgClient(m.cli.Conn())
return client.ShadowIndex(ctx, in, opts...)
}
// 获取设备影子列表
func (d *directDeviceMsg) ShadowIndex(ctx context.Context, in *PropertyLogLatestIndexReq, opts ...grpc.CallOption) (*ShadowIndexResp, error) {
return d.svr.ShadowIndex(ctx, in)
}
// 获取网关可以绑定的子设备列表
func (m *defaultDeviceMsg) GatewayCanBindIndex(ctx context.Context, in *GatewayCanBindIndexReq, opts ...grpc.CallOption) (*GatewayCanBindIndexResp, error) {
client := dm.NewDeviceMsgClient(m.cli.Conn())
return client.GatewayCanBindIndex(ctx, in, opts...)
}
// 获取网关可以绑定的子设备列表
func (d *directDeviceMsg) GatewayCanBindIndex(ctx context.Context, in *GatewayCanBindIndexReq, opts ...grpc.CallOption) (*GatewayCanBindIndexResp, error) {
return d.svr.GatewayCanBindIndex(ctx, in)
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/unitedrhino/things.git
git@gitee.com:unitedrhino/things.git
unitedrhino
things
things
v1.0.2

搜索帮助