1 Star 0 Fork 0

sa_system / sa_interface

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
device.pb.go 31.83 KB
一键复制 编辑 原始数据 按行查看 历史
JJ-Robot 提交于 2021-01-22 22:53 . 实现device接口
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.14.0
// source: proto/device/device.proto
package device
import (
context "context"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type Device_Struct struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` //设备名称
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` //设备唯一码
GroupName string `protobuf:"bytes,3,opt,name=group_name,json=groupName,proto3" json:"group_name,omitempty"` //模型名称
GroupId string `protobuf:"bytes,4,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` //组号
ModelName string `protobuf:"bytes,5,opt,name=model_name,json=modelName,proto3" json:"model_name,omitempty"` //模型名称
ModelId string `protobuf:"bytes,6,opt,name=model_id,json=modelId,proto3" json:"model_id,omitempty"` //组号
Com485 uint32 `protobuf:"varint,7,opt,name=com485,proto3" json:"com485,omitempty"` //485端口
StationId uint32 `protobuf:"varint,8,opt,name=station_id,json=stationId,proto3" json:"station_id,omitempty"` //485站号
Register uint32 `protobuf:"varint,9,opt,name=register,proto3" json:"register,omitempty"` //寄存器位置
Detail string `protobuf:"bytes,10,opt,name=detail,proto3" json:"detail,omitempty"` //描述
CreateTime string `protobuf:"bytes,11,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` //创建时间
}
func (x *Device_Struct) Reset() {
*x = Device_Struct{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_device_device_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Device_Struct) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Device_Struct) ProtoMessage() {}
func (x *Device_Struct) ProtoReflect() protoreflect.Message {
mi := &file_proto_device_device_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Device_Struct.ProtoReflect.Descriptor instead.
func (*Device_Struct) Descriptor() ([]byte, []int) {
return file_proto_device_device_proto_rawDescGZIP(), []int{0}
}
func (x *Device_Struct) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Device_Struct) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Device_Struct) GetGroupName() string {
if x != nil {
return x.GroupName
}
return ""
}
func (x *Device_Struct) GetGroupId() string {
if x != nil {
return x.GroupId
}
return ""
}
func (x *Device_Struct) GetModelName() string {
if x != nil {
return x.ModelName
}
return ""
}
func (x *Device_Struct) GetModelId() string {
if x != nil {
return x.ModelId
}
return ""
}
func (x *Device_Struct) GetCom485() uint32 {
if x != nil {
return x.Com485
}
return 0
}
func (x *Device_Struct) GetStationId() uint32 {
if x != nil {
return x.StationId
}
return 0
}
func (x *Device_Struct) GetRegister() uint32 {
if x != nil {
return x.Register
}
return 0
}
func (x *Device_Struct) GetDetail() string {
if x != nil {
return x.Detail
}
return ""
}
func (x *Device_Struct) GetCreateTime() string {
if x != nil {
return x.CreateTime
}
return ""
}
type AddDeviceRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` //设备名称
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` //设备唯一码
GroupId string `protobuf:"bytes,3,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` //组号
ModelId string `protobuf:"bytes,4,opt,name=model_id,json=modelId,proto3" json:"model_id,omitempty"` //组号
Com485 uint32 `protobuf:"varint,5,opt,name=com485,proto3" json:"com485,omitempty"` //485端口
StationId uint32 `protobuf:"varint,6,opt,name=station_id,json=stationId,proto3" json:"station_id,omitempty"` //485站号
Register uint32 `protobuf:"varint,7,opt,name=register,proto3" json:"register,omitempty"` //寄存器位置
Detail string `protobuf:"bytes,8,opt,name=detail,proto3" json:"detail,omitempty"` //描述
}
func (x *AddDeviceRequest) Reset() {
*x = AddDeviceRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_device_device_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AddDeviceRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AddDeviceRequest) ProtoMessage() {}
func (x *AddDeviceRequest) ProtoReflect() protoreflect.Message {
mi := &file_proto_device_device_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AddDeviceRequest.ProtoReflect.Descriptor instead.
func (*AddDeviceRequest) Descriptor() ([]byte, []int) {
return file_proto_device_device_proto_rawDescGZIP(), []int{1}
}
func (x *AddDeviceRequest) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *AddDeviceRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *AddDeviceRequest) GetGroupId() string {
if x != nil {
return x.GroupId
}
return ""
}
func (x *AddDeviceRequest) GetModelId() string {
if x != nil {
return x.ModelId
}
return ""
}
func (x *AddDeviceRequest) GetCom485() uint32 {
if x != nil {
return x.Com485
}
return 0
}
func (x *AddDeviceRequest) GetStationId() uint32 {
if x != nil {
return x.StationId
}
return 0
}
func (x *AddDeviceRequest) GetRegister() uint32 {
if x != nil {
return x.Register
}
return 0
}
func (x *AddDeviceRequest) GetDetail() string {
if x != nil {
return x.Detail
}
return ""
}
type AddDeviceResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` //设备名称
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` //设备模型唯一码
}
func (x *AddDeviceResponse) Reset() {
*x = AddDeviceResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_device_device_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AddDeviceResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AddDeviceResponse) ProtoMessage() {}
func (x *AddDeviceResponse) ProtoReflect() protoreflect.Message {
mi := &file_proto_device_device_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AddDeviceResponse.ProtoReflect.Descriptor instead.
func (*AddDeviceResponse) Descriptor() ([]byte, []int) {
return file_proto_device_device_proto_rawDescGZIP(), []int{2}
}
func (x *AddDeviceResponse) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *AddDeviceResponse) GetId() string {
if x != nil {
return x.Id
}
return ""
}
//删除硬件模型
type DeleteDeviceRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` //设备模型唯一码
}
func (x *DeleteDeviceRequest) Reset() {
*x = DeleteDeviceRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_device_device_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeleteDeviceRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteDeviceRequest) ProtoMessage() {}
func (x *DeleteDeviceRequest) ProtoReflect() protoreflect.Message {
mi := &file_proto_device_device_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeleteDeviceRequest.ProtoReflect.Descriptor instead.
func (*DeleteDeviceRequest) Descriptor() ([]byte, []int) {
return file_proto_device_device_proto_rawDescGZIP(), []int{3}
}
func (x *DeleteDeviceRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type DeleteDeviceResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *DeleteDeviceResponse) Reset() {
*x = DeleteDeviceResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_device_device_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeleteDeviceResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteDeviceResponse) ProtoMessage() {}
func (x *DeleteDeviceResponse) ProtoReflect() protoreflect.Message {
mi := &file_proto_device_device_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeleteDeviceResponse.ProtoReflect.Descriptor instead.
func (*DeleteDeviceResponse) Descriptor() ([]byte, []int) {
return file_proto_device_device_proto_rawDescGZIP(), []int{4}
}
//当不传page_num和page_size或等于0相当查询全部
type ListDeviceRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
PageNum uint32 `protobuf:"varint,1,opt,name=page_num,json=pageNum,proto3" json:"page_num,omitempty"`
PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
}
func (x *ListDeviceRequest) Reset() {
*x = ListDeviceRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_device_device_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListDeviceRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListDeviceRequest) ProtoMessage() {}
func (x *ListDeviceRequest) ProtoReflect() protoreflect.Message {
mi := &file_proto_device_device_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListDeviceRequest.ProtoReflect.Descriptor instead.
func (*ListDeviceRequest) Descriptor() ([]byte, []int) {
return file_proto_device_device_proto_rawDescGZIP(), []int{5}
}
func (x *ListDeviceRequest) GetPageNum() uint32 {
if x != nil {
return x.PageNum
}
return 0
}
func (x *ListDeviceRequest) GetPageSize() uint32 {
if x != nil {
return x.PageSize
}
return 0
}
type ListDeviceResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Total uint32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
Device []*Device_Struct `protobuf:"bytes,2,rep,name=device,proto3" json:"device,omitempty"`
}
func (x *ListDeviceResponse) Reset() {
*x = ListDeviceResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_device_device_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListDeviceResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListDeviceResponse) ProtoMessage() {}
func (x *ListDeviceResponse) ProtoReflect() protoreflect.Message {
mi := &file_proto_device_device_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListDeviceResponse.ProtoReflect.Descriptor instead.
func (*ListDeviceResponse) Descriptor() ([]byte, []int) {
return file_proto_device_device_proto_rawDescGZIP(), []int{6}
}
func (x *ListDeviceResponse) GetTotal() uint32 {
if x != nil {
return x.Total
}
return 0
}
func (x *ListDeviceResponse) GetDevice() []*Device_Struct {
if x != nil {
return x.Device
}
return nil
}
var File_proto_device_device_proto protoreflect.FileDescriptor
var file_proto_device_device_proto_rawDesc = []byte{
0x0a, 0x19, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64,
0x65, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x65, 0x76,
0x69, 0x63, 0x65, 0x22, 0xb3, 0x02, 0x0a, 0x0d, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x53,
0x74, 0x72, 0x75, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x72, 0x6f,
0x75, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67,
0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75,
0x70, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75,
0x70, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x61, 0x6d,
0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x4e, 0x61,
0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x06,
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x16, 0x0a,
0x06, 0x63, 0x6f, 0x6d, 0x34, 0x38, 0x35, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x63,
0x6f, 0x6d, 0x34, 0x38, 0x35, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72,
0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72,
0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09,
0x52, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61,
0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63,
0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xd7, 0x01, 0x0a, 0x10, 0x41, 0x64,
0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12,
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02,
0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x03,
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x19, 0x0a,
0x08, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
0x07, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x34,
0x38, 0x35, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x34, 0x38, 0x35,
0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x06,
0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12,
0x1a, 0x0a, 0x08, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28,
0x0d, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x64,
0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x74,
0x61, 0x69, 0x6c, 0x22, 0x37, 0x0a, 0x11, 0x41, 0x64, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02,
0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x25, 0x0a, 0x13,
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x02, 0x69, 0x64, 0x22, 0x16, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x65, 0x76,
0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4b, 0x0a, 0x11, 0x4c,
0x69, 0x73, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0d, 0x52, 0x07, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x12, 0x1b, 0x0a, 0x09, 0x70,
0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08,
0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x59, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74,
0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14,
0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x74,
0x6f, 0x74, 0x61, 0x6c, 0x12, 0x2d, 0x0a, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x44, 0x65,
0x76, 0x69, 0x63, 0x65, 0x5f, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, 0x64, 0x65, 0x76,
0x69, 0x63, 0x65, 0x32, 0xa0, 0x02, 0x0a, 0x06, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x42,
0x0a, 0x09, 0x41, 0x64, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x18, 0x2e, 0x64, 0x65,
0x76, 0x69, 0x63, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x41,
0x64, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x00, 0x12, 0x4b, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69,
0x63, 0x65, 0x12, 0x1b, 0x2e, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65,
0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x1c, 0x2e, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44,
0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
0x45, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x19, 0x2e,
0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63,
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x64, 0x65, 0x76, 0x69, 0x63,
0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x15, 0x2e, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x2e,
0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x1a, 0x15, 0x2e,
0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x53, 0x74,
0x72, 0x75, 0x63, 0x74, 0x22, 0x00, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x3b, 0x64, 0x65, 0x76, 0x69,
0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_proto_device_device_proto_rawDescOnce sync.Once
file_proto_device_device_proto_rawDescData = file_proto_device_device_proto_rawDesc
)
func file_proto_device_device_proto_rawDescGZIP() []byte {
file_proto_device_device_proto_rawDescOnce.Do(func() {
file_proto_device_device_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_device_device_proto_rawDescData)
})
return file_proto_device_device_proto_rawDescData
}
var file_proto_device_device_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_proto_device_device_proto_goTypes = []interface{}{
(*Device_Struct)(nil), // 0: device.Device_Struct
(*AddDeviceRequest)(nil), // 1: device.AddDeviceRequest
(*AddDeviceResponse)(nil), // 2: device.AddDeviceResponse
(*DeleteDeviceRequest)(nil), // 3: device.DeleteDeviceRequest
(*DeleteDeviceResponse)(nil), // 4: device.DeleteDeviceResponse
(*ListDeviceRequest)(nil), // 5: device.ListDeviceRequest
(*ListDeviceResponse)(nil), // 6: device.ListDeviceResponse
}
var file_proto_device_device_proto_depIdxs = []int32{
0, // 0: device.ListDeviceResponse.device:type_name -> device.Device_Struct
1, // 1: device.Device.AddDevice:input_type -> device.AddDeviceRequest
3, // 2: device.Device.DeleteDevice:input_type -> device.DeleteDeviceRequest
5, // 3: device.Device.ListDevice:input_type -> device.ListDeviceRequest
0, // 4: device.Device.UpdateDevice:input_type -> device.Device_Struct
2, // 5: device.Device.AddDevice:output_type -> device.AddDeviceResponse
4, // 6: device.Device.DeleteDevice:output_type -> device.DeleteDeviceResponse
6, // 7: device.Device.ListDevice:output_type -> device.ListDeviceResponse
0, // 8: device.Device.UpdateDevice:output_type -> device.Device_Struct
5, // [5:9] is the sub-list for method output_type
1, // [1:5] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_proto_device_device_proto_init() }
func file_proto_device_device_proto_init() {
if File_proto_device_device_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_proto_device_device_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Device_Struct); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_device_device_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AddDeviceRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_device_device_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AddDeviceResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_device_device_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteDeviceRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_device_device_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteDeviceResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_device_device_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListDeviceRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_device_device_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListDeviceResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_proto_device_device_proto_rawDesc,
NumEnums: 0,
NumMessages: 7,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_proto_device_device_proto_goTypes,
DependencyIndexes: file_proto_device_device_proto_depIdxs,
MessageInfos: file_proto_device_device_proto_msgTypes,
}.Build()
File_proto_device_device_proto = out.File
file_proto_device_device_proto_rawDesc = nil
file_proto_device_device_proto_goTypes = nil
file_proto_device_device_proto_depIdxs = nil
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6
// DeviceClient is the client API for Device service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type DeviceClient interface {
AddDevice(ctx context.Context, in *AddDeviceRequest, opts ...grpc.CallOption) (*AddDeviceResponse, error)
DeleteDevice(ctx context.Context, in *DeleteDeviceRequest, opts ...grpc.CallOption) (*DeleteDeviceResponse, error)
ListDevice(ctx context.Context, in *ListDeviceRequest, opts ...grpc.CallOption) (*ListDeviceResponse, error)
UpdateDevice(ctx context.Context, in *Device_Struct, opts ...grpc.CallOption) (*Device_Struct, error)
}
type deviceClient struct {
cc grpc.ClientConnInterface
}
func NewDeviceClient(cc grpc.ClientConnInterface) DeviceClient {
return &deviceClient{cc}
}
func (c *deviceClient) AddDevice(ctx context.Context, in *AddDeviceRequest, opts ...grpc.CallOption) (*AddDeviceResponse, error) {
out := new(AddDeviceResponse)
err := c.cc.Invoke(ctx, "/device.Device/AddDevice", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *deviceClient) DeleteDevice(ctx context.Context, in *DeleteDeviceRequest, opts ...grpc.CallOption) (*DeleteDeviceResponse, error) {
out := new(DeleteDeviceResponse)
err := c.cc.Invoke(ctx, "/device.Device/DeleteDevice", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *deviceClient) ListDevice(ctx context.Context, in *ListDeviceRequest, opts ...grpc.CallOption) (*ListDeviceResponse, error) {
out := new(ListDeviceResponse)
err := c.cc.Invoke(ctx, "/device.Device/ListDevice", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *deviceClient) UpdateDevice(ctx context.Context, in *Device_Struct, opts ...grpc.CallOption) (*Device_Struct, error) {
out := new(Device_Struct)
err := c.cc.Invoke(ctx, "/device.Device/UpdateDevice", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// DeviceServer is the server API for Device service.
type DeviceServer interface {
AddDevice(context.Context, *AddDeviceRequest) (*AddDeviceResponse, error)
DeleteDevice(context.Context, *DeleteDeviceRequest) (*DeleteDeviceResponse, error)
ListDevice(context.Context, *ListDeviceRequest) (*ListDeviceResponse, error)
UpdateDevice(context.Context, *Device_Struct) (*Device_Struct, error)
}
// UnimplementedDeviceServer can be embedded to have forward compatible implementations.
type UnimplementedDeviceServer struct {
}
func (*UnimplementedDeviceServer) AddDevice(context.Context, *AddDeviceRequest) (*AddDeviceResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddDevice not implemented")
}
func (*UnimplementedDeviceServer) DeleteDevice(context.Context, *DeleteDeviceRequest) (*DeleteDeviceResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteDevice not implemented")
}
func (*UnimplementedDeviceServer) ListDevice(context.Context, *ListDeviceRequest) (*ListDeviceResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListDevice not implemented")
}
func (*UnimplementedDeviceServer) UpdateDevice(context.Context, *Device_Struct) (*Device_Struct, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateDevice not implemented")
}
func RegisterDeviceServer(s *grpc.Server, srv DeviceServer) {
s.RegisterService(&_Device_serviceDesc, srv)
}
func _Device_AddDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AddDeviceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DeviceServer).AddDevice(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/device.Device/AddDevice",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DeviceServer).AddDevice(ctx, req.(*AddDeviceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Device_DeleteDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteDeviceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DeviceServer).DeleteDevice(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/device.Device/DeleteDevice",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DeviceServer).DeleteDevice(ctx, req.(*DeleteDeviceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Device_ListDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListDeviceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DeviceServer).ListDevice(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/device.Device/ListDevice",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DeviceServer).ListDevice(ctx, req.(*ListDeviceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Device_UpdateDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Device_Struct)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DeviceServer).UpdateDevice(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/device.Device/UpdateDevice",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DeviceServer).UpdateDevice(ctx, req.(*Device_Struct))
}
return interceptor(ctx, in, info, handler)
}
var _Device_serviceDesc = grpc.ServiceDesc{
ServiceName: "device.Device",
HandlerType: (*DeviceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "AddDevice",
Handler: _Device_AddDevice_Handler,
},
{
MethodName: "DeleteDevice",
Handler: _Device_DeleteDevice_Handler,
},
{
MethodName: "ListDevice",
Handler: _Device_ListDevice_Handler,
},
{
MethodName: "UpdateDevice",
Handler: _Device_UpdateDevice_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "proto/device/device.proto",
}
Go
1
https://gitee.com/sa_system/sa_interface.git
git@gitee.com:sa_system/sa_interface.git
sa_system
sa_interface
sa_interface
v1.2.0

搜索帮助