From bb92152c1519b8e99a427b2fdebc419b51a7ec9d Mon Sep 17 00:00:00 2001 From: pg Date: Fri, 14 Feb 2025 14:43:33 +0800 Subject: [PATCH] feature: add platform and ready to send register to server --- plugin/gb28181pro/api.go | 413 +++++ plugin/gb28181pro/device.go | 1 + plugin/gb28181pro/index.go | 3 +- plugin/gb28181pro/pb/gb28181.pb.go | 1749 +++++++++++++------ plugin/gb28181pro/pb/gb28181.pb.gw.go | 447 +++++ plugin/gb28181pro/pb/gb28181.proto | 112 ++ plugin/gb28181pro/pb/gb28181_grpc.pb.go | 200 +++ plugin/gb28181pro/pkg/platform.go | 112 ++ plugin/gb28181pro/pkg/sipplatformcommand.go | 265 +++ 9 files changed, 2802 insertions(+), 500 deletions(-) create mode 100644 plugin/gb28181pro/pkg/platform.go create mode 100644 plugin/gb28181pro/pkg/sipplatformcommand.go diff --git a/plugin/gb28181pro/api.go b/plugin/gb28181pro/api.go index 2ba6bca..548f665 100644 --- a/plugin/gb28181pro/api.go +++ b/plugin/gb28181pro/api.go @@ -5,8 +5,10 @@ import ( "fmt" "net/http" "os" + "strconv" "strings" "sync" + "time" "github.com/emiago/sipgo" "github.com/emiago/sipgo/sip" @@ -451,3 +453,414 @@ func (gb *GB28181ProPlugin) StartPlay(ctx context.Context, req *pb.PlayRequest) gb.Info("StartPlay success", "deviceId", req.DeviceId, "channelId", req.ChannelId, "ssrc", ssrc) return resp, nil } + +// AddPlatform 实现添加平台信息 +func (gb *GB28181ProPlugin) AddPlatform(ctx context.Context, req *pb.Platform) (*pb.BaseResponse, error) { + resp := &pb.BaseResponse{} + + if gb.DB == nil { + resp.Code = 500 + resp.Message = "database not initialized" + return resp, nil + } + + // 必填字段校验 + if req.Name == "" { + resp.Code = 400 + resp.Message = "平台名称不可为空" + return resp, nil + } + if req.ServerGBId == "" { + resp.Code = 400 + resp.Message = "上级平台国标编号不可为空" + return resp, nil + } + if req.ServerIp == "" { + resp.Code = 400 + resp.Message = "上级平台IP不可为空" + return resp, nil + } + if req.ServerPort <= 0 || req.ServerPort > 65535 { + resp.Code = 400 + resp.Message = "上级平台端口异常" + return resp, nil + } + if req.DeviceGBId == "" { + resp.Code = 400 + resp.Message = "本平台国标编号不可为空" + return resp, nil + } + + // 检查平台是否已存在 + var existingPlatform gb28181.Platform + if err := gb.DB.Where("server_gb_id = ?", req.ServerGBId).First(&existingPlatform).Error; err == nil { + resp.Code = 400 + resp.Message = fmt.Sprintf("平台 %s 已存在", req.ServerGBId) + return resp, nil + } + + // 设置默认值 + if req.ServerGBDomain == "" { + req.ServerGBDomain = req.ServerGBId[:6] // 取前6位作为域 + } + if req.Expires <= 0 { + req.Expires = 3600 // 默认3600秒 + } + if req.KeepTimeout <= 0 { + req.KeepTimeout = 60 // 默认60秒 + } + if req.Transport == "" { + req.Transport = "UDP" // 默认UDP + } + if req.CharacterSet == "" { + req.CharacterSet = "GB2312" // 默认GB2312 + } + + // 设置创建时间和更新时间 + currentTime := time.Now().Format("2006-01-02 15:04:05") + req.CreateTime = currentTime + req.UpdateTime = currentTime + + // 将proto消息转换为数据库模型 + platform := &gb28181.Platform{ + Enable: req.Enable, + Name: req.Name, + ServerGBID: req.ServerGBId, + ServerGBDomain: req.ServerGBDomain, + ServerIP: req.ServerIp, + ServerPort: int(req.ServerPort), + DeviceGBID: req.DeviceGBId, + DeviceIP: req.DeviceIp, + DevicePort: int(req.DevicePort), + Username: req.Username, + Password: req.Password, + Expires: int(req.Expires), + KeepTimeout: int(req.KeepTimeout), + Transport: req.Transport, + CharacterSet: req.CharacterSet, + PTZ: req.Ptz, + RTCP: req.Rtcp, + Status: req.Status, + ChannelCount: int(req.ChannelCount), + CatalogSubscribe: req.CatalogSubscribe, + AlarmSubscribe: req.AlarmSubscribe, + MobilePositionSubscribe: req.MobilePositionSubscribe, + CatalogGroup: int(req.CatalogGroup), + UpdateTime: req.UpdateTime, + CreateTime: req.CreateTime, + AsMessageChannel: req.AsMessageChannel, + SendStreamIP: req.SendStreamIp, + AutoPushChannel: &req.AutoPushChannel, + CatalogWithPlatform: int(req.CatalogWithPlatform), + CatalogWithGroup: int(req.CatalogWithGroup), + CatalogWithRegion: int(req.CatalogWithRegion), + CivilCode: req.CivilCode, + Manufacturer: req.Manufacturer, + Model: req.Model, + Address: req.Address, + RegisterWay: int(req.RegisterWay), + Secrecy: int(req.Secrecy), + } + + // 保存到数据库 + if err := gb.DB.Create(platform).Error; err != nil { + resp.Code = 500 + resp.Message = fmt.Sprintf("failed to create platform: %v", err) + return resp, nil + } + + // 如果平台启用,则启动注册任务 + if platform.Enable { + // 获取本地SIP端口 + localPort := 5060 // 默认端口 + if len(gb.Sip.ListenAddr) > 0 { + if port, err := strconv.Atoi(strings.Split(gb.Sip.ListenAddr[0], ":")[1]); err == nil { + localPort = port + } + } + // 创建平台命令器 + commander := gb28181.NewSIPPlatformCommander(platform, gb.GetPublicIP(platform.ServerIP), localPort) + if err := commander.InitializeSIPClient(gb.ua); err != nil { + gb.Error("初始化SIP客户端失败", "error", err) + resp.Code = 500 + resp.Message = fmt.Sprintf("初始化SIP客户端失败: %v", err) + return resp, nil + } + // 启动注册任务 + commander.StartRegisterTask(gb) + } + + resp.Code = 0 + resp.Message = "success" + return resp, nil +} + +// GetPlatform 实现获取平台信息 +func (gb *GB28181ProPlugin) GetPlatform(ctx context.Context, req *pb.GetPlatformRequest) (*pb.PlatformResponse, error) { + resp := &pb.PlatformResponse{} + + if gb.DB == nil { + resp.Code = 500 + resp.Message = "database not initialized" + return resp, nil + } + + var platform gb28181.Platform + if err := gb.DB.First(&platform, req.Id).Error; err != nil { + resp.Code = 404 + resp.Message = "platform not found" + return resp, nil + } + + // 将数据库模型转换为proto消息 + resp.Data = &pb.Platform{ + Id: int32(platform.ID), + Enable: platform.Enable, + Name: platform.Name, + ServerGBId: platform.ServerGBID, + ServerGBDomain: platform.ServerGBDomain, + ServerIp: platform.ServerIP, + ServerPort: int32(platform.ServerPort), + DeviceGBId: platform.DeviceGBID, + DeviceIp: platform.DeviceIP, + DevicePort: int32(platform.DevicePort), + Username: platform.Username, + Password: platform.Password, + Expires: int32(platform.Expires), + KeepTimeout: int32(platform.KeepTimeout), + Transport: platform.Transport, + CharacterSet: platform.CharacterSet, + Ptz: platform.PTZ, + Rtcp: platform.RTCP, + Status: platform.Status, + ChannelCount: int32(platform.ChannelCount), + CatalogSubscribe: platform.CatalogSubscribe, + AlarmSubscribe: platform.AlarmSubscribe, + MobilePositionSubscribe: platform.MobilePositionSubscribe, + CatalogGroup: int32(platform.CatalogGroup), + UpdateTime: platform.UpdateTime, + CreateTime: platform.CreateTime, + AsMessageChannel: platform.AsMessageChannel, + SendStreamIp: platform.SendStreamIP, + AutoPushChannel: platform.AutoPushChannel != nil && *platform.AutoPushChannel, + CatalogWithPlatform: int32(platform.CatalogWithPlatform), + CatalogWithGroup: int32(platform.CatalogWithGroup), + CatalogWithRegion: int32(platform.CatalogWithRegion), + CivilCode: platform.CivilCode, + Manufacturer: platform.Manufacturer, + Model: platform.Model, + Address: platform.Address, + RegisterWay: int32(platform.RegisterWay), + Secrecy: int32(platform.Secrecy), + } + + resp.Code = 0 + resp.Message = "success" + return resp, nil +} + +// UpdatePlatform 实现更新平台信息 +func (gb *GB28181ProPlugin) UpdatePlatform(ctx context.Context, req *pb.Platform) (*pb.BaseResponse, error) { + resp := &pb.BaseResponse{} + + if gb.DB == nil { + resp.Code = 500 + resp.Message = "database not initialized" + return resp, nil + } + + // 检查平台是否存在 + var platform gb28181.Platform + if err := gb.DB.First(&platform, req.Id).Error; err != nil { + resp.Code = 404 + resp.Message = "platform not found" + return resp, nil + } + + // 记录之前的启用状态 + wasEnabled := platform.Enable + + // 更新平台信息 + platform.Enable = req.Enable + platform.Name = req.Name + platform.ServerGBID = req.ServerGBId + platform.ServerGBDomain = req.ServerGBDomain + platform.ServerIP = req.ServerIp + platform.ServerPort = int(req.ServerPort) + platform.DeviceGBID = req.DeviceGBId + platform.DeviceIP = req.DeviceIp + platform.DevicePort = int(req.DevicePort) + platform.Username = req.Username + platform.Password = req.Password + platform.Expires = int(req.Expires) + platform.KeepTimeout = int(req.KeepTimeout) + platform.Transport = req.Transport + platform.CharacterSet = req.CharacterSet + platform.PTZ = req.Ptz + platform.RTCP = req.Rtcp + platform.Status = req.Status + platform.ChannelCount = int(req.ChannelCount) + platform.CatalogSubscribe = req.CatalogSubscribe + platform.AlarmSubscribe = req.AlarmSubscribe + platform.MobilePositionSubscribe = req.MobilePositionSubscribe + platform.CatalogGroup = int(req.CatalogGroup) + platform.UpdateTime = req.UpdateTime + platform.AsMessageChannel = req.AsMessageChannel + platform.SendStreamIP = req.SendStreamIp + platform.AutoPushChannel = &req.AutoPushChannel + platform.CatalogWithPlatform = int(req.CatalogWithPlatform) + platform.CatalogWithGroup = int(req.CatalogWithGroup) + platform.CatalogWithRegion = int(req.CatalogWithRegion) + platform.CivilCode = req.CivilCode + platform.Manufacturer = req.Manufacturer + platform.Model = req.Model + platform.Address = req.Address + platform.RegisterWay = int(req.RegisterWay) + platform.Secrecy = int(req.Secrecy) + + if err := gb.DB.Save(&platform).Error; err != nil { + resp.Code = 500 + resp.Message = fmt.Sprintf("failed to update platform: %v", err) + return resp, nil + } + + // 处理平台启用状态变化 + if !wasEnabled && platform.Enable { + // 获取本地SIP端口 + localPort := 5060 // 默认端口 + if len(gb.Sip.ListenAddr) > 0 { + if port, err := strconv.Atoi(strings.Split(gb.Sip.ListenAddr[0], ":")[1]); err == nil { + localPort = port + } + } + // 平台从禁用变为启用,启动注册任务 + commander := gb28181.NewSIPPlatformCommander(&platform, gb.GetPublicIP(platform.ServerIP), localPort) + if err := commander.InitializeSIPClient(gb.ua); err != nil { + gb.Error("初始化SIP客户端失败", "error", err) + resp.Code = 500 + resp.Message = fmt.Sprintf("初始化SIP客户端失败: %v", err) + return resp, nil + } + commander.StartRegisterTask(gb) + } else if wasEnabled && !platform.Enable { + // TODO: 平台从启用变为禁用,需要处理注销逻辑 + // 这里可以添加注销相关的代码 + } + + resp.Code = 0 + resp.Message = "success" + return resp, nil +} + +// DeletePlatform 实现删除平台信息 +func (gb *GB28181ProPlugin) DeletePlatform(ctx context.Context, req *pb.DeletePlatformRequest) (*pb.BaseResponse, error) { + resp := &pb.BaseResponse{} + + if gb.DB == nil { + resp.Code = 500 + resp.Message = "database not initialized" + return resp, nil + } + + // 删除平台 + if err := gb.DB.Delete(&gb28181.Platform{}, req.Id).Error; err != nil { + resp.Code = 500 + resp.Message = fmt.Sprintf("failed to delete platform: %v", err) + return resp, nil + } + + resp.Code = 0 + resp.Message = "success" + return resp, nil +} + +// ListPlatforms 实现获取平台列表 +func (gb *GB28181ProPlugin) ListPlatforms(ctx context.Context, req *pb.ListPlatformsRequest) (*pb.PlatformsPageInfo, error) { + resp := &pb.PlatformsPageInfo{} + + if gb.DB == nil { + resp.Code = 500 + resp.Message = "database not initialized" + return resp, nil + } + + var platforms []gb28181.Platform + var total int64 + + // 构建查询条件 + query := gb.DB.Model(&gb28181.Platform{}) + if req.Query != "" { + query = query.Where("name LIKE ? OR server_gb_id LIKE ? OR device_gb_id LIKE ?", + "%"+req.Query+"%", "%"+req.Query+"%", "%"+req.Query+"%") + } + if req.Status { + query = query.Where("status = ?", true) + } + + // 获取总数 + if err := query.Count(&total).Error; err != nil { + resp.Code = 500 + resp.Message = fmt.Sprintf("failed to count platforms: %v", err) + return resp, nil + } + + // 分页查询 + if err := query.Offset(int(req.Page-1) * int(req.Count)). + Limit(int(req.Count)). + Find(&platforms).Error; err != nil { + resp.Code = 500 + resp.Message = fmt.Sprintf("failed to list platforms: %v", err) + return resp, nil + } + + // 转换为proto消息 + var pbPlatforms []*pb.Platform + for _, p := range platforms { + pbPlatforms = append(pbPlatforms, &pb.Platform{ + Id: int32(p.ID), + Enable: p.Enable, + Name: p.Name, + ServerGBId: p.ServerGBID, + ServerGBDomain: p.ServerGBDomain, + ServerIp: p.ServerIP, + ServerPort: int32(p.ServerPort), + DeviceGBId: p.DeviceGBID, + DeviceIp: p.DeviceIP, + DevicePort: int32(p.DevicePort), + Username: p.Username, + Password: p.Password, + Expires: int32(p.Expires), + KeepTimeout: int32(p.KeepTimeout), + Transport: p.Transport, + CharacterSet: p.CharacterSet, + Ptz: p.PTZ, + Rtcp: p.RTCP, + Status: p.Status, + ChannelCount: int32(p.ChannelCount), + CatalogSubscribe: p.CatalogSubscribe, + AlarmSubscribe: p.AlarmSubscribe, + MobilePositionSubscribe: p.MobilePositionSubscribe, + CatalogGroup: int32(p.CatalogGroup), + UpdateTime: p.UpdateTime, + CreateTime: p.CreateTime, + AsMessageChannel: p.AsMessageChannel, + SendStreamIp: p.SendStreamIP, + AutoPushChannel: p.AutoPushChannel != nil && *p.AutoPushChannel, + CatalogWithPlatform: int32(p.CatalogWithPlatform), + CatalogWithGroup: int32(p.CatalogWithGroup), + CatalogWithRegion: int32(p.CatalogWithRegion), + CivilCode: p.CivilCode, + Manufacturer: p.Manufacturer, + Model: p.Model, + Address: p.Address, + RegisterWay: int32(p.RegisterWay), + Secrecy: int32(p.Secrecy), + }) + } + + resp.Total = int32(total) + resp.List = pbPlatforms + resp.Code = 0 + resp.Message = "success" + return resp, nil +} diff --git a/plugin/gb28181pro/device.go b/plugin/gb28181pro/device.go index f8af8db..a79dbc6 100644 --- a/plugin/gb28181pro/device.go +++ b/plugin/gb28181pro/device.go @@ -74,6 +74,7 @@ type Device struct { fromHDR sip.FromHeader toHDR sip.ToHeader plugin *GB28181ProPlugin + abc *sip.ClientTransaction } func (d *Device) TableName() string { diff --git a/plugin/gb28181pro/index.go b/plugin/gb28181pro/index.go index 349f41e..a61536a 100644 --- a/plugin/gb28181pro/index.go +++ b/plugin/gb28181pro/index.go @@ -143,7 +143,7 @@ type GB28181ProPlugin struct { m7s.Plugin AutoInvite bool `default:"true" desc:"自动邀请"` Serial string `default:"34020000002000000001" desc:"sip 服务 id"` //sip 服务器 id, 默认 34020000002000000001 - Realm string `default:"3402000000" desc:"sip 服务域"` //sip 服务器域,默认 3402000000 + Realm string `default:"3402000000" desc:"sip 服务域"` //sip 服务器域,默认 3402000000 Username string Password string Sip SipConfig @@ -208,6 +208,7 @@ func (gb *GB28181ProPlugin) OnInit() (err error) { if gb.DB != nil { gb.DB.AutoMigrate(&Device{}) gb.DB.AutoMigrate(&gb28181.ChannelInfo{}) + gb.DB.AutoMigrate(&gb28181.Platform{}) } } if gb.Parent != "" { diff --git a/plugin/gb28181pro/pb/gb28181.pb.go b/plugin/gb28181pro/pb/gb28181.pb.go index a631ff5..fb0b643 100644 --- a/plugin/gb28181pro/pb/gb28181.pb.go +++ b/plugin/gb28181pro/pb/gb28181.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.2 +// protoc-gen-go v1.36.5 // protoc v5.28.3 // source: gb28181.proto @@ -16,6 +16,7 @@ import ( timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -27,12 +28,11 @@ const ( // 基础响应消息 type BaseResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` unknownFields protoimpl.UnknownFields - - Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + sizeCache protoimpl.SizeCache } func (x *BaseResponse) Reset() { @@ -81,11 +81,10 @@ func (x *BaseResponse) GetMessage() string { // 请求和响应消息定义 type GetDeviceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + DeviceId string `protobuf:"bytes,1,opt,name=deviceId,proto3" json:"deviceId,omitempty"` unknownFields protoimpl.UnknownFields - - DeviceId string `protobuf:"bytes,1,opt,name=deviceId,proto3" json:"deviceId,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetDeviceRequest) Reset() { @@ -126,14 +125,13 @@ func (x *GetDeviceRequest) GetDeviceId() string { } type GetDevicesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` + Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` + Query string `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"` + Status bool `protobuf:"varint,4,opt,name=status,proto3" json:"status,omitempty"` unknownFields protoimpl.UnknownFields - - Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` - Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` - Query string `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"` - Status bool `protobuf:"varint,4,opt,name=status,proto3" json:"status,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetDevicesRequest) Reset() { @@ -195,14 +193,13 @@ func (x *GetDevicesRequest) GetStatus() bool { } type DevicesPageInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + Total int32 `protobuf:"varint,3,opt,name=total,proto3" json:"total,omitempty"` + List []*Device `protobuf:"bytes,4,rep,name=list,proto3" json:"list,omitempty"` unknownFields protoimpl.UnknownFields - - Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - Total int32 `protobuf:"varint,3,opt,name=total,proto3" json:"total,omitempty"` - List []*Device `protobuf:"bytes,4,rep,name=list,proto3" json:"list,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DevicesPageInfo) Reset() { @@ -264,16 +261,15 @@ func (x *DevicesPageInfo) GetList() []*Device { } type GetChannelsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + DeviceId string `protobuf:"bytes,1,opt,name=deviceId,proto3" json:"deviceId,omitempty"` + Page int32 `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty"` + Count int32 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"` + Query string `protobuf:"bytes,4,opt,name=query,proto3" json:"query,omitempty"` + Online bool `protobuf:"varint,5,opt,name=online,proto3" json:"online,omitempty"` + ChannelType bool `protobuf:"varint,6,opt,name=channelType,proto3" json:"channelType,omitempty"` unknownFields protoimpl.UnknownFields - - DeviceId string `protobuf:"bytes,1,opt,name=deviceId,proto3" json:"deviceId,omitempty"` - Page int32 `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty"` - Count int32 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"` - Query string `protobuf:"bytes,4,opt,name=query,proto3" json:"query,omitempty"` - Online bool `protobuf:"varint,5,opt,name=online,proto3" json:"online,omitempty"` - ChannelType bool `protobuf:"varint,6,opt,name=channelType,proto3" json:"channelType,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetChannelsRequest) Reset() { @@ -349,14 +345,13 @@ func (x *GetChannelsRequest) GetChannelType() bool { } type ChannelsPageInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + Total int32 `protobuf:"varint,3,opt,name=total,proto3" json:"total,omitempty"` + List []*Channel `protobuf:"bytes,4,rep,name=list,proto3" json:"list,omitempty"` unknownFields protoimpl.UnknownFields - - Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - Total int32 `protobuf:"varint,3,opt,name=total,proto3" json:"total,omitempty"` - List []*Channel `protobuf:"bytes,4,rep,name=list,proto3" json:"list,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ChannelsPageInfo) Reset() { @@ -418,11 +413,10 @@ func (x *ChannelsPageInfo) GetList() []*Channel { } type SyncDeviceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + DeviceId string `protobuf:"bytes,1,opt,name=deviceId,proto3" json:"deviceId,omitempty"` unknownFields protoimpl.UnknownFields - - DeviceId string `protobuf:"bytes,1,opt,name=deviceId,proto3" json:"deviceId,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SyncDeviceRequest) Reset() { @@ -463,15 +457,14 @@ func (x *SyncDeviceRequest) GetDeviceId() string { } type SyncStatus struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + Total int32 `protobuf:"varint,3,opt,name=total,proto3" json:"total,omitempty"` + Current int32 `protobuf:"varint,4,opt,name=current,proto3" json:"current,omitempty"` + ErrorMsg string `protobuf:"bytes,5,opt,name=errorMsg,proto3" json:"errorMsg,omitempty"` unknownFields protoimpl.UnknownFields - - Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - Total int32 `protobuf:"varint,3,opt,name=total,proto3" json:"total,omitempty"` - Current int32 `protobuf:"varint,4,opt,name=current,proto3" json:"current,omitempty"` - ErrorMsg string `protobuf:"bytes,5,opt,name=errorMsg,proto3" json:"errorMsg,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SyncStatus) Reset() { @@ -540,11 +533,10 @@ func (x *SyncStatus) GetErrorMsg() string { } type DeleteDeviceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + DeviceId string `protobuf:"bytes,1,opt,name=deviceId,proto3" json:"deviceId,omitempty"` unknownFields protoimpl.UnknownFields - - DeviceId string `protobuf:"bytes,1,opt,name=deviceId,proto3" json:"deviceId,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeleteDeviceRequest) Reset() { @@ -585,13 +577,12 @@ func (x *DeleteDeviceRequest) GetDeviceId() string { } type DeleteDeviceResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + DeviceId string `protobuf:"bytes,3,opt,name=deviceId,proto3" json:"deviceId,omitempty"` unknownFields protoimpl.UnknownFields - - Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - DeviceId string `protobuf:"bytes,3,opt,name=deviceId,proto3" json:"deviceId,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeleteDeviceResponse) Reset() { @@ -646,17 +637,16 @@ func (x *DeleteDeviceResponse) GetDeviceId() string { } type GetSubChannelsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + DeviceId string `protobuf:"bytes,1,opt,name=deviceId,proto3" json:"deviceId,omitempty"` + ChannelId string `protobuf:"bytes,2,opt,name=channelId,proto3" json:"channelId,omitempty"` + Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` + Count int32 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"` + Query string `protobuf:"bytes,5,opt,name=query,proto3" json:"query,omitempty"` + Online bool `protobuf:"varint,6,opt,name=online,proto3" json:"online,omitempty"` + ChannelType bool `protobuf:"varint,7,opt,name=channelType,proto3" json:"channelType,omitempty"` unknownFields protoimpl.UnknownFields - - DeviceId string `protobuf:"bytes,1,opt,name=deviceId,proto3" json:"deviceId,omitempty"` - ChannelId string `protobuf:"bytes,2,opt,name=channelId,proto3" json:"channelId,omitempty"` - Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` - Count int32 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"` - Query string `protobuf:"bytes,5,opt,name=query,proto3" json:"query,omitempty"` - Online bool `protobuf:"varint,6,opt,name=online,proto3" json:"online,omitempty"` - ChannelType bool `protobuf:"varint,7,opt,name=channelType,proto3" json:"channelType,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetSubChannelsRequest) Reset() { @@ -739,27 +729,26 @@ func (x *GetSubChannelsRequest) GetChannelType() bool { } type Channel struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + DeviceID string `protobuf:"bytes,1,opt,name=DeviceID,proto3" json:"DeviceID,omitempty"` + ParentID string `protobuf:"bytes,2,opt,name=ParentID,proto3" json:"ParentID,omitempty"` + Name string `protobuf:"bytes,3,opt,name=Name,proto3" json:"Name,omitempty"` + Manufacturer string `protobuf:"bytes,4,opt,name=Manufacturer,proto3" json:"Manufacturer,omitempty"` + Model string `protobuf:"bytes,5,opt,name=Model,proto3" json:"Model,omitempty"` + Owner string `protobuf:"bytes,6,opt,name=Owner,proto3" json:"Owner,omitempty"` + CivilCode string `protobuf:"bytes,7,opt,name=CivilCode,proto3" json:"CivilCode,omitempty"` + Address string `protobuf:"bytes,8,opt,name=Address,proto3" json:"Address,omitempty"` + Port int32 `protobuf:"varint,9,opt,name=Port,proto3" json:"Port,omitempty"` + Parental int32 `protobuf:"varint,10,opt,name=Parental,proto3" json:"Parental,omitempty"` + SafetyWay int32 `protobuf:"varint,11,opt,name=SafetyWay,proto3" json:"SafetyWay,omitempty"` + RegisterWay int32 `protobuf:"varint,12,opt,name=RegisterWay,proto3" json:"RegisterWay,omitempty"` + Secrecy int32 `protobuf:"varint,13,opt,name=Secrecy,proto3" json:"Secrecy,omitempty"` + Status string `protobuf:"bytes,14,opt,name=Status,proto3" json:"Status,omitempty"` + GpsTime *timestamppb.Timestamp `protobuf:"bytes,15,opt,name=gpsTime,proto3" json:"gpsTime,omitempty"` + Longitude string `protobuf:"bytes,16,opt,name=Longitude,proto3" json:"Longitude,omitempty"` + Latitude string `protobuf:"bytes,17,opt,name=Latitude,proto3" json:"Latitude,omitempty"` unknownFields protoimpl.UnknownFields - - DeviceID string `protobuf:"bytes,1,opt,name=DeviceID,proto3" json:"DeviceID,omitempty"` - ParentID string `protobuf:"bytes,2,opt,name=ParentID,proto3" json:"ParentID,omitempty"` - Name string `protobuf:"bytes,3,opt,name=Name,proto3" json:"Name,omitempty"` - Manufacturer string `protobuf:"bytes,4,opt,name=Manufacturer,proto3" json:"Manufacturer,omitempty"` - Model string `protobuf:"bytes,5,opt,name=Model,proto3" json:"Model,omitempty"` - Owner string `protobuf:"bytes,6,opt,name=Owner,proto3" json:"Owner,omitempty"` - CivilCode string `protobuf:"bytes,7,opt,name=CivilCode,proto3" json:"CivilCode,omitempty"` - Address string `protobuf:"bytes,8,opt,name=Address,proto3" json:"Address,omitempty"` - Port int32 `protobuf:"varint,9,opt,name=Port,proto3" json:"Port,omitempty"` - Parental int32 `protobuf:"varint,10,opt,name=Parental,proto3" json:"Parental,omitempty"` - SafetyWay int32 `protobuf:"varint,11,opt,name=SafetyWay,proto3" json:"SafetyWay,omitempty"` - RegisterWay int32 `protobuf:"varint,12,opt,name=RegisterWay,proto3" json:"RegisterWay,omitempty"` - Secrecy int32 `protobuf:"varint,13,opt,name=Secrecy,proto3" json:"Secrecy,omitempty"` - Status string `protobuf:"bytes,14,opt,name=Status,proto3" json:"Status,omitempty"` - GpsTime *timestamppb.Timestamp `protobuf:"bytes,15,opt,name=gpsTime,proto3" json:"gpsTime,omitempty"` - Longitude string `protobuf:"bytes,16,opt,name=Longitude,proto3" json:"Longitude,omitempty"` - Latitude string `protobuf:"bytes,17,opt,name=Latitude,proto3" json:"Latitude,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Channel) Reset() { @@ -912,22 +901,21 @@ func (x *Channel) GetLatitude() string { } type Device struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Manufacturer string `protobuf:"bytes,3,opt,name=manufacturer,proto3" json:"manufacturer,omitempty"` + Model string `protobuf:"bytes,4,opt,name=model,proto3" json:"model,omitempty"` + Owner string `protobuf:"bytes,5,opt,name=owner,proto3" json:"owner,omitempty"` + GpsTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=gpsTime,proto3" json:"gpsTime,omitempty"` + Longitude string `protobuf:"bytes,7,opt,name=longitude,proto3" json:"longitude,omitempty"` + Latitude string `protobuf:"bytes,8,opt,name=latitude,proto3" json:"latitude,omitempty"` + Status string `protobuf:"bytes,9,opt,name=status,proto3" json:"status,omitempty"` + RegisterTime *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=registerTime,proto3" json:"registerTime,omitempty"` + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=updateTime,proto3" json:"updateTime,omitempty"` + Channels []*Channel `protobuf:"bytes,12,rep,name=channels,proto3" json:"channels,omitempty"` unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Manufacturer string `protobuf:"bytes,3,opt,name=manufacturer,proto3" json:"manufacturer,omitempty"` - Model string `protobuf:"bytes,4,opt,name=model,proto3" json:"model,omitempty"` - Owner string `protobuf:"bytes,5,opt,name=owner,proto3" json:"owner,omitempty"` - GpsTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=gpsTime,proto3" json:"gpsTime,omitempty"` - Longitude string `protobuf:"bytes,7,opt,name=longitude,proto3" json:"longitude,omitempty"` - Latitude string `protobuf:"bytes,8,opt,name=latitude,proto3" json:"latitude,omitempty"` - Status string `protobuf:"bytes,9,opt,name=status,proto3" json:"status,omitempty"` - RegisterTime *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=registerTime,proto3" json:"registerTime,omitempty"` - UpdateTime *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=updateTime,proto3" json:"updateTime,omitempty"` - Channels []*Channel `protobuf:"bytes,12,rep,name=channels,proto3" json:"channels,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Device) Reset() { @@ -1045,13 +1033,12 @@ func (x *Device) GetChannels() []*Channel { } type ResponseList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + Data []*Device `protobuf:"bytes,3,rep,name=data,proto3" json:"data,omitempty"` unknownFields protoimpl.UnknownFields - - Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - Data []*Device `protobuf:"bytes,3,rep,name=data,proto3" json:"data,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ResponseList) Reset() { @@ -1107,12 +1094,11 @@ func (x *ResponseList) GetData() []*Device { // 新增的请求和响应消息定义 type ChangeAudioRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + ChannelId int32 `protobuf:"varint,1,opt,name=channelId,proto3" json:"channelId,omitempty"` + Audio bool `protobuf:"varint,2,opt,name=audio,proto3" json:"audio,omitempty"` unknownFields protoimpl.UnknownFields - - ChannelId int32 `protobuf:"varint,1,opt,name=channelId,proto3" json:"channelId,omitempty"` - Audio bool `protobuf:"varint,2,opt,name=audio,proto3" json:"audio,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ChangeAudioRequest) Reset() { @@ -1160,12 +1146,11 @@ func (x *ChangeAudioRequest) GetAudio() bool { } type UpdateTransportRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + DeviceId string `protobuf:"bytes,1,opt,name=deviceId,proto3" json:"deviceId,omitempty"` + StreamMode string `protobuf:"bytes,2,opt,name=streamMode,proto3" json:"streamMode,omitempty"` // UDP, TCP-ACTIVE, TCP-PASSIVE unknownFields protoimpl.UnknownFields - - DeviceId string `protobuf:"bytes,1,opt,name=deviceId,proto3" json:"deviceId,omitempty"` - StreamMode string `protobuf:"bytes,2,opt,name=streamMode,proto3" json:"streamMode,omitempty"` // UDP, TCP-ACTIVE, TCP-PASSIVE + sizeCache protoimpl.SizeCache } func (x *UpdateTransportRequest) Reset() { @@ -1213,11 +1198,10 @@ func (x *UpdateTransportRequest) GetStreamMode() string { } type GetDeviceStatusRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + DeviceId string `protobuf:"bytes,1,opt,name=deviceId,proto3" json:"deviceId,omitempty"` unknownFields protoimpl.UnknownFields - - DeviceId string `protobuf:"bytes,1,opt,name=deviceId,proto3" json:"deviceId,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetDeviceStatusRequest) Reset() { @@ -1258,13 +1242,12 @@ func (x *GetDeviceStatusRequest) GetDeviceId() string { } type DeviceStatusResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` unknownFields protoimpl.UnknownFields - - Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeviceStatusResponse) Reset() { @@ -1319,17 +1302,16 @@ func (x *DeviceStatusResponse) GetStatus() string { } type GetDeviceAlarmRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + DeviceId string `protobuf:"bytes,1,opt,name=deviceId,proto3" json:"deviceId,omitempty"` + StartPriority string `protobuf:"bytes,2,opt,name=startPriority,proto3" json:"startPriority,omitempty"` + EndPriority string `protobuf:"bytes,3,opt,name=endPriority,proto3" json:"endPriority,omitempty"` + AlarmMethod string `protobuf:"bytes,4,opt,name=alarmMethod,proto3" json:"alarmMethod,omitempty"` + AlarmType string `protobuf:"bytes,5,opt,name=alarmType,proto3" json:"alarmType,omitempty"` + StartTime string `protobuf:"bytes,6,opt,name=startTime,proto3" json:"startTime,omitempty"` + EndTime string `protobuf:"bytes,7,opt,name=endTime,proto3" json:"endTime,omitempty"` unknownFields protoimpl.UnknownFields - - DeviceId string `protobuf:"bytes,1,opt,name=deviceId,proto3" json:"deviceId,omitempty"` - StartPriority string `protobuf:"bytes,2,opt,name=startPriority,proto3" json:"startPriority,omitempty"` - EndPriority string `protobuf:"bytes,3,opt,name=endPriority,proto3" json:"endPriority,omitempty"` - AlarmMethod string `protobuf:"bytes,4,opt,name=alarmMethod,proto3" json:"alarmMethod,omitempty"` - AlarmType string `protobuf:"bytes,5,opt,name=alarmType,proto3" json:"alarmType,omitempty"` - StartTime string `protobuf:"bytes,6,opt,name=startTime,proto3" json:"startTime,omitempty"` - EndTime string `protobuf:"bytes,7,opt,name=endTime,proto3" json:"endTime,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetDeviceAlarmRequest) Reset() { @@ -1412,13 +1394,12 @@ func (x *GetDeviceAlarmRequest) GetEndTime() string { } type DeviceAlarmResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + Alarms []*AlarmInfo `protobuf:"bytes,3,rep,name=alarms,proto3" json:"alarms,omitempty"` unknownFields protoimpl.UnknownFields - - Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - Alarms []*AlarmInfo `protobuf:"bytes,3,rep,name=alarms,proto3" json:"alarms,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeviceAlarmResponse) Reset() { @@ -1473,15 +1454,14 @@ func (x *DeviceAlarmResponse) GetAlarms() []*AlarmInfo { } type AlarmInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DeviceId string `protobuf:"bytes,1,opt,name=deviceId,proto3" json:"deviceId,omitempty"` - AlarmPriority string `protobuf:"bytes,2,opt,name=alarmPriority,proto3" json:"alarmPriority,omitempty"` - AlarmMethod string `protobuf:"bytes,3,opt,name=alarmMethod,proto3" json:"alarmMethod,omitempty"` - AlarmTime string `protobuf:"bytes,4,opt,name=alarmTime,proto3" json:"alarmTime,omitempty"` - AlarmDescription string `protobuf:"bytes,5,opt,name=alarmDescription,proto3" json:"alarmDescription,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + DeviceId string `protobuf:"bytes,1,opt,name=deviceId,proto3" json:"deviceId,omitempty"` + AlarmPriority string `protobuf:"bytes,2,opt,name=alarmPriority,proto3" json:"alarmPriority,omitempty"` + AlarmMethod string `protobuf:"bytes,3,opt,name=alarmMethod,proto3" json:"alarmMethod,omitempty"` + AlarmTime string `protobuf:"bytes,4,opt,name=alarmTime,proto3" json:"alarmTime,omitempty"` + AlarmDescription string `protobuf:"bytes,5,opt,name=alarmDescription,proto3" json:"alarmDescription,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *AlarmInfo) Reset() { @@ -1550,11 +1530,10 @@ func (x *AlarmInfo) GetAlarmDescription() string { } type GetSyncStatusRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + DeviceId string `protobuf:"bytes,1,opt,name=deviceId,proto3" json:"deviceId,omitempty"` unknownFields protoimpl.UnknownFields - - DeviceId string `protobuf:"bytes,1,opt,name=deviceId,proto3" json:"deviceId,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetSyncStatusRequest) Reset() { @@ -1595,11 +1574,10 @@ func (x *GetSyncStatusRequest) GetDeviceId() string { } type GetSubscribeInfoRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + DeviceId string `protobuf:"bytes,1,opt,name=deviceId,proto3" json:"deviceId,omitempty"` unknownFields protoimpl.UnknownFields - - DeviceId string `protobuf:"bytes,1,opt,name=deviceId,proto3" json:"deviceId,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetSubscribeInfoRequest) Reset() { @@ -1640,13 +1618,12 @@ func (x *GetSubscribeInfoRequest) GetDeviceId() string { } type SubscribeInfoResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + DialogState map[string]int32 `protobuf:"bytes,3,rep,name=dialogState,proto3" json:"dialogState,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` unknownFields protoimpl.UnknownFields - - Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - DialogState map[string]int32 `protobuf:"bytes,3,rep,name=dialogState,proto3" json:"dialogState,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + sizeCache protoimpl.SizeCache } func (x *SubscribeInfoResponse) Reset() { @@ -1701,13 +1678,12 @@ func (x *SubscribeInfoResponse) GetDialogState() map[string]int32 { } type GetSnapRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + DeviceId string `protobuf:"bytes,1,opt,name=deviceId,proto3" json:"deviceId,omitempty"` + ChannelId string `protobuf:"bytes,2,opt,name=channelId,proto3" json:"channelId,omitempty"` + Mark string `protobuf:"bytes,3,opt,name=mark,proto3" json:"mark,omitempty"` unknownFields protoimpl.UnknownFields - - DeviceId string `protobuf:"bytes,1,opt,name=deviceId,proto3" json:"deviceId,omitempty"` - ChannelId string `protobuf:"bytes,2,opt,name=channelId,proto3" json:"channelId,omitempty"` - Mark string `protobuf:"bytes,3,opt,name=mark,proto3" json:"mark,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetSnapRequest) Reset() { @@ -1762,13 +1738,12 @@ func (x *GetSnapRequest) GetMark() string { } type SnapResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + ImageData []byte `protobuf:"bytes,3,opt,name=imageData,proto3" json:"imageData,omitempty"` unknownFields protoimpl.UnknownFields - - Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - ImageData []byte `protobuf:"bytes,3,opt,name=imageData,proto3" json:"imageData,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SnapResponse) Reset() { @@ -1823,11 +1798,10 @@ func (x *SnapResponse) GetImageData() []byte { } type GetRawChannelRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` unknownFields protoimpl.UnknownFields - - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetRawChannelRequest) Reset() { @@ -1868,13 +1842,12 @@ func (x *GetRawChannelRequest) GetId() int32 { } type DeviceResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + Data *Device `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` unknownFields protoimpl.UnknownFields - - Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - Data *Device `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeviceResponse) Reset() { @@ -1929,13 +1902,12 @@ func (x *DeviceResponse) GetData() *Device { } type ChannelResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + Data *Channel `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` unknownFields protoimpl.UnknownFields - - Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - Data *Channel `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ChannelResponse) Reset() { @@ -1990,12 +1962,11 @@ func (x *ChannelResponse) GetData() *Channel { } type PlayRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + DeviceId string `protobuf:"bytes,1,opt,name=deviceId,proto3" json:"deviceId,omitempty"` + ChannelId string `protobuf:"bytes,2,opt,name=channelId,proto3" json:"channelId,omitempty"` unknownFields protoimpl.UnknownFields - - DeviceId string `protobuf:"bytes,1,opt,name=deviceId,proto3" json:"deviceId,omitempty"` - ChannelId string `protobuf:"bytes,2,opt,name=channelId,proto3" json:"channelId,omitempty"` + sizeCache protoimpl.SizeCache } func (x *PlayRequest) Reset() { @@ -2043,13 +2014,12 @@ func (x *PlayRequest) GetChannelId() string { } type PlayResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + StreamInfo *StreamInfo `protobuf:"bytes,3,opt,name=stream_info,json=streamInfo,proto3" json:"stream_info,omitempty"` unknownFields protoimpl.UnknownFields - - Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - StreamInfo *StreamInfo `protobuf:"bytes,3,opt,name=stream_info,json=streamInfo,proto3" json:"stream_info,omitempty"` + sizeCache protoimpl.SizeCache } func (x *PlayResponse) Reset() { @@ -2104,15 +2074,14 @@ func (x *PlayResponse) GetStreamInfo() *StreamInfo { } type StreamInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Stream string `protobuf:"bytes,1,opt,name=stream,proto3" json:"stream,omitempty"` + App string `protobuf:"bytes,2,opt,name=app,proto3" json:"app,omitempty"` + Ip string `protobuf:"bytes,3,opt,name=ip,proto3" json:"ip,omitempty"` + Port int32 `protobuf:"varint,4,opt,name=port,proto3" json:"port,omitempty"` + Ssrc string `protobuf:"bytes,5,opt,name=ssrc,proto3" json:"ssrc,omitempty"` unknownFields protoimpl.UnknownFields - - Stream string `protobuf:"bytes,1,opt,name=stream,proto3" json:"stream,omitempty"` - App string `protobuf:"bytes,2,opt,name=app,proto3" json:"app,omitempty"` - Ip string `protobuf:"bytes,3,opt,name=ip,proto3" json:"ip,omitempty"` - Port int32 `protobuf:"varint,4,opt,name=port,proto3" json:"port,omitempty"` - Ssrc string `protobuf:"bytes,5,opt,name=ssrc,proto3" json:"ssrc,omitempty"` + sizeCache protoimpl.SizeCache } func (x *StreamInfo) Reset() { @@ -2181,12 +2150,11 @@ func (x *StreamInfo) GetSsrc() string { } type ConvertStopRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + MediaServerId string `protobuf:"bytes,2,opt,name=mediaServerId,proto3" json:"mediaServerId,omitempty"` unknownFields protoimpl.UnknownFields - - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - MediaServerId string `protobuf:"bytes,2,opt,name=mediaServerId,proto3" json:"mediaServerId,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ConvertStopRequest) Reset() { @@ -2234,14 +2202,13 @@ func (x *ConvertStopRequest) GetMediaServerId() string { } type BroadcastRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + DeviceId string `protobuf:"bytes,1,opt,name=deviceId,proto3" json:"deviceId,omitempty"` + ChannelId string `protobuf:"bytes,2,opt,name=channelId,proto3" json:"channelId,omitempty"` + Timeout int32 `protobuf:"varint,3,opt,name=timeout,proto3" json:"timeout,omitempty"` + BroadcastMode bool `protobuf:"varint,4,opt,name=broadcastMode,proto3" json:"broadcastMode,omitempty"` unknownFields protoimpl.UnknownFields - - DeviceId string `protobuf:"bytes,1,opt,name=deviceId,proto3" json:"deviceId,omitempty"` - ChannelId string `protobuf:"bytes,2,opt,name=channelId,proto3" json:"channelId,omitempty"` - Timeout int32 `protobuf:"varint,3,opt,name=timeout,proto3" json:"timeout,omitempty"` - BroadcastMode bool `protobuf:"varint,4,opt,name=broadcastMode,proto3" json:"broadcastMode,omitempty"` + sizeCache protoimpl.SizeCache } func (x *BroadcastRequest) Reset() { @@ -2303,14 +2270,13 @@ func (x *BroadcastRequest) GetBroadcastMode() bool { } type BroadcastResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + StreamId string `protobuf:"bytes,3,opt,name=streamId,proto3" json:"streamId,omitempty"` + Url string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"` unknownFields protoimpl.UnknownFields - - Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - StreamId string `protobuf:"bytes,3,opt,name=streamId,proto3" json:"streamId,omitempty"` - Url string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"` + sizeCache protoimpl.SizeCache } func (x *BroadcastResponse) Reset() { @@ -2372,14 +2338,13 @@ func (x *BroadcastResponse) GetUrl() string { } type SSRCInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + DeviceId string `protobuf:"bytes,1,opt,name=deviceId,proto3" json:"deviceId,omitempty"` + ChannelId string `protobuf:"bytes,2,opt,name=channelId,proto3" json:"channelId,omitempty"` + Ssrc string `protobuf:"bytes,3,opt,name=ssrc,proto3" json:"ssrc,omitempty"` + StreamId string `protobuf:"bytes,4,opt,name=streamId,proto3" json:"streamId,omitempty"` unknownFields protoimpl.UnknownFields - - DeviceId string `protobuf:"bytes,1,opt,name=deviceId,proto3" json:"deviceId,omitempty"` - ChannelId string `protobuf:"bytes,2,opt,name=channelId,proto3" json:"channelId,omitempty"` - Ssrc string `protobuf:"bytes,3,opt,name=ssrc,proto3" json:"ssrc,omitempty"` - StreamId string `protobuf:"bytes,4,opt,name=streamId,proto3" json:"streamId,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SSRCInfo) Reset() { @@ -2441,14 +2406,13 @@ func (x *SSRCInfo) GetStreamId() string { } type SSRCListResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + Data []*SSRCInfo `protobuf:"bytes,3,rep,name=data,proto3" json:"data,omitempty"` + Count int32 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"` unknownFields protoimpl.UnknownFields - - Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - Data []*SSRCInfo `protobuf:"bytes,3,rep,name=data,proto3" json:"data,omitempty"` - Count int32 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SSRCListResponse) Reset() { @@ -2509,9 +2473,639 @@ func (x *SSRCListResponse) GetCount() int32 { return 0 } +// Platform消息定义 +type Platform struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // ID(数据库中) + Enable bool `protobuf:"varint,2,opt,name=enable,proto3" json:"enable,omitempty"` // 是否启用 + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // 名称 + ServerGBId string `protobuf:"bytes,4,opt,name=serverGBId,proto3" json:"serverGBId,omitempty"` // SIP服务国标编码 + ServerGBDomain string `protobuf:"bytes,5,opt,name=serverGBDomain,proto3" json:"serverGBDomain,omitempty"` // SIP服务国标域 + ServerIp string `protobuf:"bytes,6,opt,name=serverIp,proto3" json:"serverIp,omitempty"` // SIP服务IP + ServerPort int32 `protobuf:"varint,7,opt,name=serverPort,proto3" json:"serverPort,omitempty"` // SIP服务端口 + DeviceGBId string `protobuf:"bytes,8,opt,name=deviceGBId,proto3" json:"deviceGBId,omitempty"` // 设备国标编号 + DeviceIp string `protobuf:"bytes,9,opt,name=deviceIp,proto3" json:"deviceIp,omitempty"` // 设备ip + DevicePort int32 `protobuf:"varint,10,opt,name=devicePort,proto3" json:"devicePort,omitempty"` // 设备端口 + Username string `protobuf:"bytes,11,opt,name=username,proto3" json:"username,omitempty"` // SIP认证用户名 + Password string `protobuf:"bytes,12,opt,name=password,proto3" json:"password,omitempty"` // SIP认证密码 + Expires int32 `protobuf:"varint,13,opt,name=expires,proto3" json:"expires,omitempty"` // 注册周期(秒) + KeepTimeout int32 `protobuf:"varint,14,opt,name=keepTimeout,proto3" json:"keepTimeout,omitempty"` // 心跳周期(秒) + Transport string `protobuf:"bytes,15,opt,name=transport,proto3" json:"transport,omitempty"` // 传输协议 + CharacterSet string `protobuf:"bytes,16,opt,name=characterSet,proto3" json:"characterSet,omitempty"` // 字符集 + Ptz bool `protobuf:"varint,17,opt,name=ptz,proto3" json:"ptz,omitempty"` // 允许云台控制 + Rtcp bool `protobuf:"varint,18,opt,name=rtcp,proto3" json:"rtcp,omitempty"` // RTCP流保活 + Status bool `protobuf:"varint,19,opt,name=status,proto3" json:"status,omitempty"` // 在线状态 + ChannelCount int32 `protobuf:"varint,20,opt,name=channelCount,proto3" json:"channelCount,omitempty"` // 通道数量 + CatalogSubscribe bool `protobuf:"varint,21,opt,name=catalogSubscribe,proto3" json:"catalogSubscribe,omitempty"` // 已被订阅目录信息 + AlarmSubscribe bool `protobuf:"varint,22,opt,name=alarmSubscribe,proto3" json:"alarmSubscribe,omitempty"` // 已被订阅报警信息 + MobilePositionSubscribe bool `protobuf:"varint,23,opt,name=mobilePositionSubscribe,proto3" json:"mobilePositionSubscribe,omitempty"` // 已被订阅移动位置信息 + CatalogGroup int32 `protobuf:"varint,24,opt,name=catalogGroup,proto3" json:"catalogGroup,omitempty"` // 目录分组大小 + UpdateTime string `protobuf:"bytes,25,opt,name=updateTime,proto3" json:"updateTime,omitempty"` // 最后更新时间 + CreateTime string `protobuf:"bytes,26,opt,name=createTime,proto3" json:"createTime,omitempty"` // 创建时间 + AsMessageChannel bool `protobuf:"varint,27,opt,name=asMessageChannel,proto3" json:"asMessageChannel,omitempty"` // 是否作为消息通道 + SendStreamIp string `protobuf:"bytes,28,opt,name=sendStreamIp,proto3" json:"sendStreamIp,omitempty"` // 点播回复200OK使用的IP + AutoPushChannel bool `protobuf:"varint,29,opt,name=autoPushChannel,proto3" json:"autoPushChannel,omitempty"` // 是否自动推送通道变化 + CatalogWithPlatform int32 `protobuf:"varint,30,opt,name=catalogWithPlatform,proto3" json:"catalogWithPlatform,omitempty"` // 目录信息包含平台信息 + CatalogWithGroup int32 `protobuf:"varint,31,opt,name=catalogWithGroup,proto3" json:"catalogWithGroup,omitempty"` // 目录信息包含分组信息 + CatalogWithRegion int32 `protobuf:"varint,32,opt,name=catalogWithRegion,proto3" json:"catalogWithRegion,omitempty"` // 目录信息包含行政区划 + CivilCode string `protobuf:"bytes,33,opt,name=civilCode,proto3" json:"civilCode,omitempty"` // 行政区划代码 + Manufacturer string `protobuf:"bytes,34,opt,name=manufacturer,proto3" json:"manufacturer,omitempty"` // 平台厂商 + Model string `protobuf:"bytes,35,opt,name=model,proto3" json:"model,omitempty"` // 平台型号 + Address string `protobuf:"bytes,36,opt,name=address,proto3" json:"address,omitempty"` // 平台安装地址 + RegisterWay int32 `protobuf:"varint,37,opt,name=registerWay,proto3" json:"registerWay,omitempty"` // 注册方式 + Secrecy int32 `protobuf:"varint,38,opt,name=secrecy,proto3" json:"secrecy,omitempty"` // 保密属性 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Platform) Reset() { + *x = Platform{} + mi := &file_gb28181_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Platform) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Platform) ProtoMessage() {} + +func (x *Platform) ProtoReflect() protoreflect.Message { + mi := &file_gb28181_proto_msgTypes[37] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Platform.ProtoReflect.Descriptor instead. +func (*Platform) Descriptor() ([]byte, []int) { + return file_gb28181_proto_rawDescGZIP(), []int{37} +} + +func (x *Platform) GetId() int32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *Platform) GetEnable() bool { + if x != nil { + return x.Enable + } + return false +} + +func (x *Platform) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Platform) GetServerGBId() string { + if x != nil { + return x.ServerGBId + } + return "" +} + +func (x *Platform) GetServerGBDomain() string { + if x != nil { + return x.ServerGBDomain + } + return "" +} + +func (x *Platform) GetServerIp() string { + if x != nil { + return x.ServerIp + } + return "" +} + +func (x *Platform) GetServerPort() int32 { + if x != nil { + return x.ServerPort + } + return 0 +} + +func (x *Platform) GetDeviceGBId() string { + if x != nil { + return x.DeviceGBId + } + return "" +} + +func (x *Platform) GetDeviceIp() string { + if x != nil { + return x.DeviceIp + } + return "" +} + +func (x *Platform) GetDevicePort() int32 { + if x != nil { + return x.DevicePort + } + return 0 +} + +func (x *Platform) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *Platform) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +func (x *Platform) GetExpires() int32 { + if x != nil { + return x.Expires + } + return 0 +} + +func (x *Platform) GetKeepTimeout() int32 { + if x != nil { + return x.KeepTimeout + } + return 0 +} + +func (x *Platform) GetTransport() string { + if x != nil { + return x.Transport + } + return "" +} + +func (x *Platform) GetCharacterSet() string { + if x != nil { + return x.CharacterSet + } + return "" +} + +func (x *Platform) GetPtz() bool { + if x != nil { + return x.Ptz + } + return false +} + +func (x *Platform) GetRtcp() bool { + if x != nil { + return x.Rtcp + } + return false +} + +func (x *Platform) GetStatus() bool { + if x != nil { + return x.Status + } + return false +} + +func (x *Platform) GetChannelCount() int32 { + if x != nil { + return x.ChannelCount + } + return 0 +} + +func (x *Platform) GetCatalogSubscribe() bool { + if x != nil { + return x.CatalogSubscribe + } + return false +} + +func (x *Platform) GetAlarmSubscribe() bool { + if x != nil { + return x.AlarmSubscribe + } + return false +} + +func (x *Platform) GetMobilePositionSubscribe() bool { + if x != nil { + return x.MobilePositionSubscribe + } + return false +} + +func (x *Platform) GetCatalogGroup() int32 { + if x != nil { + return x.CatalogGroup + } + return 0 +} + +func (x *Platform) GetUpdateTime() string { + if x != nil { + return x.UpdateTime + } + return "" +} + +func (x *Platform) GetCreateTime() string { + if x != nil { + return x.CreateTime + } + return "" +} + +func (x *Platform) GetAsMessageChannel() bool { + if x != nil { + return x.AsMessageChannel + } + return false +} + +func (x *Platform) GetSendStreamIp() string { + if x != nil { + return x.SendStreamIp + } + return "" +} + +func (x *Platform) GetAutoPushChannel() bool { + if x != nil { + return x.AutoPushChannel + } + return false +} + +func (x *Platform) GetCatalogWithPlatform() int32 { + if x != nil { + return x.CatalogWithPlatform + } + return 0 +} + +func (x *Platform) GetCatalogWithGroup() int32 { + if x != nil { + return x.CatalogWithGroup + } + return 0 +} + +func (x *Platform) GetCatalogWithRegion() int32 { + if x != nil { + return x.CatalogWithRegion + } + return 0 +} + +func (x *Platform) GetCivilCode() string { + if x != nil { + return x.CivilCode + } + return "" +} + +func (x *Platform) GetManufacturer() string { + if x != nil { + return x.Manufacturer + } + return "" +} + +func (x *Platform) GetModel() string { + if x != nil { + return x.Model + } + return "" +} + +func (x *Platform) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *Platform) GetRegisterWay() int32 { + if x != nil { + return x.RegisterWay + } + return 0 +} + +func (x *Platform) GetSecrecy() int32 { + if x != nil { + return x.Secrecy + } + return 0 +} + +// 获取平台请求 +type GetPlatformRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetPlatformRequest) Reset() { + *x = GetPlatformRequest{} + mi := &file_gb28181_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetPlatformRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPlatformRequest) ProtoMessage() {} + +func (x *GetPlatformRequest) ProtoReflect() protoreflect.Message { + mi := &file_gb28181_proto_msgTypes[38] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPlatformRequest.ProtoReflect.Descriptor instead. +func (*GetPlatformRequest) Descriptor() ([]byte, []int) { + return file_gb28181_proto_rawDescGZIP(), []int{38} +} + +func (x *GetPlatformRequest) GetId() int32 { + if x != nil { + return x.Id + } + return 0 +} + +// 删除平台请求 +type DeletePlatformRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeletePlatformRequest) Reset() { + *x = DeletePlatformRequest{} + mi := &file_gb28181_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeletePlatformRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeletePlatformRequest) ProtoMessage() {} + +func (x *DeletePlatformRequest) ProtoReflect() protoreflect.Message { + mi := &file_gb28181_proto_msgTypes[39] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeletePlatformRequest.ProtoReflect.Descriptor instead. +func (*DeletePlatformRequest) Descriptor() ([]byte, []int) { + return file_gb28181_proto_rawDescGZIP(), []int{39} +} + +func (x *DeletePlatformRequest) GetId() int32 { + if x != nil { + return x.Id + } + return 0 +} + +// 平台列表请求 +type ListPlatformsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` + Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` + Query string `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"` + Status bool `protobuf:"varint,4,opt,name=status,proto3" json:"status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListPlatformsRequest) Reset() { + *x = ListPlatformsRequest{} + mi := &file_gb28181_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListPlatformsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPlatformsRequest) ProtoMessage() {} + +func (x *ListPlatformsRequest) ProtoReflect() protoreflect.Message { + mi := &file_gb28181_proto_msgTypes[40] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPlatformsRequest.ProtoReflect.Descriptor instead. +func (*ListPlatformsRequest) Descriptor() ([]byte, []int) { + return file_gb28181_proto_rawDescGZIP(), []int{40} +} + +func (x *ListPlatformsRequest) GetPage() int32 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *ListPlatformsRequest) GetCount() int32 { + if x != nil { + return x.Count + } + return 0 +} + +func (x *ListPlatformsRequest) GetQuery() string { + if x != nil { + return x.Query + } + return "" +} + +func (x *ListPlatformsRequest) GetStatus() bool { + if x != nil { + return x.Status + } + return false +} + +// 平台响应 +type PlatformResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + Data *Platform `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlatformResponse) Reset() { + *x = PlatformResponse{} + mi := &file_gb28181_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlatformResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlatformResponse) ProtoMessage() {} + +func (x *PlatformResponse) ProtoReflect() protoreflect.Message { + mi := &file_gb28181_proto_msgTypes[41] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlatformResponse.ProtoReflect.Descriptor instead. +func (*PlatformResponse) Descriptor() ([]byte, []int) { + return file_gb28181_proto_rawDescGZIP(), []int{41} +} + +func (x *PlatformResponse) GetCode() int32 { + if x != nil { + return x.Code + } + return 0 +} + +func (x *PlatformResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *PlatformResponse) GetData() *Platform { + if x != nil { + return x.Data + } + return nil +} + +// 平台分页信息 +type PlatformsPageInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + Total int32 `protobuf:"varint,3,opt,name=total,proto3" json:"total,omitempty"` + List []*Platform `protobuf:"bytes,4,rep,name=list,proto3" json:"list,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlatformsPageInfo) Reset() { + *x = PlatformsPageInfo{} + mi := &file_gb28181_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlatformsPageInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlatformsPageInfo) ProtoMessage() {} + +func (x *PlatformsPageInfo) ProtoReflect() protoreflect.Message { + mi := &file_gb28181_proto_msgTypes[42] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlatformsPageInfo.ProtoReflect.Descriptor instead. +func (*PlatformsPageInfo) Descriptor() ([]byte, []int) { + return file_gb28181_proto_rawDescGZIP(), []int{42} +} + +func (x *PlatformsPageInfo) GetCode() int32 { + if x != nil { + return x.Code + } + return 0 +} + +func (x *PlatformsPageInfo) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *PlatformsPageInfo) GetTotal() int32 { + if x != nil { + return x.Total + } + return 0 +} + +func (x *PlatformsPageInfo) GetList() []*Platform { + if x != nil { + return x.List + } + return nil +} + var File_gb28181_proto protoreflect.FileDescriptor -var file_gb28181_proto_rawDesc = []byte{ +var file_gb28181_proto_rawDesc = string([]byte{ 0x0a, 0x0d, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, @@ -2815,206 +3409,346 @@ var file_gb28181_proto_rawDesc = []byte{ 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x53, 0x53, 0x52, 0x43, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0xd2, 0x16, 0x0a, 0x03, 0x61, 0x70, 0x69, - 0x12, 0x53, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x1a, 0x18, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x13, 0x12, 0x11, 0x2f, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x6e, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, - 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1a, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x44, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x49, 0x64, 0x7d, 0x12, 0x66, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x12, 0x1d, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, - 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, - 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, - 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, - 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x7d, 0x0a, - 0x0b, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x12, 0x1e, 0x2e, 0x67, - 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, - 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, - 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, - 0x6c, 0x73, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x49, 0x64, 0x7d, 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x12, 0x71, 0x0a, 0x0a, - 0x53, 0x79, 0x6e, 0x63, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x62, 0x32, - 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x62, 0x32, 0x38, - 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x67, 0x62, 0x32, 0x38, - 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, - 0x7b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x7d, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x12, - 0x81, 0x01, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x1f, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x2a, 0x26, 0x2f, 0x67, 0x62, - 0x32, 0x38, 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x7d, 0x2f, 0x64, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x12, 0x94, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x43, 0x68, - 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x12, 0x21, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, - 0x70, 0x72, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, - 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x62, 0x32, 0x38, - 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x50, - 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x12, - 0x39, 0x2f, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x75, - 0x62, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x49, 0x64, 0x7d, 0x2f, 0x7b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, - 0x7d, 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x12, 0x6e, 0x0a, 0x0b, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x12, 0x1e, 0x2e, 0x67, 0x62, 0x32, 0x38, - 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x41, 0x75, 0x64, - 0x69, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x67, 0x62, 0x32, 0x38, - 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, - 0x2f, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x68, 0x61, - 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x12, 0x90, 0x01, 0x0a, 0x21, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x13, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x43, 0x68, - 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x18, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, - 0x72, 0x6f, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x3a, 0x01, 0x2a, 0x22, 0x31, 0x2f, 0x67, 0x62, 0x32, - 0x38, 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, - 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x85, 0x01, - 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, - 0x74, 0x12, 0x22, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x36, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x22, 0x2e, 0x2f, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x7b, 0x64, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x7d, 0x2f, 0x7b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x4d, 0x6f, 0x64, 0x65, 0x7d, 0x12, 0x5b, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x12, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, - 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x22, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22, 0x17, 0x2f, 0x67, 0x62, 0x32, 0x38, - 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, - 0x64, 0x64, 0x12, 0x61, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x12, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, - 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x25, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x67, 0x62, 0x32, 0x38, - 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x87, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x22, 0x2e, 0x67, 0x62, 0x32, 0x38, + 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xe4, 0x09, 0x0a, 0x08, 0x50, 0x6c, 0x61, + 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x42, 0x49, 0x64, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x42, 0x49, + 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x42, 0x44, 0x6f, 0x6d, + 0x61, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x47, 0x42, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x49, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x49, 0x70, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, + 0x6f, 0x72, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x47, + 0x42, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x47, 0x42, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, + 0x70, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, + 0x70, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, + 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, + 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x70, + 0x69, 0x72, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x65, 0x78, 0x70, 0x69, + 0x72, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x6b, 0x65, 0x65, 0x70, 0x54, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6b, 0x65, 0x65, 0x70, 0x54, 0x69, + 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, + 0x72, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, + 0x6f, 0x72, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, + 0x53, 0x65, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x68, 0x61, 0x72, 0x61, + 0x63, 0x74, 0x65, 0x72, 0x53, 0x65, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x74, 0x7a, 0x18, 0x11, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x70, 0x74, 0x7a, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x74, 0x63, + 0x70, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x72, 0x74, 0x63, 0x70, 0x12, 0x16, 0x0a, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x14, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x63, 0x68, 0x61, + 0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x63, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x18, 0x15, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x10, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x53, 0x75, 0x62, 0x73, + 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x6c, 0x61, 0x72, 0x6d, 0x53, 0x75, + 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x18, 0x16, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x61, + 0x6c, 0x61, 0x72, 0x6d, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x38, 0x0a, + 0x17, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, + 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x75, + 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x18, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x63, + 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1e, 0x0a, 0x0a, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x61, + 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, + 0x1b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x61, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x65, 0x6e, 0x64, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x70, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, + 0x65, 0x6e, 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x70, 0x12, 0x28, 0x0a, 0x0f, 0x61, + 0x75, 0x74, 0x6f, 0x50, 0x75, 0x73, 0x68, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x1d, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x61, 0x75, 0x74, 0x6f, 0x50, 0x75, 0x73, 0x68, 0x43, 0x68, + 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x30, 0x0a, 0x13, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x57, 0x69, 0x74, 0x68, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x1e, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x13, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x57, 0x69, 0x74, 0x68, 0x50, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x2a, 0x0a, 0x10, 0x63, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x57, 0x69, 0x74, 0x68, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x1f, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x10, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x57, 0x69, 0x74, 0x68, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x12, 0x2c, 0x0a, 0x11, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x57, 0x69, + 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x20, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, + 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x57, 0x69, 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x6f, + 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x69, 0x76, 0x69, 0x6c, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x21, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x69, 0x76, 0x69, 0x6c, 0x43, 0x6f, 0x64, 0x65, 0x12, + 0x22, 0x0a, 0x0c, 0x6d, 0x61, 0x6e, 0x75, 0x66, 0x61, 0x63, 0x74, 0x75, 0x72, 0x65, 0x72, 0x18, + 0x22, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x6e, 0x75, 0x66, 0x61, 0x63, 0x74, 0x75, + 0x72, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x23, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x24, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x57, + 0x61, 0x79, 0x18, 0x25, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x57, 0x61, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x63, 0x79, + 0x18, 0x26, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x63, 0x79, 0x22, + 0x24, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x02, 0x69, 0x64, 0x22, 0x27, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x22, 0x6e, + 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x6a, + 0x0a, 0x10, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x12, 0x28, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x50, 0x6c, 0x61, 0x74, + 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x81, 0x01, 0x0a, 0x11, 0x50, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, + 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x28, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, + 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x32, 0xfc, + 0x1a, 0x0a, 0x03, 0x61, 0x70, 0x69, 0x12, 0x53, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x18, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, + 0x70, 0x72, 0x6f, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4c, 0x69, 0x73, 0x74, + 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x67, 0x62, 0x32, 0x38, 0x31, + 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x6e, 0x0a, 0x09, 0x47, + 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, + 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, + 0x70, 0x72, 0x6f, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x67, 0x62, 0x32, + 0x38, 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, + 0x2f, 0x7b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x7d, 0x12, 0x66, 0x0a, 0x0a, 0x47, + 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x1d, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, - 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, - 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x64, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x7d, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x7b, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x41, 0x6c, 0x61, 0x72, - 0x6d, 0x12, 0x21, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x47, - 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x41, 0x6c, 0x61, 0x72, 0x6d, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, - 0x6f, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x41, 0x6c, 0x61, 0x72, 0x6d, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, - 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6c, 0x61, 0x72, - 0x6d, 0x2f, 0x7b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x7d, 0x12, 0x76, 0x0a, 0x0d, - 0x47, 0x65, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x2e, - 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x79, - 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, + 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x50, 0x61, 0x67, + 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, + 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x12, 0x7d, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, + 0x6c, 0x73, 0x12, 0x1e, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, + 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, + 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x67, 0x62, 0x32, 0x38, 0x31, + 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x7b, + 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x7d, 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, + 0x6c, 0x73, 0x12, 0x71, 0x0a, 0x0a, 0x53, 0x79, 0x6e, 0x63, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x1d, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x53, 0x79, + 0x6e, 0x63, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x53, 0x79, 0x6e, - 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x12, - 0x23, 0x2f, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x7b, 0x64, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x7d, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x8a, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x73, - 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x23, 0x2e, 0x67, 0x62, 0x32, 0x38, - 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, - 0x69, 0x62, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, - 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x53, 0x75, 0x62, 0x73, - 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x67, 0x62, 0x32, 0x38, - 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x7b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, - 0x64, 0x7d, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x5f, 0x69, 0x6e, 0x66, - 0x6f, 0x12, 0x71, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x12, 0x1a, 0x2e, 0x67, - 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x61, - 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, - 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x67, 0x62, 0x32, - 0x38, 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6e, 0x61, 0x70, 0x2f, 0x7b, 0x64, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x7d, 0x2f, 0x7b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, - 0x6c, 0x49, 0x64, 0x7d, 0x12, 0x76, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x72, 0x74, 0x50, 0x6c, 0x61, - 0x79, 0x12, 0x17, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x50, - 0x6c, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x67, 0x62, 0x32, - 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x12, 0x2e, 0x2f, 0x67, - 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x6c, 0x61, 0x79, 0x2f, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x2f, 0x7b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x7d, - 0x2f, 0x7b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x7d, 0x12, 0x74, 0x0a, 0x08, - 0x53, 0x74, 0x6f, 0x70, 0x50, 0x6c, 0x61, 0x79, 0x12, 0x17, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, - 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x18, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x50, - 0x6c, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x2f, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x70, 0x6c, 0x61, 0x79, 0x2f, 0x73, 0x74, 0x6f, 0x70, 0x2f, 0x7b, 0x64, 0x65, 0x76, + 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, + 0x24, 0x2f, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x7d, + 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x81, 0x01, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, + 0x70, 0x72, 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, + 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x28, 0x2a, 0x26, 0x2f, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, + 0x64, 0x7d, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x94, 0x01, 0x0a, 0x0e, 0x47, 0x65, + 0x74, 0x53, 0x75, 0x62, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x12, 0x21, 0x2e, 0x67, + 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, + 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1c, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x43, 0x68, 0x61, + 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x41, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x12, 0x39, 0x2f, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x73, 0x75, 0x62, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, + 0x2f, 0x7b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x7d, 0x2f, 0x7b, 0x63, 0x68, 0x61, + 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x7d, 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, + 0x12, 0x6e, 0x0a, 0x0b, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x12, + 0x1e, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x18, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x42, 0x61, 0x73, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x6f, + 0x12, 0x90, 0x01, 0x0a, 0x21, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e, + 0x65, 0x6c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, + 0x70, 0x72, 0x6f, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x18, 0x2e, 0x67, 0x62, + 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x3a, 0x01, 0x2a, + 0x22, 0x31, 0x2f, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, + 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2f, 0x69, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x12, 0x85, 0x01, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x22, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, + 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x22, 0x2e, 0x2f, 0x67, 0x62, + 0x32, 0x38, 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, + 0x6f, 0x72, 0x74, 0x2f, 0x7b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x7d, 0x2f, 0x7b, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x6f, 0x64, 0x65, 0x7d, 0x12, 0x5b, 0x0a, 0x09, 0x41, + 0x64, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, + 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22, + 0x17, 0x2f, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x64, 0x64, 0x12, 0x61, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, + 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, + 0x1a, 0x2f, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x87, 0x01, 0x0a, 0x0f, + 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x22, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x47, 0x65, 0x74, + 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, + 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, + 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x7d, 0x2f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x7b, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x41, 0x6c, 0x61, 0x72, 0x6d, 0x12, 0x21, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, + 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x41, 0x6c, + 0x61, 0x72, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x62, 0x32, + 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x41, 0x6c, + 0x61, 0x72, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x61, 0x6c, 0x61, 0x72, 0x6d, 0x2f, 0x7b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, + 0x64, 0x7d, 0x12, 0x76, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x20, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, + 0x2e, 0x47, 0x65, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, + 0x72, 0x6f, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x2b, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x12, 0x23, 0x2f, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x7b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x7d, 0x2f, 0x73, + 0x79, 0x6e, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x8a, 0x01, 0x0a, 0x10, 0x47, + 0x65, 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x23, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x47, 0x65, 0x74, + 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, + 0x6f, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x12, + 0x26, 0x2f, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x7b, 0x64, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x7d, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, + 0x62, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x71, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x53, 0x6e, + 0x61, 0x70, 0x12, 0x1a, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, + 0x47, 0x65, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, + 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x53, 0x6e, 0x61, 0x70, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, + 0x12, 0x28, 0x2f, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, + 0x6e, 0x61, 0x70, 0x2f, 0x7b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x7d, 0x2f, 0x7b, + 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x7d, 0x12, 0x76, 0x0a, 0x09, 0x53, 0x74, + 0x61, 0x72, 0x74, 0x50, 0x6c, 0x61, 0x79, 0x12, 0x17, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, + 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x18, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x50, 0x6c, + 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x30, 0x12, 0x2e, 0x2f, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x70, 0x6c, 0x61, 0x79, 0x2f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x2f, 0x7b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x7d, 0x2f, 0x7b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, - 0x64, 0x7d, 0x12, 0x74, 0x0a, 0x0b, 0x53, 0x74, 0x6f, 0x70, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, - 0x74, 0x12, 0x1e, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x43, - 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x18, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x42, - 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x25, 0x22, 0x23, 0x2f, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x70, 0x6c, 0x61, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x53, 0x74, - 0x6f, 0x70, 0x2f, 0x7b, 0x6b, 0x65, 0x79, 0x7d, 0x12, 0x89, 0x01, 0x0a, 0x0e, 0x53, 0x74, 0x61, - 0x72, 0x74, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x12, 0x1c, 0x2e, 0x67, 0x62, - 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, - 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x62, 0x32, 0x38, - 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, - 0x22, 0x32, 0x2f, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, - 0x6c, 0x61, 0x79, 0x2f, 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x2f, 0x7b, 0x64, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x7d, 0x2f, 0x7b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, - 0x6c, 0x49, 0x64, 0x7d, 0x12, 0x88, 0x01, 0x0a, 0x0d, 0x53, 0x74, 0x6f, 0x70, 0x42, 0x72, 0x6f, - 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x12, 0x1c, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, - 0x70, 0x72, 0x6f, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, - 0x6f, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3f, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x22, 0x37, 0x2f, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, + 0x64, 0x7d, 0x12, 0x74, 0x0a, 0x08, 0x53, 0x74, 0x6f, 0x70, 0x50, 0x6c, 0x61, 0x79, 0x12, 0x17, + 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x50, 0x6c, 0x61, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, + 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x2f, 0x67, 0x62, 0x32, 0x38, + 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x6c, 0x61, 0x79, 0x2f, 0x73, 0x74, 0x6f, + 0x70, 0x2f, 0x7b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x7d, 0x2f, 0x7b, 0x63, 0x68, + 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x7d, 0x12, 0x74, 0x0a, 0x0b, 0x53, 0x74, 0x6f, 0x70, + 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x12, 0x1e, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, + 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x53, 0x74, 0x6f, 0x70, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, + 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x22, 0x23, 0x2f, 0x67, 0x62, 0x32, 0x38, + 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x6c, 0x61, 0x79, 0x2f, 0x63, 0x6f, 0x6e, + 0x76, 0x65, 0x72, 0x74, 0x53, 0x74, 0x6f, 0x70, 0x2f, 0x7b, 0x6b, 0x65, 0x79, 0x7d, 0x12, 0x89, + 0x01, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, + 0x74, 0x12, 0x1c, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x42, + 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1d, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x42, 0x72, 0x6f, + 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x22, 0x32, 0x2f, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x6c, 0x61, 0x79, 0x2f, 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, - 0x61, 0x73, 0x74, 0x2f, 0x73, 0x74, 0x6f, 0x70, 0x2f, 0x7b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x49, 0x64, 0x7d, 0x2f, 0x7b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x7d, 0x12, - 0x62, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x53, 0x53, 0x52, 0x43, 0x12, 0x16, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1c, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, - 0x72, 0x6f, 0x2e, 0x53, 0x53, 0x52, 0x43, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x67, 0x62, - 0x32, 0x38, 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x6c, 0x61, 0x79, 0x2f, 0x73, - 0x73, 0x72, 0x63, 0x12, 0x68, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x43, 0x68, 0x61, - 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x20, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, - 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, - 0x70, 0x72, 0x6f, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x22, 0x20, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x72, 0x61, 0x77, 0x42, 0x22, 0x5a, + 0x61, 0x73, 0x74, 0x2f, 0x7b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x7d, 0x2f, 0x7b, + 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x7d, 0x12, 0x88, 0x01, 0x0a, 0x0d, 0x53, + 0x74, 0x6f, 0x70, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x12, 0x1c, 0x2e, 0x67, + 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, + 0x61, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x67, 0x62, 0x32, + 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x22, 0x37, 0x2f, 0x67, + 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x6c, 0x61, 0x79, 0x2f, + 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x2f, 0x73, 0x74, 0x6f, 0x70, 0x2f, 0x7b, + 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x7d, 0x2f, 0x7b, 0x63, 0x68, 0x61, 0x6e, 0x6e, + 0x65, 0x6c, 0x49, 0x64, 0x7d, 0x12, 0x62, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x53, + 0x53, 0x52, 0x43, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1c, 0x2e, 0x67, 0x62, + 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x53, 0x53, 0x52, 0x43, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x18, 0x12, 0x16, 0x2f, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x70, 0x6c, 0x61, 0x79, 0x2f, 0x73, 0x73, 0x72, 0x63, 0x12, 0x68, 0x0a, 0x0d, 0x47, 0x65, 0x74, + 0x52, 0x61, 0x77, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x20, 0x2e, 0x67, 0x62, 0x32, + 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x43, 0x68, + 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x67, + 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, + 0x6c, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x67, 0x62, 0x32, 0x38, + 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, + 0x72, 0x61, 0x77, 0x12, 0x63, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, + 0x72, 0x6d, 0x12, 0x14, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, + 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x1a, 0x18, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, + 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x3a, 0x01, 0x2a, 0x22, 0x19, 0x2f, + 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x6c, 0x61, 0x74, + 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x61, 0x64, 0x64, 0x12, 0x6f, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x50, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x1e, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, + 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, + 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, 0x1a, 0x2f, + 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x6c, 0x61, 0x74, + 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x69, 0x0a, 0x0e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x14, 0x2e, 0x67, 0x62, + 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, + 0x6d, 0x1a, 0x18, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x42, + 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x22, 0x1c, 0x2f, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x12, 0x71, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6c, + 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x21, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, + 0x70, 0x72, 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, + 0x72, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x67, 0x62, 0x32, 0x38, + 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x2a, 0x1a, 0x2f, 0x67, 0x62, + 0x32, 0x38, 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, + 0x72, 0x6d, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x74, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x50, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x12, 0x20, 0x2e, 0x67, 0x62, 0x32, 0x38, 0x31, + 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, + 0x72, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x62, 0x32, + 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x73, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x1c, 0x12, 0x1a, 0x2f, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x42, 0x22, 0x5a, 0x20, 0x6d, 0x37, 0x73, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x2f, 0x76, 0x35, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x67, 0x62, 0x32, 0x38, 0x31, 0x38, 0x31, 0x70, 0x72, 0x6f, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_gb28181_proto_rawDescOnce sync.Once - file_gb28181_proto_rawDescData = file_gb28181_proto_rawDesc + file_gb28181_proto_rawDescData []byte ) func file_gb28181_proto_rawDescGZIP() []byte { file_gb28181_proto_rawDescOnce.Do(func() { - file_gb28181_proto_rawDescData = protoimpl.X.CompressGZIP(file_gb28181_proto_rawDescData) + file_gb28181_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gb28181_proto_rawDesc), len(file_gb28181_proto_rawDesc))) }) return file_gb28181_proto_rawDescData } -var file_gb28181_proto_msgTypes = make([]protoimpl.MessageInfo, 38) +var file_gb28181_proto_msgTypes = make([]protoimpl.MessageInfo, 44) var file_gb28181_proto_goTypes = []any{ (*BaseResponse)(nil), // 0: gb28181pro.BaseResponse (*GetDeviceRequest)(nil), // 1: gb28181pro.GetDeviceRequest @@ -3053,78 +3787,96 @@ var file_gb28181_proto_goTypes = []any{ (*BroadcastResponse)(nil), // 34: gb28181pro.BroadcastResponse (*SSRCInfo)(nil), // 35: gb28181pro.SSRCInfo (*SSRCListResponse)(nil), // 36: gb28181pro.SSRCListResponse - nil, // 37: gb28181pro.SubscribeInfoResponse.DialogStateEntry - (*timestamppb.Timestamp)(nil), // 38: google.protobuf.Timestamp - (*emptypb.Empty)(nil), // 39: google.protobuf.Empty + (*Platform)(nil), // 37: gb28181pro.Platform + (*GetPlatformRequest)(nil), // 38: gb28181pro.GetPlatformRequest + (*DeletePlatformRequest)(nil), // 39: gb28181pro.DeletePlatformRequest + (*ListPlatformsRequest)(nil), // 40: gb28181pro.ListPlatformsRequest + (*PlatformResponse)(nil), // 41: gb28181pro.PlatformResponse + (*PlatformsPageInfo)(nil), // 42: gb28181pro.PlatformsPageInfo + nil, // 43: gb28181pro.SubscribeInfoResponse.DialogStateEntry + (*timestamppb.Timestamp)(nil), // 44: google.protobuf.Timestamp + (*emptypb.Empty)(nil), // 45: google.protobuf.Empty } var file_gb28181_proto_depIdxs = []int32{ 12, // 0: gb28181pro.DevicesPageInfo.list:type_name -> gb28181pro.Device 11, // 1: gb28181pro.ChannelsPageInfo.list:type_name -> gb28181pro.Channel - 38, // 2: gb28181pro.Channel.gpsTime:type_name -> google.protobuf.Timestamp - 38, // 3: gb28181pro.Device.gpsTime:type_name -> google.protobuf.Timestamp - 38, // 4: gb28181pro.Device.registerTime:type_name -> google.protobuf.Timestamp - 38, // 5: gb28181pro.Device.updateTime:type_name -> google.protobuf.Timestamp + 44, // 2: gb28181pro.Channel.gpsTime:type_name -> google.protobuf.Timestamp + 44, // 3: gb28181pro.Device.gpsTime:type_name -> google.protobuf.Timestamp + 44, // 4: gb28181pro.Device.registerTime:type_name -> google.protobuf.Timestamp + 44, // 5: gb28181pro.Device.updateTime:type_name -> google.protobuf.Timestamp 11, // 6: gb28181pro.Device.channels:type_name -> gb28181pro.Channel 12, // 7: gb28181pro.ResponseList.data:type_name -> gb28181pro.Device 20, // 8: gb28181pro.DeviceAlarmResponse.alarms:type_name -> gb28181pro.AlarmInfo - 37, // 9: gb28181pro.SubscribeInfoResponse.dialogState:type_name -> gb28181pro.SubscribeInfoResponse.DialogStateEntry + 43, // 9: gb28181pro.SubscribeInfoResponse.dialogState:type_name -> gb28181pro.SubscribeInfoResponse.DialogStateEntry 12, // 10: gb28181pro.DeviceResponse.data:type_name -> gb28181pro.Device 11, // 11: gb28181pro.ChannelResponse.data:type_name -> gb28181pro.Channel 31, // 12: gb28181pro.PlayResponse.stream_info:type_name -> gb28181pro.StreamInfo 35, // 13: gb28181pro.SSRCListResponse.data:type_name -> gb28181pro.SSRCInfo - 39, // 14: gb28181pro.api.List:input_type -> google.protobuf.Empty - 1, // 15: gb28181pro.api.GetDevice:input_type -> gb28181pro.GetDeviceRequest - 2, // 16: gb28181pro.api.GetDevices:input_type -> gb28181pro.GetDevicesRequest - 4, // 17: gb28181pro.api.GetChannels:input_type -> gb28181pro.GetChannelsRequest - 6, // 18: gb28181pro.api.SyncDevice:input_type -> gb28181pro.SyncDeviceRequest - 8, // 19: gb28181pro.api.DeleteDevice:input_type -> gb28181pro.DeleteDeviceRequest - 10, // 20: gb28181pro.api.GetSubChannels:input_type -> gb28181pro.GetSubChannelsRequest - 14, // 21: gb28181pro.api.ChangeAudio:input_type -> gb28181pro.ChangeAudioRequest - 11, // 22: gb28181pro.api.UpdateChannelStreamIdentification:input_type -> gb28181pro.Channel - 15, // 23: gb28181pro.api.UpdateTransport:input_type -> gb28181pro.UpdateTransportRequest - 12, // 24: gb28181pro.api.AddDevice:input_type -> gb28181pro.Device - 12, // 25: gb28181pro.api.UpdateDevice:input_type -> gb28181pro.Device - 16, // 26: gb28181pro.api.GetDeviceStatus:input_type -> gb28181pro.GetDeviceStatusRequest - 18, // 27: gb28181pro.api.GetDeviceAlarm:input_type -> gb28181pro.GetDeviceAlarmRequest - 21, // 28: gb28181pro.api.GetSyncStatus:input_type -> gb28181pro.GetSyncStatusRequest - 22, // 29: gb28181pro.api.GetSubscribeInfo:input_type -> gb28181pro.GetSubscribeInfoRequest - 24, // 30: gb28181pro.api.GetSnap:input_type -> gb28181pro.GetSnapRequest - 29, // 31: gb28181pro.api.StartPlay:input_type -> gb28181pro.PlayRequest - 29, // 32: gb28181pro.api.StopPlay:input_type -> gb28181pro.PlayRequest - 32, // 33: gb28181pro.api.StopConvert:input_type -> gb28181pro.ConvertStopRequest - 33, // 34: gb28181pro.api.StartBroadcast:input_type -> gb28181pro.BroadcastRequest - 33, // 35: gb28181pro.api.StopBroadcast:input_type -> gb28181pro.BroadcastRequest - 39, // 36: gb28181pro.api.GetAllSSRC:input_type -> google.protobuf.Empty - 26, // 37: gb28181pro.api.GetRawChannel:input_type -> gb28181pro.GetRawChannelRequest - 13, // 38: gb28181pro.api.List:output_type -> gb28181pro.ResponseList - 27, // 39: gb28181pro.api.GetDevice:output_type -> gb28181pro.DeviceResponse - 3, // 40: gb28181pro.api.GetDevices:output_type -> gb28181pro.DevicesPageInfo - 5, // 41: gb28181pro.api.GetChannels:output_type -> gb28181pro.ChannelsPageInfo - 7, // 42: gb28181pro.api.SyncDevice:output_type -> gb28181pro.SyncStatus - 9, // 43: gb28181pro.api.DeleteDevice:output_type -> gb28181pro.DeleteDeviceResponse - 5, // 44: gb28181pro.api.GetSubChannels:output_type -> gb28181pro.ChannelsPageInfo - 0, // 45: gb28181pro.api.ChangeAudio:output_type -> gb28181pro.BaseResponse - 0, // 46: gb28181pro.api.UpdateChannelStreamIdentification:output_type -> gb28181pro.BaseResponse - 39, // 47: gb28181pro.api.UpdateTransport:output_type -> google.protobuf.Empty - 39, // 48: gb28181pro.api.AddDevice:output_type -> google.protobuf.Empty - 39, // 49: gb28181pro.api.UpdateDevice:output_type -> google.protobuf.Empty - 17, // 50: gb28181pro.api.GetDeviceStatus:output_type -> gb28181pro.DeviceStatusResponse - 19, // 51: gb28181pro.api.GetDeviceAlarm:output_type -> gb28181pro.DeviceAlarmResponse - 7, // 52: gb28181pro.api.GetSyncStatus:output_type -> gb28181pro.SyncStatus - 23, // 53: gb28181pro.api.GetSubscribeInfo:output_type -> gb28181pro.SubscribeInfoResponse - 25, // 54: gb28181pro.api.GetSnap:output_type -> gb28181pro.SnapResponse - 30, // 55: gb28181pro.api.StartPlay:output_type -> gb28181pro.PlayResponse - 30, // 56: gb28181pro.api.StopPlay:output_type -> gb28181pro.PlayResponse - 0, // 57: gb28181pro.api.StopConvert:output_type -> gb28181pro.BaseResponse - 34, // 58: gb28181pro.api.StartBroadcast:output_type -> gb28181pro.BroadcastResponse - 0, // 59: gb28181pro.api.StopBroadcast:output_type -> gb28181pro.BaseResponse - 36, // 60: gb28181pro.api.GetAllSSRC:output_type -> gb28181pro.SSRCListResponse - 11, // 61: gb28181pro.api.GetRawChannel:output_type -> gb28181pro.Channel - 38, // [38:62] is the sub-list for method output_type - 14, // [14:38] is the sub-list for method input_type - 14, // [14:14] is the sub-list for extension type_name - 14, // [14:14] is the sub-list for extension extendee - 0, // [0:14] is the sub-list for field type_name + 37, // 14: gb28181pro.PlatformResponse.data:type_name -> gb28181pro.Platform + 37, // 15: gb28181pro.PlatformsPageInfo.list:type_name -> gb28181pro.Platform + 45, // 16: gb28181pro.api.List:input_type -> google.protobuf.Empty + 1, // 17: gb28181pro.api.GetDevice:input_type -> gb28181pro.GetDeviceRequest + 2, // 18: gb28181pro.api.GetDevices:input_type -> gb28181pro.GetDevicesRequest + 4, // 19: gb28181pro.api.GetChannels:input_type -> gb28181pro.GetChannelsRequest + 6, // 20: gb28181pro.api.SyncDevice:input_type -> gb28181pro.SyncDeviceRequest + 8, // 21: gb28181pro.api.DeleteDevice:input_type -> gb28181pro.DeleteDeviceRequest + 10, // 22: gb28181pro.api.GetSubChannels:input_type -> gb28181pro.GetSubChannelsRequest + 14, // 23: gb28181pro.api.ChangeAudio:input_type -> gb28181pro.ChangeAudioRequest + 11, // 24: gb28181pro.api.UpdateChannelStreamIdentification:input_type -> gb28181pro.Channel + 15, // 25: gb28181pro.api.UpdateTransport:input_type -> gb28181pro.UpdateTransportRequest + 12, // 26: gb28181pro.api.AddDevice:input_type -> gb28181pro.Device + 12, // 27: gb28181pro.api.UpdateDevice:input_type -> gb28181pro.Device + 16, // 28: gb28181pro.api.GetDeviceStatus:input_type -> gb28181pro.GetDeviceStatusRequest + 18, // 29: gb28181pro.api.GetDeviceAlarm:input_type -> gb28181pro.GetDeviceAlarmRequest + 21, // 30: gb28181pro.api.GetSyncStatus:input_type -> gb28181pro.GetSyncStatusRequest + 22, // 31: gb28181pro.api.GetSubscribeInfo:input_type -> gb28181pro.GetSubscribeInfoRequest + 24, // 32: gb28181pro.api.GetSnap:input_type -> gb28181pro.GetSnapRequest + 29, // 33: gb28181pro.api.StartPlay:input_type -> gb28181pro.PlayRequest + 29, // 34: gb28181pro.api.StopPlay:input_type -> gb28181pro.PlayRequest + 32, // 35: gb28181pro.api.StopConvert:input_type -> gb28181pro.ConvertStopRequest + 33, // 36: gb28181pro.api.StartBroadcast:input_type -> gb28181pro.BroadcastRequest + 33, // 37: gb28181pro.api.StopBroadcast:input_type -> gb28181pro.BroadcastRequest + 45, // 38: gb28181pro.api.GetAllSSRC:input_type -> google.protobuf.Empty + 26, // 39: gb28181pro.api.GetRawChannel:input_type -> gb28181pro.GetRawChannelRequest + 37, // 40: gb28181pro.api.AddPlatform:input_type -> gb28181pro.Platform + 38, // 41: gb28181pro.api.GetPlatform:input_type -> gb28181pro.GetPlatformRequest + 37, // 42: gb28181pro.api.UpdatePlatform:input_type -> gb28181pro.Platform + 39, // 43: gb28181pro.api.DeletePlatform:input_type -> gb28181pro.DeletePlatformRequest + 40, // 44: gb28181pro.api.ListPlatforms:input_type -> gb28181pro.ListPlatformsRequest + 13, // 45: gb28181pro.api.List:output_type -> gb28181pro.ResponseList + 27, // 46: gb28181pro.api.GetDevice:output_type -> gb28181pro.DeviceResponse + 3, // 47: gb28181pro.api.GetDevices:output_type -> gb28181pro.DevicesPageInfo + 5, // 48: gb28181pro.api.GetChannels:output_type -> gb28181pro.ChannelsPageInfo + 7, // 49: gb28181pro.api.SyncDevice:output_type -> gb28181pro.SyncStatus + 9, // 50: gb28181pro.api.DeleteDevice:output_type -> gb28181pro.DeleteDeviceResponse + 5, // 51: gb28181pro.api.GetSubChannels:output_type -> gb28181pro.ChannelsPageInfo + 0, // 52: gb28181pro.api.ChangeAudio:output_type -> gb28181pro.BaseResponse + 0, // 53: gb28181pro.api.UpdateChannelStreamIdentification:output_type -> gb28181pro.BaseResponse + 45, // 54: gb28181pro.api.UpdateTransport:output_type -> google.protobuf.Empty + 45, // 55: gb28181pro.api.AddDevice:output_type -> google.protobuf.Empty + 45, // 56: gb28181pro.api.UpdateDevice:output_type -> google.protobuf.Empty + 17, // 57: gb28181pro.api.GetDeviceStatus:output_type -> gb28181pro.DeviceStatusResponse + 19, // 58: gb28181pro.api.GetDeviceAlarm:output_type -> gb28181pro.DeviceAlarmResponse + 7, // 59: gb28181pro.api.GetSyncStatus:output_type -> gb28181pro.SyncStatus + 23, // 60: gb28181pro.api.GetSubscribeInfo:output_type -> gb28181pro.SubscribeInfoResponse + 25, // 61: gb28181pro.api.GetSnap:output_type -> gb28181pro.SnapResponse + 30, // 62: gb28181pro.api.StartPlay:output_type -> gb28181pro.PlayResponse + 30, // 63: gb28181pro.api.StopPlay:output_type -> gb28181pro.PlayResponse + 0, // 64: gb28181pro.api.StopConvert:output_type -> gb28181pro.BaseResponse + 34, // 65: gb28181pro.api.StartBroadcast:output_type -> gb28181pro.BroadcastResponse + 0, // 66: gb28181pro.api.StopBroadcast:output_type -> gb28181pro.BaseResponse + 36, // 67: gb28181pro.api.GetAllSSRC:output_type -> gb28181pro.SSRCListResponse + 11, // 68: gb28181pro.api.GetRawChannel:output_type -> gb28181pro.Channel + 0, // 69: gb28181pro.api.AddPlatform:output_type -> gb28181pro.BaseResponse + 41, // 70: gb28181pro.api.GetPlatform:output_type -> gb28181pro.PlatformResponse + 0, // 71: gb28181pro.api.UpdatePlatform:output_type -> gb28181pro.BaseResponse + 0, // 72: gb28181pro.api.DeletePlatform:output_type -> gb28181pro.BaseResponse + 42, // 73: gb28181pro.api.ListPlatforms:output_type -> gb28181pro.PlatformsPageInfo + 45, // [45:74] is the sub-list for method output_type + 16, // [16:45] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name } func init() { file_gb28181_proto_init() } @@ -3136,9 +3888,9 @@ func file_gb28181_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gb28181_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gb28181_proto_rawDesc), len(file_gb28181_proto_rawDesc)), NumEnums: 0, - NumMessages: 38, + NumMessages: 44, NumExtensions: 0, NumServices: 1, }, @@ -3147,7 +3899,6 @@ func file_gb28181_proto_init() { MessageInfos: file_gb28181_proto_msgTypes, }.Build() File_gb28181_proto = out.File - file_gb28181_proto_rawDesc = nil file_gb28181_proto_goTypes = nil file_gb28181_proto_depIdxs = nil } diff --git a/plugin/gb28181pro/pb/gb28181.pb.gw.go b/plugin/gb28181pro/pb/gb28181.pb.gw.go index e388317..4ed6efe 100644 --- a/plugin/gb28181pro/pb/gb28181.pb.gw.go +++ b/plugin/gb28181pro/pb/gb28181.pb.gw.go @@ -1342,6 +1342,198 @@ func local_request_Api_GetRawChannel_0(ctx context.Context, marshaler runtime.Ma } +func request_Api_AddPlatform_0(ctx context.Context, marshaler runtime.Marshaler, client ApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq Platform + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.AddPlatform(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Api_AddPlatform_0(ctx context.Context, marshaler runtime.Marshaler, server ApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq Platform + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.AddPlatform(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Api_GetPlatform_0(ctx context.Context, marshaler runtime.Marshaler, client ApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetPlatformRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Int32(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.GetPlatform(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Api_GetPlatform_0(ctx context.Context, marshaler runtime.Marshaler, server ApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetPlatformRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Int32(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.GetPlatform(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Api_UpdatePlatform_0(ctx context.Context, marshaler runtime.Marshaler, client ApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq Platform + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.UpdatePlatform(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Api_UpdatePlatform_0(ctx context.Context, marshaler runtime.Marshaler, server ApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq Platform + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.UpdatePlatform(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Api_DeletePlatform_0(ctx context.Context, marshaler runtime.Marshaler, client ApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeletePlatformRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Int32(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.DeletePlatform(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Api_DeletePlatform_0(ctx context.Context, marshaler runtime.Marshaler, server ApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeletePlatformRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Int32(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.DeletePlatform(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Api_ListPlatforms_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Api_ListPlatforms_0(ctx context.Context, marshaler runtime.Marshaler, client ApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListPlatformsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Api_ListPlatforms_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ListPlatforms(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Api_ListPlatforms_0(ctx context.Context, marshaler runtime.Marshaler, server ApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListPlatformsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Api_ListPlatforms_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListPlatforms(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterApiHandlerServer registers the http handlers for service Api to "mux". // UnaryRPC :call ApiServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -1949,6 +2141,131 @@ func RegisterApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, server }) + mux.Handle("POST", pattern_Api_AddPlatform_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gb28181pro.Api/AddPlatform", runtime.WithHTTPPathPattern("/gb28181/api/platform/add")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Api_AddPlatform_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Api_AddPlatform_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Api_GetPlatform_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gb28181pro.Api/GetPlatform", runtime.WithHTTPPathPattern("/gb28181/api/platform/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Api_GetPlatform_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Api_GetPlatform_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Api_UpdatePlatform_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gb28181pro.Api/UpdatePlatform", runtime.WithHTTPPathPattern("/gb28181/api/platform/update")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Api_UpdatePlatform_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Api_UpdatePlatform_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_Api_DeletePlatform_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gb28181pro.Api/DeletePlatform", runtime.WithHTTPPathPattern("/gb28181/api/platform/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Api_DeletePlatform_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Api_DeletePlatform_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Api_ListPlatforms_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gb28181pro.Api/ListPlatforms", runtime.WithHTTPPathPattern("/gb28181/api/platform/list")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Api_ListPlatforms_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Api_ListPlatforms_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -2518,6 +2835,116 @@ func RegisterApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, client }) + mux.Handle("POST", pattern_Api_AddPlatform_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gb28181pro.Api/AddPlatform", runtime.WithHTTPPathPattern("/gb28181/api/platform/add")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Api_AddPlatform_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Api_AddPlatform_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Api_GetPlatform_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gb28181pro.Api/GetPlatform", runtime.WithHTTPPathPattern("/gb28181/api/platform/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Api_GetPlatform_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Api_GetPlatform_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Api_UpdatePlatform_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gb28181pro.Api/UpdatePlatform", runtime.WithHTTPPathPattern("/gb28181/api/platform/update")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Api_UpdatePlatform_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Api_UpdatePlatform_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_Api_DeletePlatform_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gb28181pro.Api/DeletePlatform", runtime.WithHTTPPathPattern("/gb28181/api/platform/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Api_DeletePlatform_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Api_DeletePlatform_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Api_ListPlatforms_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gb28181pro.Api/ListPlatforms", runtime.WithHTTPPathPattern("/gb28181/api/platform/list")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Api_ListPlatforms_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Api_ListPlatforms_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -2569,6 +2996,16 @@ var ( pattern_Api_GetAllSSRC_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gb28181", "api", "play", "ssrc"}, "")) pattern_Api_GetRawChannel_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gb28181", "api", "channel", "raw"}, "")) + + pattern_Api_AddPlatform_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gb28181", "api", "platform", "add"}, "")) + + pattern_Api_GetPlatform_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"gb28181", "api", "platform", "id"}, "")) + + pattern_Api_UpdatePlatform_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gb28181", "api", "platform", "update"}, "")) + + pattern_Api_DeletePlatform_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"gb28181", "api", "platform", "id"}, "")) + + pattern_Api_ListPlatforms_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gb28181", "api", "platform", "list"}, "")) ) var ( @@ -2619,4 +3056,14 @@ var ( forward_Api_GetAllSSRC_0 = runtime.ForwardResponseMessage forward_Api_GetRawChannel_0 = runtime.ForwardResponseMessage + + forward_Api_AddPlatform_0 = runtime.ForwardResponseMessage + + forward_Api_GetPlatform_0 = runtime.ForwardResponseMessage + + forward_Api_UpdatePlatform_0 = runtime.ForwardResponseMessage + + forward_Api_DeletePlatform_0 = runtime.ForwardResponseMessage + + forward_Api_ListPlatforms_0 = runtime.ForwardResponseMessage ) diff --git a/plugin/gb28181pro/pb/gb28181.proto b/plugin/gb28181pro/pb/gb28181.proto index 3c2ba86..6bdaadc 100644 --- a/plugin/gb28181pro/pb/gb28181.proto +++ b/plugin/gb28181pro/pb/gb28181.proto @@ -184,6 +184,43 @@ service api { get: "/gb28181/api/channel/raw" }; } + + // 添加平台信息 + rpc AddPlatform (Platform) returns (BaseResponse) { + option (google.api.http) = { + post: "/gb28181/api/platform/add" + body: "*" + }; + } + + // 获取平台信息 + rpc GetPlatform (GetPlatformRequest) returns (PlatformResponse) { + option (google.api.http) = { + get: "/gb28181/api/platform/{id}" + }; + } + + // 更新平台信息 + rpc UpdatePlatform (Platform) returns (BaseResponse) { + option (google.api.http) = { + post: "/gb28181/api/platform/update" + body: "*" + }; + } + + // 删除平台信息 + rpc DeletePlatform (DeletePlatformRequest) returns (BaseResponse) { + option (google.api.http) = { + delete: "/gb28181/api/platform/{id}" + }; + } + + // 获取平台列表 + rpc ListPlatforms (ListPlatformsRequest) returns (PlatformsPageInfo) { + option (google.api.http) = { + get: "/gb28181/api/platform/list" + }; + } } // 请求和响应消息定义 @@ -431,4 +468,79 @@ message SSRCListResponse { string message = 2; repeated SSRCInfo data = 3; int32 count = 4; +} + +// Platform消息定义 +message Platform { + int32 id = 1; // ID(数据库中) + bool enable = 2; // 是否启用 + string name = 3; // 名称 + string serverGBId = 4; // SIP服务国标编码 + string serverGBDomain = 5; // SIP服务国标域 + string serverIp = 6; // SIP服务IP + int32 serverPort = 7; // SIP服务端口 + string deviceGBId = 8; // 设备国标编号 + string deviceIp = 9; // 设备ip + int32 devicePort = 10; // 设备端口 + string username = 11; // SIP认证用户名 + string password = 12; // SIP认证密码 + int32 expires = 13; // 注册周期(秒) + int32 keepTimeout = 14; // 心跳周期(秒) + string transport = 15; // 传输协议 + string characterSet = 16; // 字符集 + bool ptz = 17; // 允许云台控制 + bool rtcp = 18; // RTCP流保活 + bool status = 19; // 在线状态 + int32 channelCount = 20; // 通道数量 + bool catalogSubscribe = 21; // 已被订阅目录信息 + bool alarmSubscribe = 22; // 已被订阅报警信息 + bool mobilePositionSubscribe = 23; // 已被订阅移动位置信息 + int32 catalogGroup = 24; // 目录分组大小 + string updateTime = 25; // 最后更新时间 + string createTime = 26; // 创建时间 + bool asMessageChannel = 27; // 是否作为消息通道 + string sendStreamIp = 28; // 点播回复200OK使用的IP + bool autoPushChannel = 29; // 是否自动推送通道变化 + int32 catalogWithPlatform = 30; // 目录信息包含平台信息 + int32 catalogWithGroup = 31; // 目录信息包含分组信息 + int32 catalogWithRegion = 32; // 目录信息包含行政区划 + string civilCode = 33; // 行政区划代码 + string manufacturer = 34; // 平台厂商 + string model = 35; // 平台型号 + string address = 36; // 平台安装地址 + int32 registerWay = 37; // 注册方式 + int32 secrecy = 38; // 保密属性 +} + +// 获取平台请求 +message GetPlatformRequest { + int32 id = 1; +} + +// 删除平台请求 +message DeletePlatformRequest { + int32 id = 1; +} + +// 平台列表请求 +message ListPlatformsRequest { + int32 page = 1; + int32 count = 2; + string query = 3; + bool status = 4; +} + +// 平台响应 +message PlatformResponse { + int32 code = 1; + string message = 2; + Platform data = 3; +} + +// 平台分页信息 +message PlatformsPageInfo { + int32 code = 1; + string message = 2; + int32 total = 3; + repeated Platform list = 4; } \ No newline at end of file diff --git a/plugin/gb28181pro/pb/gb28181_grpc.pb.go b/plugin/gb28181pro/pb/gb28181_grpc.pb.go index 78d617e..8d74f26 100644 --- a/plugin/gb28181pro/pb/gb28181_grpc.pb.go +++ b/plugin/gb28181pro/pb/gb28181_grpc.pb.go @@ -46,6 +46,11 @@ const ( Api_StopBroadcast_FullMethodName = "/gb28181pro.api/StopBroadcast" Api_GetAllSSRC_FullMethodName = "/gb28181pro.api/GetAllSSRC" Api_GetRawChannel_FullMethodName = "/gb28181pro.api/GetRawChannel" + Api_AddPlatform_FullMethodName = "/gb28181pro.api/AddPlatform" + Api_GetPlatform_FullMethodName = "/gb28181pro.api/GetPlatform" + Api_UpdatePlatform_FullMethodName = "/gb28181pro.api/UpdatePlatform" + Api_DeletePlatform_FullMethodName = "/gb28181pro.api/DeletePlatform" + Api_ListPlatforms_FullMethodName = "/gb28181pro.api/ListPlatforms" ) // ApiClient is the client API for Api service. @@ -100,6 +105,16 @@ type ApiClient interface { GetAllSSRC(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*SSRCListResponse, error) // 国标通道编辑时的数据回显 GetRawChannel(ctx context.Context, in *GetRawChannelRequest, opts ...grpc.CallOption) (*Channel, error) + // 添加平台信息 + AddPlatform(ctx context.Context, in *Platform, opts ...grpc.CallOption) (*BaseResponse, error) + // 获取平台信息 + GetPlatform(ctx context.Context, in *GetPlatformRequest, opts ...grpc.CallOption) (*PlatformResponse, error) + // 更新平台信息 + UpdatePlatform(ctx context.Context, in *Platform, opts ...grpc.CallOption) (*BaseResponse, error) + // 删除平台信息 + DeletePlatform(ctx context.Context, in *DeletePlatformRequest, opts ...grpc.CallOption) (*BaseResponse, error) + // 获取平台列表 + ListPlatforms(ctx context.Context, in *ListPlatformsRequest, opts ...grpc.CallOption) (*PlatformsPageInfo, error) } type apiClient struct { @@ -350,6 +365,56 @@ func (c *apiClient) GetRawChannel(ctx context.Context, in *GetRawChannelRequest, return out, nil } +func (c *apiClient) AddPlatform(ctx context.Context, in *Platform, opts ...grpc.CallOption) (*BaseResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(BaseResponse) + err := c.cc.Invoke(ctx, Api_AddPlatform_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *apiClient) GetPlatform(ctx context.Context, in *GetPlatformRequest, opts ...grpc.CallOption) (*PlatformResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(PlatformResponse) + err := c.cc.Invoke(ctx, Api_GetPlatform_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *apiClient) UpdatePlatform(ctx context.Context, in *Platform, opts ...grpc.CallOption) (*BaseResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(BaseResponse) + err := c.cc.Invoke(ctx, Api_UpdatePlatform_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *apiClient) DeletePlatform(ctx context.Context, in *DeletePlatformRequest, opts ...grpc.CallOption) (*BaseResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(BaseResponse) + err := c.cc.Invoke(ctx, Api_DeletePlatform_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *apiClient) ListPlatforms(ctx context.Context, in *ListPlatformsRequest, opts ...grpc.CallOption) (*PlatformsPageInfo, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(PlatformsPageInfo) + err := c.cc.Invoke(ctx, Api_ListPlatforms_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // ApiServer is the server API for Api service. // All implementations must embed UnimplementedApiServer // for forward compatibility. @@ -402,6 +467,16 @@ type ApiServer interface { GetAllSSRC(context.Context, *emptypb.Empty) (*SSRCListResponse, error) // 国标通道编辑时的数据回显 GetRawChannel(context.Context, *GetRawChannelRequest) (*Channel, error) + // 添加平台信息 + AddPlatform(context.Context, *Platform) (*BaseResponse, error) + // 获取平台信息 + GetPlatform(context.Context, *GetPlatformRequest) (*PlatformResponse, error) + // 更新平台信息 + UpdatePlatform(context.Context, *Platform) (*BaseResponse, error) + // 删除平台信息 + DeletePlatform(context.Context, *DeletePlatformRequest) (*BaseResponse, error) + // 获取平台列表 + ListPlatforms(context.Context, *ListPlatformsRequest) (*PlatformsPageInfo, error) mustEmbedUnimplementedApiServer() } @@ -484,6 +559,21 @@ func (UnimplementedApiServer) GetAllSSRC(context.Context, *emptypb.Empty) (*SSRC func (UnimplementedApiServer) GetRawChannel(context.Context, *GetRawChannelRequest) (*Channel, error) { return nil, status.Errorf(codes.Unimplemented, "method GetRawChannel not implemented") } +func (UnimplementedApiServer) AddPlatform(context.Context, *Platform) (*BaseResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddPlatform not implemented") +} +func (UnimplementedApiServer) GetPlatform(context.Context, *GetPlatformRequest) (*PlatformResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPlatform not implemented") +} +func (UnimplementedApiServer) UpdatePlatform(context.Context, *Platform) (*BaseResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdatePlatform not implemented") +} +func (UnimplementedApiServer) DeletePlatform(context.Context, *DeletePlatformRequest) (*BaseResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeletePlatform not implemented") +} +func (UnimplementedApiServer) ListPlatforms(context.Context, *ListPlatformsRequest) (*PlatformsPageInfo, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListPlatforms not implemented") +} func (UnimplementedApiServer) mustEmbedUnimplementedApiServer() {} func (UnimplementedApiServer) testEmbeddedByValue() {} @@ -937,6 +1027,96 @@ func _Api_GetRawChannel_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } +func _Api_AddPlatform_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Platform) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ApiServer).AddPlatform(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Api_AddPlatform_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ApiServer).AddPlatform(ctx, req.(*Platform)) + } + return interceptor(ctx, in, info, handler) +} + +func _Api_GetPlatform_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPlatformRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ApiServer).GetPlatform(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Api_GetPlatform_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ApiServer).GetPlatform(ctx, req.(*GetPlatformRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Api_UpdatePlatform_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Platform) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ApiServer).UpdatePlatform(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Api_UpdatePlatform_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ApiServer).UpdatePlatform(ctx, req.(*Platform)) + } + return interceptor(ctx, in, info, handler) +} + +func _Api_DeletePlatform_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeletePlatformRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ApiServer).DeletePlatform(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Api_DeletePlatform_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ApiServer).DeletePlatform(ctx, req.(*DeletePlatformRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Api_ListPlatforms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListPlatformsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ApiServer).ListPlatforms(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Api_ListPlatforms_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ApiServer).ListPlatforms(ctx, req.(*ListPlatformsRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Api_ServiceDesc is the grpc.ServiceDesc for Api service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -1040,6 +1220,26 @@ var Api_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetRawChannel", Handler: _Api_GetRawChannel_Handler, }, + { + MethodName: "AddPlatform", + Handler: _Api_AddPlatform_Handler, + }, + { + MethodName: "GetPlatform", + Handler: _Api_GetPlatform_Handler, + }, + { + MethodName: "UpdatePlatform", + Handler: _Api_UpdatePlatform_Handler, + }, + { + MethodName: "DeletePlatform", + Handler: _Api_DeletePlatform_Handler, + }, + { + MethodName: "ListPlatforms", + Handler: _Api_ListPlatforms_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "gb28181.proto", diff --git a/plugin/gb28181pro/pkg/platform.go b/plugin/gb28181pro/pkg/platform.go new file mode 100644 index 0000000..915a698 --- /dev/null +++ b/plugin/gb28181pro/pkg/platform.go @@ -0,0 +1,112 @@ +// Package gb28181 实现了GB28181协议相关的功能 +package gb28181 + +import ( + "github.com/emiago/sipgo" + "github.com/emiago/sipgo/sip" +) + +// Platform 表示GB28181平台的配置信息。 +// 包含了平台的基本信息、SIP服务配置、设备信息、认证信息等。 +// 用于存储和管理GB28181平台的所有相关参数。 +type Platform struct { + ID int `gorm:"primaryKey;autoIncrement" json:"id"` // ID表示数据库中的唯一标识符 + Enable bool `gorm:"column:enable" json:"enable"` // Enable表示该平台配置是否启用 + Name string `gorm:"column:name" json:"name"` // Name表示平台的名称 + ServerGBID string `gorm:"column:server_gb_id" json:"serverGBId"` // ServerGBID表示SIP服务器的国标编码 + ServerGBDomain string `gorm:"column:server_gb_domain" json:"serverGBDomain"` // ServerGBDomain表示SIP服务器的国标域 + ServerIP string `gorm:"column:server_ip" json:"serverIp"` // ServerIP表示SIP服务器的IP地址 + ServerPort int `gorm:"column:server_port" json:"serverPort"` // ServerPort表示SIP服务器的端口号 + DeviceGBID string `gorm:"column:device_gb_id" json:"deviceGBId"` // DeviceGBID表示设备的国标编号 + DeviceIP string `gorm:"column:device_ip" json:"deviceIp"` // DeviceIP表示设备的IP地址 + DevicePort int `gorm:"column:device_port" json:"devicePort"` // DevicePort表示设备的端口号 + Username string `gorm:"column:username" json:"username"` // Username表示SIP认证的用户名,默认使用设备国标编号 + Password string `gorm:"column:password" json:"password"` // Password表示SIP认证的密码 + Expires int `gorm:"column:expires" json:"expires"` // Expires表示注册的过期时间,单位为秒 + KeepTimeout int `gorm:"column:keep_timeout" json:"keepTimeout"` // KeepTimeout表示心跳超时时间,单位为秒 + Transport string `gorm:"column:transport" json:"transport"` // Transport表示传输协议类型 + CharacterSet string `gorm:"column:character_set" json:"characterSet"` // CharacterSet表示字符集编码 + PTZ bool `gorm:"column:ptz" json:"ptz"` // PTZ表示是否允许云台控制 + RTCP bool `gorm:"column:rtcp" json:"rtcp"` // RTCP表示是否启用RTCP流保活 + Status bool `gorm:"column:status" json:"status"` // Status表示平台当前的在线状态 + ChannelCount int `gorm:"column:channel_count" json:"channelCount"` // ChannelCount表示通道数量 + CatalogSubscribe bool `gorm:"column:catalog_subscribe" json:"catalogSubscribe"` // CatalogSubscribe表示是否已订阅目录信息 + AlarmSubscribe bool `gorm:"column:alarm_subscribe" json:"alarmSubscribe"` // AlarmSubscribe表示是否已订阅报警信息 + MobilePositionSubscribe bool `gorm:"column:mobile_position_subscribe" json:"mobilePositionSubscribe"` // MobilePositionSubscribe表示是否已订阅移动位置信息 + CatalogGroup int `gorm:"column:catalog_group" json:"catalogGroup"` // CatalogGroup表示目录分组大小,每次向上级发送通道数量 + UpdateTime string `gorm:"column:update_time" json:"updateTime"` // UpdateTime表示最后更新时间 + CreateTime string `gorm:"column:create_time" json:"createTime"` // CreateTime表示创建时间 + AsMessageChannel bool `gorm:"column:as_message_channel" json:"asMessageChannel"` // AsMessageChannel表示是否作为消息通道使用 + SendStreamIP string `gorm:"column:send_stream_ip" json:"sendStreamIp"` // SendStreamIP表示点播回复200OK时使用的IP地址 + AutoPushChannel *bool `gorm:"column:auto_push_channel" json:"autoPushChannel"` // AutoPushChannel表示是否自动推送通道变化 + CatalogWithPlatform int `gorm:"column:catalog_with_platform" json:"catalogWithPlatform"` // CatalogWithPlatform表示目录信息是否包含平台信息(0:关闭,1:打开) + CatalogWithGroup int `gorm:"column:catalog_with_group" json:"catalogWithGroup"` // CatalogWithGroup表示目录信息是否包含分组信息(0:关闭,1:打开) + CatalogWithRegion int `gorm:"column:catalog_with_region" json:"catalogWithRegion"` // CatalogWithRegion表示目录信息是否包含行政区划(0:关闭,1:打开) + CivilCode string `gorm:"column:civil_code" json:"civilCode"` // CivilCode表示行政区划代码 + Manufacturer string `gorm:"column:manufacturer" json:"manufacturer"` // Manufacturer表示平台厂商 + Model string `gorm:"column:model" json:"model"` // Model表示平台型号 + Address string `gorm:"column:address" json:"address"` // Address表示平台安装地址 + RegisterWay int `gorm:"column:register_way" json:"registerWay"` // RegisterWay表示注册方式(1:标准认证注册,2:口令认证,3:数字证书双向认证,4:数字证书单向认证) + Secrecy int `gorm:"column:secrecy" json:"secrecy"` // Secrecy表示保密属性(0:不涉密,1:涉密) + + // 运行时字段,不存储到数据库 + KeepAliveReply int `gorm:"-" json:"keepAliveReply"` // KeepAliveReply表示心跳未回复次数 + RegisterAliveReply int `gorm:"-" json:"registerAliveReply"` // RegisterAliveReply表示注册未回复次数 + CallID string `gorm:"-" json:"callId"` // CallID表示SIP会话的标识符 + + // SIP相关字段,不存储到数据库 + Client *sipgo.Client `gorm:"-" json:"-"` // SIP客户端 + DialogClient *sipgo.DialogClient `gorm:"-" json:"-"` // SIP对话客户端 + ContactHDR sip.ContactHeader `gorm:"-" json:"-"` // 联系人头部 + FromHDR sip.FromHeader `gorm:"-" json:"-"` // From头部 + CurrentSession *sipgo.DialogClientSession `gorm:"-" json:"-"` // 当前会话 +} + +// TableName 指定数据库表名 +func (p *Platform) TableName() string { + return "platform_gb28181pro" +} + +// NewPlatform 创建并返回一个新的Platform实例。 +// 该函数会初始化Platform结构体,并设置一些默认值: +// - RegisterWay默认设置为1(标准认证注册模式) +// - Secrecy默认设置为0(不涉密) +// 返回值为指向新创建的Platform实例的指针。 +func NewPlatform() *Platform { + return &Platform{ + RegisterWay: 1, // 默认使用标准认证注册模式 + Secrecy: 0, // 默认为不涉密 + KeepAliveReply: 0, + RegisterAliveReply: 0, + } +} + +// ResetKeepAliveReply 重置心跳未回复次数 +func (p *Platform) ResetKeepAliveReply() { + p.KeepAliveReply = 0 +} + +// IncrementKeepAliveReply 增加心跳未回复次数 +func (p *Platform) IncrementKeepAliveReply() { + p.KeepAliveReply++ +} + +// ResetRegisterAliveReply 重置注册未回复次数 +func (p *Platform) ResetRegisterAliveReply() { + p.RegisterAliveReply = 0 +} + +// IncrementRegisterAliveReply 增加注册未回复次数 +func (p *Platform) IncrementRegisterAliveReply() { + p.RegisterAliveReply++ +} + +// SetCallID 设置SIP会话标识符 +func (p *Platform) SetCallID(callID string) { + p.CallID = callID +} + +// GetCallID 获取SIP会话标识符 +func (p *Platform) GetCallID() string { + return p.CallID +} diff --git a/plugin/gb28181pro/pkg/sipplatformcommand.go b/plugin/gb28181pro/pkg/sipplatformcommand.go new file mode 100644 index 0000000..b5e9e77 --- /dev/null +++ b/plugin/gb28181pro/pkg/sipplatformcommand.go @@ -0,0 +1,265 @@ +package gb28181 + +import ( + "context" + "fmt" + "strings" + "time" + + "github.com/emiago/sipgo" + "github.com/emiago/sipgo/sip" + "github.com/icholy/digest" +) + +// InitializeSIPClient 初始化SIP客户端 +func (p *Platform) InitializeSIPClient(ua *sipgo.UserAgent, localIP string) error { + var err error + p.Client, err = sipgo.NewClient(ua, sipgo.WithClientHostname(localIP)) + if err != nil { + return fmt.Errorf("failed to create sip client: %v", err) + } + + // 设置联系人头部,使用本地平台的信息 + p.ContactHDR = sip.ContactHeader{ + Address: sip.Uri{ + User: p.DeviceGBID, + Host: p.DeviceIP, + Port: p.DevicePort, + }, + } + + // 设置From头部,使用本地平台的信息 + p.FromHDR = sip.FromHeader{ + Address: sip.Uri{ + User: p.DeviceGBID, + Host: p.ServerGBDomain, + }, + Params: sip.NewParams(), + } + p.FromHDR.Params.Add("tag", sip.GenerateTagN(16)) + + // 创建对话客户端 + p.DialogClient = sipgo.NewDialogClient(p.Client, p.ContactHDR) + + return nil +} + +// Register 发送注册请求到上级平台 +func (p *Platform) Register(ctx context.Context, plugin interface{}) (*sipgo.DialogClientSession, error) { + // 创建注册请求的目标URI,使用上级平台的信息 + recipient := sip.Uri{ + User: p.ServerGBID, + Host: p.ServerIP, + Port: p.ServerPort, + } + + // 创建基本的REGISTER请求 + req := sip.NewRequest(sip.REGISTER, recipient) + + // 添加Contact头部 + contactStr := fmt.Sprintf("", p.DeviceGBID, p.DeviceIP, p.DevicePort) + req.AppendHeader(sip.NewHeader("Contact", contactStr)) + + // 添加From头部 + fromHeader := sip.FromHeader{ + Address: sip.Uri{ + User: p.DeviceGBID, + Host: p.ServerGBDomain, + }, + Params: sip.NewParams(), + } + fromHeader.Params.Add("tag", sip.GenerateTagN(16)) + req.AppendHeader(&fromHeader) + + // 添加To头部 + toHeader := sip.ToHeader{ + Address: sip.Uri{ + User: p.DeviceGBID, + Host: p.ServerGBDomain, + }, + } + req.AppendHeader(&toHeader) + + // 添加Expires头部 + req.AppendHeader(sip.NewHeader("Expires", fmt.Sprintf("%d", p.Expires))) + + // 设置传输协议 + req.SetTransport(strings.ToUpper(p.Transport)) + + // 发送请求并获取响应 + tx, err := p.Client.TransactionRequest(ctx, req, sipgo.ClientRequestAddVia) + if err != nil { + return nil, fmt.Errorf("创建事务失败: %v", err) + } + defer tx.Terminate() + + // 获取响应 + res, err := p.getResponse(tx) + if err != nil { + return nil, fmt.Errorf("获取响应失败: %v", err) + } + + // 处理401未授权响应 + if res.StatusCode == 401 { + // 获取WWW-Authenticate头部 + wwwAuth := res.GetHeader("WWW-Authenticate") + if wwwAuth == nil { + return nil, fmt.Errorf("未收到认证质询") + } + + // 解析认证质询 + chal, err := digest.ParseChallenge(wwwAuth.Value()) + if err != nil { + return nil, fmt.Errorf("解析认证质询失败: %v", err) + } + + // 生成认证响应 + cred, _ := digest.Digest(chal, digest.Options{ + Method: req.Method.String(), + URI: recipient.Host, + Username: p.Username, + Password: p.Password, + }) + + // 创建新的带认证信息的请求 + newReq := req.Clone() + newReq.RemoveHeader("Via") // 必须由传输层重新生成 + newReq.AppendHeader(sip.NewHeader("Authorization", cred.String())) + + // 发送认证请求 + tx, err = p.Client.TransactionRequest(ctx, newReq, sipgo.ClientRequestAddVia) + if err != nil { + return nil, fmt.Errorf("创建认证事务失败: %v", err) + } + defer tx.Terminate() + + // 获取认证响应 + res, err = p.getResponse(tx) + if err != nil { + return nil, fmt.Errorf("获取认证响应失败: %v", err) + } + } + + // 检查最终响应状态 + if res.StatusCode != 200 { + return nil, fmt.Errorf("注册失败,状态码: %d", res.StatusCode) + } + + // 注册成功,不需要维护会话状态 + return nil, nil +} + +// getResponse 从事务中获取响应 +func (p *Platform) getResponse(tx sip.ClientTransaction) (*sip.Response, error) { + select { + case <-tx.Done(): + return nil, fmt.Errorf("事务已终止") + case res := <-tx.Responses(): + return res, nil + } +} + +// Keepalive 发送心跳请求到上级平台 +func (p *Platform) Keepalive(ctx context.Context, plugin interface{}) (*sipgo.DialogClientSession, error) { + // TODO: 实现心跳逻辑 + return nil, nil +} + +// Unregister 发送注销请求到上级平台 +func (p *Platform) Unregister(ctx context.Context, plugin interface{}) (*sipgo.DialogClientSession, error) { + // 创建注销请求的目标URI + recipient := sip.Uri{ + User: p.ServerGBID, + Host: p.ServerIP, + Port: p.ServerPort, + } + + // 创建基本的REGISTER请求 + req := sip.NewRequest(sip.REGISTER, recipient) + + // 添加Contact头部 + contactStr := fmt.Sprintf("", p.DeviceGBID, p.DeviceIP, p.DevicePort) + req.AppendHeader(sip.NewHeader("Contact", contactStr)) + + // 添加From头部 + fromHeader := sip.FromHeader{ + Address: sip.Uri{ + User: p.DeviceGBID, + Host: p.ServerGBDomain, + }, + Params: sip.NewParams(), + } + fromHeader.Params.Add("tag", sip.GenerateTagN(16)) + req.AppendHeader(&fromHeader) + + // 添加To头部 + toHeader := sip.ToHeader{ + Address: sip.Uri{ + User: p.DeviceGBID, + Host: p.ServerGBDomain, + }, + } + req.AppendHeader(&toHeader) + + // 添加Expires头部,设置为0表示注销 + req.AppendHeader(sip.NewHeader("Expires", "0")) + + // 设置传输协议 + req.SetTransport(strings.ToUpper(p.Transport)) + + // 发送请求并获取响应 + tx, err := p.Client.TransactionRequest(ctx, req, sipgo.ClientRequestAddVia) + if err != nil { + return nil, fmt.Errorf("创建事务失败: %v", err) + } + defer tx.Terminate() + + // 获取响应 + res, err := p.getResponse(tx) + if err != nil { + return nil, fmt.Errorf("获取响应失败: %v", err) + } + + // 检查响应状态 + if res.StatusCode != 200 { + return nil, fmt.Errorf("注销失败,状态码: %d", res.StatusCode) + } + + return nil, nil +} + +// StartRegisterTask 启动注册任务 +// 这个方法会在平台启用时被调用,负责处理注册和保活 +func (p *Platform) StartRegisterTask(plugin interface{}) { + ctx := context.Background() + + // 首次注册 + session, err := p.Register(ctx, plugin) + if err != nil { + // TODO: 处理注册失败 + return + } + + // 保存当前会话 + p.CurrentSession = session + + // 启动保活协程 + go func() { + ticker := time.NewTicker(time.Duration(p.KeepTimeout) * time.Second) + defer ticker.Stop() + + for range ticker.C { + if !p.Enable { + // 如果平台被禁用,发送注销请求并退出 + _, _ = p.Unregister(ctx, plugin) + return + } + + // 发送心跳 + _, err := p.Keepalive(ctx, plugin) + if err != nil { + // TODO: 处理心跳失败 + } + } + }() +}