diff --git a/CHANGELOG.md b/CHANGELOG.md index f4629a41b95ced72df6e444e4788115f9001e834..2fa82bd91600dbee2992989c39fe662e43777a09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,10 @@ # 更新日志 +## [3.4.4-beta.3] - 2025.9.8 +### Changed +- 修改从授权服务获取productId和deviceId +- 修改音乐,将授权服务的token部分传给音乐服务 +- 增加儿童空调url分支,屏蔽笑话功能 + ## [3.4.4-beta.2] - 2025.9.2 ### Changed - 屏蔽闹钟 diff --git a/c2c.http b/c2c.http index 3c749043642b2819ff2b79b9215e1f0878cf73fa..d6efa402cee366c5a8a274e9c2c6c1038cea7c93 100644 --- a/c2c.http +++ b/c2c.http @@ -27,12 +27,13 @@ X-AppKey: 391b50b5ed634fc49a3db7cfd6bc40db "ip": "14.215.222.17", "mac": "ece154a865eb", "mid": "11011", - "query":"播放宝宝睡觉的歌" , + "query":"查询未来七天的天气" , "requestId": "123456111" } ### #POST http://172.28.54.27:13302/semantic/unisoundc2c/speech-nlu-parse +#ece154a865eb ece154a865bc POST http://172.28.124.110:13302/semantic/unisoundc2c/speech-nlu-parse Content-Type: application/json X-AppKey: 391b50b5ed634fc49a3db7cfd6bc40db @@ -40,8 +41,8 @@ X-AppKey: 391b50b5ed634fc49a3db7cfd6bc40db { "ip": "14.215.222.17", "mac": "ece154a865eb", - "mid": "10f05", - "query":"声音调得小一点", + "mid": "11011", + "query":"讲个笑话", "requestId": "123456111" } diff --git a/conf/config.yaml b/conf/config.yaml index ef51fd4c667bbf7c5ff97900d674332fe4b770d6..64156ed5ae68c86b67da7da3ddc1fef030765b59 100644 --- a/conf/config.yaml +++ b/conf/config.yaml @@ -44,7 +44,8 @@ Redis: Speech: ProductId: 279629895 Apikey : 0c74988953dd4ed4bf31955527802cf3 - Url: wss://dds.dui.ai/dds/v2/test + Url: wss://dds.dui.ai/dds/v2/dev + ChildUrl: wss://dds.dui.ai/dds/v2/child-dev FeedBackUrl: http://apis.duiopen.com/feedback/letingv4 MusicDomain: @@ -96,7 +97,7 @@ DevLimited: # 设备差异化的配置, 通过mid查询对应的配置 IsMusicRemid: true # 测试服为true 暂不更新, 正式服为false; 正式服与测试服的也是有差异. 2022年2月14日11:27:43 MusicRemidText: 您的设备尚未授权,请前往格力+手机应用绑定授权。 # MusicRemidText: 您的语音空调尚未激活,请尽快更新格力+APP,进入语音空调语音技能页面,点击酷狗音乐进行授权,授权过程不产生任何费用。 - ShieldedDomainList: [] + ShieldedDomainList: ['笑话'] - Mids: ['default'] # 其他空调(一般的语音空调), 默认(mid未出现在上面则使用这个设置) Limited: diff --git a/main.go b/main.go index 7abf7c01b5c70648c07e7321c9985ca9430aa072..afc50c837b04cc36301fad06d96b6f648a0d4d78 100644 --- a/main.go +++ b/main.go @@ -207,7 +207,7 @@ func setupFlag() error { flag.StringVar(&serverTag, "tag", "", "注册到注册中心的标签") flag.StringVar(&ip, "ip", "", "IP") flag.IntVar(&port, "port", 0, "端口") - flag.StringVar(&consulUrl, "consul", "http://172.28.124.105:8500", "consul服务地址") + flag.StringVar(&consulUrl, "consul", "http://172.28.124.106:8500", "consul服务地址") flag.StringVar(&config, "config", "env/v2,speech_nlu_parse/conf", "指定要使用的配置文件路径") flag.BoolVar(&isVersion, "version", false, "编译信息") flag.StringVar(&consulToken, "token", "092288b5-824f-854c-39aa-a958afd9a633", "consul token") diff --git a/model/speech.go b/model/speech.go index d5570d440ab128c7c2bb882e18f18c8a7f2bb9a2..d7822fc7d8cb36e3e1451137cd7f2fe27400cce9 100644 --- a/model/speech.go +++ b/model/speech.go @@ -13,6 +13,15 @@ type SpeechDomainParams struct { SessionId string HomeId string AppKey string + TokenMemo *TokenMemo +} + +type TokenMemo struct { + AccessToken string `json:"accessToken"` + DeviceId string `json:"deviceId"` + ClientId string `json:"clientId"` + ProductId string `json:"productId"` + Status int32 `json:"status"` } type SpeechWsResp struct { diff --git a/pkg/proto/music-spot.pb.go b/pkg/proto/music-spot.pb.go index 802f8b48141969446ae7f7be3963492e0e552e3a..f04e1c711545b1a82d5fc078224253751ee0f902 100644 --- a/pkg/proto/music-spot.pb.go +++ b/pkg/proto/music-spot.pb.go @@ -190,13 +190,14 @@ type MusicSpotRequest_DevInfo struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Mac string `protobuf:"bytes,1,opt,name=mac,proto3" json:"mac,omitempty"` - SubMac string `protobuf:"bytes,2,opt,name=subMac,proto3" json:"subMac,omitempty"` // 子设备mac,中控变成了子设备 - Mid string `protobuf:"bytes,3,opt,name=mid,proto3" json:"mid,omitempty"` // mid - Vender string `protobuf:"bytes,4,opt,name=vender,proto3" json:"vender,omitempty"` // 细分码,用于设备没授权的情况下给默认boot - Hid string `protobuf:"bytes,5,opt,name=hid,proto3" json:"hid,omitempty"` // 模组id,优先级高于细分码 - 若能匹配,优先使用 - HomeId string `protobuf:"bytes,6,opt,name=homeId,proto3" json:"homeId,omitempty"` // 设备所属家庭id - UserId string `protobuf:"bytes,7,opt,name=userId,proto3" json:"userId,omitempty"` // 用户id + Mac string `protobuf:"bytes,1,opt,name=mac,proto3" json:"mac,omitempty"` + SubMac string `protobuf:"bytes,2,opt,name=subMac,proto3" json:"subMac,omitempty"` // 子设备mac,中控变成了子设备 + Mid string `protobuf:"bytes,3,opt,name=mid,proto3" json:"mid,omitempty"` // mid + Vender string `protobuf:"bytes,4,opt,name=vender,proto3" json:"vender,omitempty"` // 细分码,用于设备没授权的情况下给默认boot + Hid string `protobuf:"bytes,5,opt,name=hid,proto3" json:"hid,omitempty"` // 模组id,优先级高于细分码 - 若能匹配,优先使用 + HomeId string `protobuf:"bytes,6,opt,name=homeId,proto3" json:"homeId,omitempty"` // 设备所属家庭id + UserId string `protobuf:"bytes,7,opt,name=userId,proto3" json:"userId,omitempty"` // 用户id + AuthData *MusicSpotRequest_DevInfo_TokenMemo `protobuf:"bytes,8,opt,name=authData,proto3" json:"authData,omitempty"` //授权信息 } func (x *MusicSpotRequest_DevInfo) Reset() { @@ -280,6 +281,13 @@ func (x *MusicSpotRequest_DevInfo) GetUserId() string { return "" } +func (x *MusicSpotRequest_DevInfo) GetAuthData() *MusicSpotRequest_DevInfo_TokenMemo { + if x != nil { + return x.AuthData + } + return nil +} + type MusicSpotRequest_Data struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -343,6 +351,85 @@ func (x *MusicSpotRequest_Data) GetCommand() *MusicSpotRequest_Data_Command { return nil } +type MusicSpotRequest_DevInfo_TokenMemo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AccessToken string `protobuf:"bytes,1,opt,name=accessToken,proto3" json:"accessToken,omitempty"` + DeviceId string `protobuf:"bytes,2,opt,name=deviceId,proto3" json:"deviceId,omitempty"` + ClientId string `protobuf:"bytes,3,opt,name=clientId,proto3" json:"clientId,omitempty"` + ProductId string `protobuf:"bytes,4,opt,name=productId,proto3" json:"productId,omitempty"` + Status int32 `protobuf:"varint,5,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *MusicSpotRequest_DevInfo_TokenMemo) Reset() { + *x = MusicSpotRequest_DevInfo_TokenMemo{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_music_spot_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MusicSpotRequest_DevInfo_TokenMemo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MusicSpotRequest_DevInfo_TokenMemo) ProtoMessage() {} + +func (x *MusicSpotRequest_DevInfo_TokenMemo) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_music_spot_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MusicSpotRequest_DevInfo_TokenMemo.ProtoReflect.Descriptor instead. +func (*MusicSpotRequest_DevInfo_TokenMemo) Descriptor() ([]byte, []int) { + return file_pkg_proto_music_spot_proto_rawDescGZIP(), []int{0, 1, 0} +} + +func (x *MusicSpotRequest_DevInfo_TokenMemo) GetAccessToken() string { + if x != nil { + return x.AccessToken + } + return "" +} + +func (x *MusicSpotRequest_DevInfo_TokenMemo) GetDeviceId() string { + if x != nil { + return x.DeviceId + } + return "" +} + +func (x *MusicSpotRequest_DevInfo_TokenMemo) GetClientId() string { + if x != nil { + return x.ClientId + } + return "" +} + +func (x *MusicSpotRequest_DevInfo_TokenMemo) GetProductId() string { + if x != nil { + return x.ProductId + } + return "" +} + +func (x *MusicSpotRequest_DevInfo_TokenMemo) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + type MusicSpotRequest_Data_Command struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -355,7 +442,7 @@ type MusicSpotRequest_Data_Command struct { func (x *MusicSpotRequest_Data_Command) Reset() { *x = MusicSpotRequest_Data_Command{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_proto_music_spot_proto_msgTypes[5] + mi := &file_pkg_proto_music_spot_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -368,7 +455,7 @@ func (x *MusicSpotRequest_Data_Command) String() string { func (*MusicSpotRequest_Data_Command) ProtoMessage() {} func (x *MusicSpotRequest_Data_Command) ProtoReflect() protoreflect.Message { - mi := &file_pkg_proto_music_spot_proto_msgTypes[5] + mi := &file_pkg_proto_music_spot_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -410,7 +497,7 @@ type MusicSpotResponse_Status struct { func (x *MusicSpotResponse_Status) Reset() { *x = MusicSpotResponse_Status{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_proto_music_spot_proto_msgTypes[7] + mi := &file_pkg_proto_music_spot_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -423,7 +510,7 @@ func (x *MusicSpotResponse_Status) String() string { func (*MusicSpotResponse_Status) ProtoMessage() {} func (x *MusicSpotResponse_Status) ProtoReflect() protoreflect.Message { - mi := &file_pkg_proto_music_spot_proto_msgTypes[7] + mi := &file_pkg_proto_music_spot_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -467,7 +554,7 @@ type MusicSpotResponse_SourceItem struct { func (x *MusicSpotResponse_SourceItem) Reset() { *x = MusicSpotResponse_SourceItem{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_proto_music_spot_proto_msgTypes[8] + mi := &file_pkg_proto_music_spot_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -480,7 +567,7 @@ func (x *MusicSpotResponse_SourceItem) String() string { func (*MusicSpotResponse_SourceItem) ProtoMessage() {} func (x *MusicSpotResponse_SourceItem) ProtoReflect() protoreflect.Message { - mi := &file_pkg_proto_music_spot_proto_msgTypes[8] + mi := &file_pkg_proto_music_spot_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -536,7 +623,7 @@ type MusicSpotResponse_Data struct { func (x *MusicSpotResponse_Data) Reset() { *x = MusicSpotResponse_Data{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_proto_music_spot_proto_msgTypes[9] + mi := &file_pkg_proto_music_spot_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -549,7 +636,7 @@ func (x *MusicSpotResponse_Data) String() string { func (*MusicSpotResponse_Data) ProtoMessage() {} func (x *MusicSpotResponse_Data) ProtoReflect() protoreflect.Message { - mi := &file_pkg_proto_music_spot_proto_msgTypes[9] + mi := &file_pkg_proto_music_spot_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -584,7 +671,7 @@ var File_pkg_proto_music_spot_proto protoreflect.FileDescriptor var file_pkg_proto_music_spot_proto_rawDesc = []byte{ 0x0a, 0x1a, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x2d, 0x73, 0x70, 0x6f, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x99, 0x05, 0x0a, 0x10, 0x4d, 0x75, 0x73, 0x69, 0x63, 0x53, 0x70, 0x6f, + 0x6f, 0x74, 0x6f, 0x22, 0xfe, 0x06, 0x0a, 0x10, 0x4d, 0x75, 0x73, 0x69, 0x63, 0x53, 0x70, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x07, 0x61, 0x70, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4d, 0x75, 0x73, 0x69, 0x63, 0x53, 0x70, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, @@ -598,7 +685,7 @@ var file_pkg_proto_music_spot_proto_rawDesc = []byte{ 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x27, 0x0a, 0x07, 0x41, 0x70, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x1a, 0x9f, 0x01, 0x0a, 0x07, 0x44, 0x65, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x1a, 0x84, 0x03, 0x0a, 0x07, 0x44, 0x65, 0x76, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x61, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x61, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x75, 0x62, 0x4d, 0x61, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x75, 0x62, 0x4d, 0x61, 0x63, 0x12, @@ -608,56 +695,70 @@ var file_pkg_proto_music_spot_proto_rawDesc = []byte{ 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x68, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x6f, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x6f, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x1a, 0x91, 0x02, 0x0a, 0x04, - 0x44, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, - 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, - 0x12, 0x3e, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x24, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4d, 0x75, 0x73, 0x69, 0x63, 0x53, - 0x70, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, - 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, - 0x1a, 0x9c, 0x01, 0x0a, 0x07, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x03, - 0x61, 0x70, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x61, 0x70, 0x69, 0x12, 0x45, - 0x0a, 0x05, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x08, 0x61, + 0x75, 0x74, 0x68, 0x44, 0x61, 0x74, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4d, 0x75, 0x73, 0x69, 0x63, 0x53, 0x70, 0x6f, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, - 0x61, 0x6e, 0x64, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x1a, 0x38, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, - 0x88, 0x03, 0x0a, 0x11, 0x4d, 0x75, 0x73, 0x69, 0x63, 0x53, 0x70, 0x6f, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4d, 0x75, - 0x73, 0x69, 0x63, 0x53, 0x70, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x31, - 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x44, 0x65, 0x76, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x08, 0x61, 0x75, 0x74, 0x68, 0x44, 0x61, + 0x74, 0x61, 0x1a, 0x9b, 0x01, 0x0a, 0x09, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x4d, 0x65, 0x6d, 0x6f, + 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1a, + 0x0a, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, + 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, + 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x1a, 0x91, 0x02, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x3e, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4d, + 0x75, 0x73, 0x69, 0x63, 0x53, 0x70, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, + 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x07, 0x63, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x1a, 0x9c, 0x01, 0x0a, 0x07, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, + 0x64, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x70, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x61, 0x70, 0x69, 0x12, 0x45, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4d, 0x75, 0x73, 0x69, 0x63, + 0x53, 0x70, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x44, 0x61, 0x74, 0x61, + 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x05, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x1a, 0x38, 0x0a, 0x0a, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0x88, 0x03, 0x0a, 0x11, 0x4d, 0x75, 0x73, 0x69, 0x63, 0x53, 0x70, + 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x4d, 0x75, 0x73, 0x69, 0x63, 0x53, 0x70, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x31, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4d, 0x75, 0x73, 0x69, 0x63, 0x53, + 0x70, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x61, + 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x2e, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, + 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x1a, 0x68, 0x0a, 0x0a, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x49, 0x74, 0x65, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x49, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x49, 0x64, 0x12, 0x16, + 0x0a, 0x06, 0x73, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x73, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6f, 0x6e, 0x67, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x6f, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, + 0x62, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x62, 0x75, 0x6d, + 0x1a, 0x6d, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x12, 0x41, 0x0a, 0x09, 0x6c, 0x69, 0x73, 0x74, + 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x4d, 0x75, 0x73, 0x69, 0x63, 0x53, 0x70, 0x6f, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x74, 0x65, 0x6d, + 0x52, 0x09, 0x6c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x65, 0x78, 0x74, 0x32, + 0x4e, 0x0a, 0x09, 0x4d, 0x75, 0x73, 0x69, 0x63, 0x53, 0x70, 0x6f, 0x74, 0x12, 0x41, 0x0a, 0x0c, + 0x47, 0x65, 0x74, 0x4d, 0x75, 0x73, 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4d, 0x75, 0x73, 0x69, 0x63, 0x53, 0x70, 0x6f, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, - 0x61, 0x1a, 0x2e, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, - 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, - 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, - 0x67, 0x1a, 0x68, 0x0a, 0x0a, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x12, - 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x6e, - 0x67, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x69, 0x6e, 0x67, 0x65, - 0x72, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6f, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x73, 0x6f, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x62, 0x75, 0x6d, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x62, 0x75, 0x6d, 0x1a, 0x6d, 0x0a, 0x04, 0x44, - 0x61, 0x74, 0x61, 0x12, 0x41, 0x0a, 0x09, 0x6c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4d, - 0x75, 0x73, 0x69, 0x63, 0x53, 0x70, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x09, 0x6c, 0x69, 0x73, - 0x74, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x54, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x65, 0x78, 0x74, 0x32, 0x4e, 0x0a, 0x09, 0x4d, 0x75, - 0x73, 0x69, 0x63, 0x53, 0x70, 0x6f, 0x74, 0x12, 0x41, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x4d, 0x75, - 0x73, 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x4d, 0x75, 0x73, 0x69, 0x63, 0x53, 0x70, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4d, 0x75, 0x73, 0x69, 0x63, 0x53, 0x70, - 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x13, 0x5a, 0x11, 0x2e, 0x2f, - 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4d, 0x75, + 0x73, 0x69, 0x63, 0x53, 0x70, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, + 0x13, 0x5a, 0x11, 0x2e, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -672,35 +773,37 @@ func file_pkg_proto_music_spot_proto_rawDescGZIP() []byte { return file_pkg_proto_music_spot_proto_rawDescData } -var file_pkg_proto_music_spot_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_pkg_proto_music_spot_proto_msgTypes = make([]protoimpl.MessageInfo, 11) var file_pkg_proto_music_spot_proto_goTypes = []interface{}{ - (*MusicSpotRequest)(nil), // 0: proto.MusicSpotRequest - (*MusicSpotResponse)(nil), // 1: proto.MusicSpotResponse - (*MusicSpotRequest_AppInfo)(nil), // 2: proto.MusicSpotRequest.AppInfo - (*MusicSpotRequest_DevInfo)(nil), // 3: proto.MusicSpotRequest.DevInfo - (*MusicSpotRequest_Data)(nil), // 4: proto.MusicSpotRequest.Data - (*MusicSpotRequest_Data_Command)(nil), // 5: proto.MusicSpotRequest.Data.Command - nil, // 6: proto.MusicSpotRequest.Data.Command.ParamEntry - (*MusicSpotResponse_Status)(nil), // 7: proto.MusicSpotResponse.Status - (*MusicSpotResponse_SourceItem)(nil), // 8: proto.MusicSpotResponse.SourceItem - (*MusicSpotResponse_Data)(nil), // 9: proto.MusicSpotResponse.Data + (*MusicSpotRequest)(nil), // 0: proto.MusicSpotRequest + (*MusicSpotResponse)(nil), // 1: proto.MusicSpotResponse + (*MusicSpotRequest_AppInfo)(nil), // 2: proto.MusicSpotRequest.AppInfo + (*MusicSpotRequest_DevInfo)(nil), // 3: proto.MusicSpotRequest.DevInfo + (*MusicSpotRequest_Data)(nil), // 4: proto.MusicSpotRequest.Data + (*MusicSpotRequest_DevInfo_TokenMemo)(nil), // 5: proto.MusicSpotRequest.DevInfo.TokenMemo + (*MusicSpotRequest_Data_Command)(nil), // 6: proto.MusicSpotRequest.Data.Command + nil, // 7: proto.MusicSpotRequest.Data.Command.ParamEntry + (*MusicSpotResponse_Status)(nil), // 8: proto.MusicSpotResponse.Status + (*MusicSpotResponse_SourceItem)(nil), // 9: proto.MusicSpotResponse.SourceItem + (*MusicSpotResponse_Data)(nil), // 10: proto.MusicSpotResponse.Data } var file_pkg_proto_music_spot_proto_depIdxs = []int32{ - 2, // 0: proto.MusicSpotRequest.appInfo:type_name -> proto.MusicSpotRequest.AppInfo - 3, // 1: proto.MusicSpotRequest.devInfo:type_name -> proto.MusicSpotRequest.DevInfo - 4, // 2: proto.MusicSpotRequest.data:type_name -> proto.MusicSpotRequest.Data - 7, // 3: proto.MusicSpotResponse.status:type_name -> proto.MusicSpotResponse.Status - 9, // 4: proto.MusicSpotResponse.data:type_name -> proto.MusicSpotResponse.Data - 5, // 5: proto.MusicSpotRequest.Data.command:type_name -> proto.MusicSpotRequest.Data.Command - 6, // 6: proto.MusicSpotRequest.Data.Command.param:type_name -> proto.MusicSpotRequest.Data.Command.ParamEntry - 8, // 7: proto.MusicSpotResponse.Data.listItems:type_name -> proto.MusicSpotResponse.SourceItem - 0, // 8: proto.MusicSpot.GetMusicList:input_type -> proto.MusicSpotRequest - 1, // 9: proto.MusicSpot.GetMusicList:output_type -> proto.MusicSpotResponse - 9, // [9:10] is the sub-list for method output_type - 8, // [8:9] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 2, // 0: proto.MusicSpotRequest.appInfo:type_name -> proto.MusicSpotRequest.AppInfo + 3, // 1: proto.MusicSpotRequest.devInfo:type_name -> proto.MusicSpotRequest.DevInfo + 4, // 2: proto.MusicSpotRequest.data:type_name -> proto.MusicSpotRequest.Data + 8, // 3: proto.MusicSpotResponse.status:type_name -> proto.MusicSpotResponse.Status + 10, // 4: proto.MusicSpotResponse.data:type_name -> proto.MusicSpotResponse.Data + 5, // 5: proto.MusicSpotRequest.DevInfo.authData:type_name -> proto.MusicSpotRequest.DevInfo.TokenMemo + 6, // 6: proto.MusicSpotRequest.Data.command:type_name -> proto.MusicSpotRequest.Data.Command + 7, // 7: proto.MusicSpotRequest.Data.Command.param:type_name -> proto.MusicSpotRequest.Data.Command.ParamEntry + 9, // 8: proto.MusicSpotResponse.Data.listItems:type_name -> proto.MusicSpotResponse.SourceItem + 0, // 9: proto.MusicSpot.GetMusicList:input_type -> proto.MusicSpotRequest + 1, // 10: proto.MusicSpot.GetMusicList:output_type -> proto.MusicSpotResponse + 10, // [10:11] is the sub-list for method output_type + 9, // [9:10] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name } func init() { file_pkg_proto_music_spot_proto_init() } @@ -770,6 +873,18 @@ func file_pkg_proto_music_spot_proto_init() { } } file_pkg_proto_music_spot_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MusicSpotRequest_DevInfo_TokenMemo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_music_spot_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MusicSpotRequest_Data_Command); i { case 0: return &v.state @@ -781,7 +896,7 @@ func file_pkg_proto_music_spot_proto_init() { return nil } } - file_pkg_proto_music_spot_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_pkg_proto_music_spot_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MusicSpotResponse_Status); i { case 0: return &v.state @@ -793,7 +908,7 @@ func file_pkg_proto_music_spot_proto_init() { return nil } } - file_pkg_proto_music_spot_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_pkg_proto_music_spot_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MusicSpotResponse_SourceItem); i { case 0: return &v.state @@ -805,7 +920,7 @@ func file_pkg_proto_music_spot_proto_init() { return nil } } - file_pkg_proto_music_spot_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_pkg_proto_music_spot_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MusicSpotResponse_Data); i { case 0: return &v.state @@ -824,7 +939,7 @@ func file_pkg_proto_music_spot_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pkg_proto_music_spot_proto_rawDesc, NumEnums: 0, - NumMessages: 10, + NumMessages: 11, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/proto/music-spot.proto b/pkg/proto/music-spot.proto index b9a33c76c0a4626ba2815574f61fcbdfa109d35e..8926de9d6cd21116de8003c52fdd0af2ad5f94a5 100644 --- a/pkg/proto/music-spot.proto +++ b/pkg/proto/music-spot.proto @@ -18,6 +18,16 @@ message MusicSpotRequest { string homeId = 6; // 设备所属家庭id string userId = 7; // 用户id + + message TokenMemo { + string accessToken = 1; + string deviceId = 2; + string clientId = 3; + string productId = 4; + + int32 status = 5; + } + TokenMemo authData = 8; //授权信息 } AppInfo appInfo = 1; DevInfo devInfo = 2; diff --git a/pkg/proto/service.pb.go b/pkg/proto/service.pb.go index f009982e6ada4db22777d6df29ba6d214beea865..fb9bc82ec78ea71cdbe98501ec5a816ba8bb4f12 100644 --- a/pkg/proto/service.pb.go +++ b/pkg/proto/service.pb.go @@ -1,17 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.30.0 +// protoc v4.25.1 // source: pkg/proto/service.proto package proto import ( - context "context" - proto "github.com/golang/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -25,10 +20,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Status struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -560,166 +551,6 @@ func (x *SemanticData) GetSemanticRespJsonData() string { return "" } -type TokenSearchRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Mac string `protobuf:"bytes,1,opt,name=mac,proto3" json:"mac,omitempty"` - RequestId string `protobuf:"bytes,2,opt,name=requestId,proto3" json:"requestId,omitempty"` - Mid string `protobuf:"bytes,3,opt,name=mid,proto3" json:"mid,omitempty"` // mid - Vender string `protobuf:"bytes,4,opt,name=vender,proto3" json:"vender,omitempty"` // 细分码,用于设备没授权的情况下给默认boot - HomeId string `protobuf:"bytes,5,opt,name=homeId,proto3" json:"homeId,omitempty"` // 设备所属家庭id - UserId string `protobuf:"bytes,6,opt,name=userId,proto3" json:"userId,omitempty"` // 用户id -} - -func (x *TokenSearchRequest) Reset() { - *x = TokenSearchRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_proto_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TokenSearchRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TokenSearchRequest) ProtoMessage() {} - -func (x *TokenSearchRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_proto_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TokenSearchRequest.ProtoReflect.Descriptor instead. -func (*TokenSearchRequest) Descriptor() ([]byte, []int) { - return file_pkg_proto_service_proto_rawDescGZIP(), []int{6} -} - -func (x *TokenSearchRequest) GetMac() string { - if x != nil { - return x.Mac - } - return "" -} - -func (x *TokenSearchRequest) GetRequestId() string { - if x != nil { - return x.RequestId - } - return "" -} - -func (x *TokenSearchRequest) GetMid() string { - if x != nil { - return x.Mid - } - return "" -} - -func (x *TokenSearchRequest) GetVender() string { - if x != nil { - return x.Vender - } - return "" -} - -func (x *TokenSearchRequest) GetHomeId() string { - if x != nil { - return x.HomeId - } - return "" -} - -func (x *TokenSearchRequest) GetUserId() string { - if x != nil { - return x.UserId - } - return "" -} - -// -//data.uriType 取值说明: -//QQMusic = 0 // qq音乐 -//KugouMusic = 1 // 酷狗音乐 -// -//data.status 取值说明: -//Unassigned = 0 //未分配 没有AppKey 没有token -//Assigned = 1 //已分配 -//Using = 2 //已授权,使用中 -//Expired = 3 //过期 -//Invalidation = 4 //异常失效 -//Unbind = 5 //解除绑定 -// -//status.code -//200 成功 -//401 激活错误 -//403 参数格式 -//405 设备为激活 -type TokenSearchResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Status *TokenSearchResponse_Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` - Data *TokenSearchResponse_TokenMemo `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` -} - -func (x *TokenSearchResponse) Reset() { - *x = TokenSearchResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_proto_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TokenSearchResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TokenSearchResponse) ProtoMessage() {} - -func (x *TokenSearchResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_proto_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TokenSearchResponse.ProtoReflect.Descriptor instead. -func (*TokenSearchResponse) Descriptor() ([]byte, []int) { - return file_pkg_proto_service_proto_rawDescGZIP(), []int{7} -} - -func (x *TokenSearchResponse) GetStatus() *TokenSearchResponse_Status { - if x != nil { - return x.Status - } - return nil -} - -func (x *TokenSearchResponse) GetData() *TokenSearchResponse_TokenMemo { - if x != nil { - return x.Data - } - return nil -} - type SemanticRequest_Native struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -736,7 +567,7 @@ type SemanticRequest_Native struct { func (x *SemanticRequest_Native) Reset() { *x = SemanticRequest_Native{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_proto_service_proto_msgTypes[8] + mi := &file_pkg_proto_service_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -749,7 +580,7 @@ func (x *SemanticRequest_Native) String() string { func (*SemanticRequest_Native) ProtoMessage() {} func (x *SemanticRequest_Native) ProtoReflect() protoreflect.Message { - mi := &file_pkg_proto_service_proto_msgTypes[8] + mi := &file_pkg_proto_service_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -822,7 +653,7 @@ type SemanticRequest_SDKExtend struct { func (x *SemanticRequest_SDKExtend) Reset() { *x = SemanticRequest_SDKExtend{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_proto_service_proto_msgTypes[9] + mi := &file_pkg_proto_service_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -835,7 +666,7 @@ func (x *SemanticRequest_SDKExtend) String() string { func (*SemanticRequest_SDKExtend) ProtoMessage() {} func (x *SemanticRequest_SDKExtend) ProtoReflect() protoreflect.Message { - mi := &file_pkg_proto_service_proto_msgTypes[9] + mi := &file_pkg_proto_service_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -895,7 +726,7 @@ type SemanticRequest_Native_Data struct { func (x *SemanticRequest_Native_Data) Reset() { *x = SemanticRequest_Native_Data{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_proto_service_proto_msgTypes[10] + mi := &file_pkg_proto_service_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -908,7 +739,7 @@ func (x *SemanticRequest_Native_Data) String() string { func (*SemanticRequest_Native_Data) ProtoMessage() {} func (x *SemanticRequest_Native_Data) ProtoReflect() protoreflect.Message { - mi := &file_pkg_proto_service_proto_msgTypes[10] + mi := &file_pkg_proto_service_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -924,156 +755,6 @@ func (*SemanticRequest_Native_Data) Descriptor() ([]byte, []int) { return file_pkg_proto_service_proto_rawDescGZIP(), []int{3, 0, 0} } -type TokenSearchResponse_Status struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` -} - -func (x *TokenSearchResponse_Status) Reset() { - *x = TokenSearchResponse_Status{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_proto_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TokenSearchResponse_Status) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TokenSearchResponse_Status) ProtoMessage() {} - -func (x *TokenSearchResponse_Status) ProtoReflect() protoreflect.Message { - mi := &file_pkg_proto_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TokenSearchResponse_Status.ProtoReflect.Descriptor instead. -func (*TokenSearchResponse_Status) Descriptor() ([]byte, []int) { - return file_pkg_proto_service_proto_rawDescGZIP(), []int{7, 0} -} - -func (x *TokenSearchResponse_Status) GetCode() int32 { - if x != nil { - return x.Code - } - return 0 -} - -func (x *TokenSearchResponse_Status) GetMsg() string { - if x != nil { - return x.Msg - } - return "" -} - -type TokenSearchResponse_TokenMemo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Dsn string `protobuf:"bytes,1,opt,name=dsn,proto3" json:"dsn,omitempty"` - Authorization string `protobuf:"bytes,2,opt,name=authorization,proto3" json:"authorization,omitempty"` - AccessToken string `protobuf:"bytes,3,opt,name=accessToken,proto3" json:"accessToken,omitempty"` - AppKey string `protobuf:"bytes,4,opt,name=appKey,proto3" json:"appKey,omitempty"` - Status int32 `protobuf:"varint,5,opt,name=status,proto3" json:"status,omitempty"` - UriType int32 `protobuf:"varint,6,opt,name=uriType,proto3" json:"uriType,omitempty"` - HomeId string `protobuf:"bytes,7,opt,name=homeId,proto3" json:"homeId,omitempty"` // 设备所绑定家庭的 homeid -} - -func (x *TokenSearchResponse_TokenMemo) Reset() { - *x = TokenSearchResponse_TokenMemo{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_proto_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TokenSearchResponse_TokenMemo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TokenSearchResponse_TokenMemo) ProtoMessage() {} - -func (x *TokenSearchResponse_TokenMemo) ProtoReflect() protoreflect.Message { - mi := &file_pkg_proto_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TokenSearchResponse_TokenMemo.ProtoReflect.Descriptor instead. -func (*TokenSearchResponse_TokenMemo) Descriptor() ([]byte, []int) { - return file_pkg_proto_service_proto_rawDescGZIP(), []int{7, 1} -} - -func (x *TokenSearchResponse_TokenMemo) GetDsn() string { - if x != nil { - return x.Dsn - } - return "" -} - -func (x *TokenSearchResponse_TokenMemo) GetAuthorization() string { - if x != nil { - return x.Authorization - } - return "" -} - -func (x *TokenSearchResponse_TokenMemo) GetAccessToken() string { - if x != nil { - return x.AccessToken - } - return "" -} - -func (x *TokenSearchResponse_TokenMemo) GetAppKey() string { - if x != nil { - return x.AppKey - } - return "" -} - -func (x *TokenSearchResponse_TokenMemo) GetStatus() int32 { - if x != nil { - return x.Status - } - return 0 -} - -func (x *TokenSearchResponse_TokenMemo) GetUriType() int32 { - if x != nil { - return x.UriType - } - return 0 -} - -func (x *TokenSearchResponse_TokenMemo) GetHomeId() string { - if x != nil { - return x.HomeId - } - return "" -} - var File_pkg_proto_service_proto protoreflect.FileDescriptor var file_pkg_proto_service_proto_rawDesc = []byte{ @@ -1179,59 +860,19 @@ var file_pkg_proto_service_proto_rawDesc = []byte{ 0x44, 0x61, 0x74, 0x61, 0x12, 0x32, 0x0a, 0x14, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x4a, 0x73, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, - 0x4a, 0x73, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x9e, 0x01, 0x0a, 0x12, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x10, 0x0a, 0x03, 0x6d, 0x61, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x61, - 0x63, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, - 0x10, 0x0a, 0x03, 0x6d, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x69, - 0x64, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x6f, 0x6d, - 0x65, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x6f, 0x6d, 0x65, 0x49, - 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x84, 0x03, 0x0a, 0x13, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x39, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, - 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x38, 0x0a, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x4d, 0x65, 0x6d, 0x6f, - 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x2e, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, - 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x1a, 0xc7, 0x01, 0x0a, 0x09, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x4d, 0x65, 0x6d, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x73, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x64, 0x73, 0x6e, 0x12, 0x24, 0x0a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, - 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, - 0x0a, 0x06, 0x61, 0x70, 0x70, 0x4b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x61, 0x70, 0x70, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, - 0x0a, 0x07, 0x75, 0x72, 0x69, 0x54, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x07, 0x75, 0x72, 0x69, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x6f, 0x6d, 0x65, - 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x6f, 0x6d, 0x65, 0x49, 0x64, - 0x32, 0xa2, 0x01, 0x0a, 0x0a, 0x54, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x4e, 0x6c, 0x75, 0x12, - 0x44, 0x0a, 0x0f, 0x54, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x4e, 0x6c, 0x75, 0x50, 0x61, 0x72, - 0x73, 0x65, 0x12, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, - 0x74, 0x69, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x15, 0x54, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x74, - 0x4e, 0x6c, 0x75, 0x50, 0x61, 0x72, 0x73, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x16, + 0x4a, 0x73, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x32, 0xa2, 0x01, 0x0a, 0x0a, 0x54, 0x65, 0x6e, + 0x63, 0x65, 0x6e, 0x74, 0x4e, 0x6c, 0x75, 0x12, 0x44, 0x0a, 0x0f, 0x54, 0x65, 0x6e, 0x63, 0x65, + 0x6e, 0x74, 0x4e, 0x6c, 0x75, 0x50, 0x61, 0x72, 0x73, 0x65, 0x12, 0x16, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, + 0x74, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, + 0x15, 0x54, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x4e, 0x6c, 0x75, 0x50, 0x61, 0x72, 0x73, 0x65, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, + 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, - 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x28, 0x01, 0x30, 0x01, 0x32, 0x59, 0x0a, 0x0b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x65, - 0x61, 0x72, 0x63, 0x68, 0x12, 0x4a, 0x0a, 0x11, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x65, 0x61, - 0x72, 0x63, 0x68, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x42, 0x13, 0x5a, 0x11, 0x2e, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 0x13, 0x5a, + 0x11, 0x2e, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1246,43 +887,35 @@ func file_pkg_proto_service_proto_rawDescGZIP() []byte { return file_pkg_proto_service_proto_rawDescData } -var file_pkg_proto_service_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_pkg_proto_service_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_pkg_proto_service_proto_goTypes = []interface{}{ - (*Status)(nil), // 0: proto.Status - (*SemanticRequestLbs)(nil), // 1: proto.SemanticRequestLbs - (*AddressInfo)(nil), // 2: proto.AddressInfo - (*SemanticRequest)(nil), // 3: proto.SemanticRequest - (*SemanticResponse)(nil), // 4: proto.SemanticResponse - (*SemanticData)(nil), // 5: proto.SemanticData - (*TokenSearchRequest)(nil), // 6: proto.TokenSearchRequest - (*TokenSearchResponse)(nil), // 7: proto.TokenSearchResponse - (*SemanticRequest_Native)(nil), // 8: proto.SemanticRequest.Native - (*SemanticRequest_SDKExtend)(nil), // 9: proto.SemanticRequest.SDKExtend - (*SemanticRequest_Native_Data)(nil), // 10: proto.SemanticRequest.Native.Data - (*TokenSearchResponse_Status)(nil), // 11: proto.TokenSearchResponse.Status - (*TokenSearchResponse_TokenMemo)(nil), // 12: proto.TokenSearchResponse.TokenMemo + (*Status)(nil), // 0: proto.Status + (*SemanticRequestLbs)(nil), // 1: proto.SemanticRequestLbs + (*AddressInfo)(nil), // 2: proto.AddressInfo + (*SemanticRequest)(nil), // 3: proto.SemanticRequest + (*SemanticResponse)(nil), // 4: proto.SemanticResponse + (*SemanticData)(nil), // 5: proto.SemanticData + (*SemanticRequest_Native)(nil), // 6: proto.SemanticRequest.Native + (*SemanticRequest_SDKExtend)(nil), // 7: proto.SemanticRequest.SDKExtend + (*SemanticRequest_Native_Data)(nil), // 8: proto.SemanticRequest.Native.Data } var file_pkg_proto_service_proto_depIdxs = []int32{ - 1, // 0: proto.SemanticRequest.lbs:type_name -> proto.SemanticRequestLbs - 8, // 1: proto.SemanticRequest.native:type_name -> proto.SemanticRequest.Native - 9, // 2: proto.SemanticRequest.sdkExtend:type_name -> proto.SemanticRequest.SDKExtend - 2, // 3: proto.SemanticRequest.addressInfo:type_name -> proto.AddressInfo - 0, // 4: proto.SemanticResponse.status:type_name -> proto.Status - 5, // 5: proto.SemanticResponse.data:type_name -> proto.SemanticData - 11, // 6: proto.TokenSearchResponse.status:type_name -> proto.TokenSearchResponse.Status - 12, // 7: proto.TokenSearchResponse.data:type_name -> proto.TokenSearchResponse.TokenMemo - 10, // 8: proto.SemanticRequest.Native.data:type_name -> proto.SemanticRequest.Native.Data - 3, // 9: proto.TencentNlu.TencentNluParse:input_type -> proto.SemanticRequest - 3, // 10: proto.TencentNlu.TencentNluParseStream:input_type -> proto.SemanticRequest - 6, // 11: proto.TokenSearch.TokenSearchHandle:input_type -> proto.TokenSearchRequest - 4, // 12: proto.TencentNlu.TencentNluParse:output_type -> proto.SemanticResponse - 4, // 13: proto.TencentNlu.TencentNluParseStream:output_type -> proto.SemanticResponse - 7, // 14: proto.TokenSearch.TokenSearchHandle:output_type -> proto.TokenSearchResponse - 12, // [12:15] is the sub-list for method output_type - 9, // [9:12] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name + 1, // 0: proto.SemanticRequest.lbs:type_name -> proto.SemanticRequestLbs + 6, // 1: proto.SemanticRequest.native:type_name -> proto.SemanticRequest.Native + 7, // 2: proto.SemanticRequest.sdkExtend:type_name -> proto.SemanticRequest.SDKExtend + 2, // 3: proto.SemanticRequest.addressInfo:type_name -> proto.AddressInfo + 0, // 4: proto.SemanticResponse.status:type_name -> proto.Status + 5, // 5: proto.SemanticResponse.data:type_name -> proto.SemanticData + 8, // 6: proto.SemanticRequest.Native.data:type_name -> proto.SemanticRequest.Native.Data + 3, // 7: proto.TencentNlu.TencentNluParse:input_type -> proto.SemanticRequest + 3, // 8: proto.TencentNlu.TencentNluParseStream:input_type -> proto.SemanticRequest + 4, // 9: proto.TencentNlu.TencentNluParse:output_type -> proto.SemanticResponse + 4, // 10: proto.TencentNlu.TencentNluParseStream:output_type -> proto.SemanticResponse + 9, // [9:11] is the sub-list for method output_type + 7, // [7:9] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_pkg_proto_service_proto_init() } @@ -1364,30 +997,6 @@ func file_pkg_proto_service_proto_init() { } } file_pkg_proto_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TokenSearchRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_proto_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TokenSearchResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_proto_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SemanticRequest_Native); i { case 0: return &v.state @@ -1399,7 +1008,7 @@ func file_pkg_proto_service_proto_init() { return nil } } - file_pkg_proto_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_pkg_proto_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SemanticRequest_SDKExtend); i { case 0: return &v.state @@ -1411,7 +1020,7 @@ func file_pkg_proto_service_proto_init() { return nil } } - file_pkg_proto_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_pkg_proto_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SemanticRequest_Native_Data); i { case 0: return &v.state @@ -1423,30 +1032,6 @@ func file_pkg_proto_service_proto_init() { return nil } } - file_pkg_proto_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TokenSearchResponse_Status); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_proto_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TokenSearchResponse_TokenMemo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } type x struct{} out := protoimpl.TypeBuilder{ @@ -1454,9 +1039,9 @@ func file_pkg_proto_service_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pkg_proto_service_proto_rawDesc, NumEnums: 0, - NumMessages: 13, + NumMessages: 9, NumExtensions: 0, - NumServices: 2, + NumServices: 1, }, GoTypes: file_pkg_proto_service_proto_goTypes, DependencyIndexes: file_pkg_proto_service_proto_depIdxs, @@ -1467,224 +1052,3 @@ func file_pkg_proto_service_proto_init() { file_pkg_proto_service_proto_goTypes = nil file_pkg_proto_service_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// TencentNluClient is the client API for TencentNlu service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type TencentNluClient interface { - TencentNluParse(ctx context.Context, in *SemanticRequest, opts ...grpc.CallOption) (*SemanticResponse, error) - TencentNluParseStream(ctx context.Context, opts ...grpc.CallOption) (TencentNlu_TencentNluParseStreamClient, error) -} - -type tencentNluClient struct { - cc grpc.ClientConnInterface -} - -func NewTencentNluClient(cc grpc.ClientConnInterface) TencentNluClient { - return &tencentNluClient{cc} -} - -func (c *tencentNluClient) TencentNluParse(ctx context.Context, in *SemanticRequest, opts ...grpc.CallOption) (*SemanticResponse, error) { - out := new(SemanticResponse) - err := c.cc.Invoke(ctx, "/proto.TencentNlu/TencentNluParse", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *tencentNluClient) TencentNluParseStream(ctx context.Context, opts ...grpc.CallOption) (TencentNlu_TencentNluParseStreamClient, error) { - stream, err := c.cc.NewStream(ctx, &_TencentNlu_serviceDesc.Streams[0], "/proto.TencentNlu/TencentNluParseStream", opts...) - if err != nil { - return nil, err - } - x := &tencentNluTencentNluParseStreamClient{stream} - return x, nil -} - -type TencentNlu_TencentNluParseStreamClient interface { - Send(*SemanticRequest) error - Recv() (*SemanticResponse, error) - grpc.ClientStream -} - -type tencentNluTencentNluParseStreamClient struct { - grpc.ClientStream -} - -func (x *tencentNluTencentNluParseStreamClient) Send(m *SemanticRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *tencentNluTencentNluParseStreamClient) Recv() (*SemanticResponse, error) { - m := new(SemanticResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// TencentNluServer is the server API for TencentNlu service. -type TencentNluServer interface { - TencentNluParse(context.Context, *SemanticRequest) (*SemanticResponse, error) - TencentNluParseStream(TencentNlu_TencentNluParseStreamServer) error -} - -// UnimplementedTencentNluServer can be embedded to have forward compatible implementations. -type UnimplementedTencentNluServer struct { -} - -func (*UnimplementedTencentNluServer) TencentNluParse(context.Context, *SemanticRequest) (*SemanticResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method TencentNluParse not implemented") -} -func (*UnimplementedTencentNluServer) TencentNluParseStream(TencentNlu_TencentNluParseStreamServer) error { - return status.Errorf(codes.Unimplemented, "method TencentNluParseStream not implemented") -} - -func RegisterTencentNluServer(s *grpc.Server, srv TencentNluServer) { - s.RegisterService(&_TencentNlu_serviceDesc, srv) -} - -func _TencentNlu_TencentNluParse_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SemanticRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TencentNluServer).TencentNluParse(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/proto.TencentNlu/TencentNluParse", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TencentNluServer).TencentNluParse(ctx, req.(*SemanticRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TencentNlu_TencentNluParseStream_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(TencentNluServer).TencentNluParseStream(&tencentNluTencentNluParseStreamServer{stream}) -} - -type TencentNlu_TencentNluParseStreamServer interface { - Send(*SemanticResponse) error - Recv() (*SemanticRequest, error) - grpc.ServerStream -} - -type tencentNluTencentNluParseStreamServer struct { - grpc.ServerStream -} - -func (x *tencentNluTencentNluParseStreamServer) Send(m *SemanticResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *tencentNluTencentNluParseStreamServer) Recv() (*SemanticRequest, error) { - m := new(SemanticRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -var _TencentNlu_serviceDesc = grpc.ServiceDesc{ - ServiceName: "proto.TencentNlu", - HandlerType: (*TencentNluServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "TencentNluParse", - Handler: _TencentNlu_TencentNluParse_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "TencentNluParseStream", - Handler: _TencentNlu_TencentNluParseStream_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "pkg/proto/service.proto", -} - -// TokenSearchClient is the client API for TokenSearch service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type TokenSearchClient interface { - TokenSearchHandle(ctx context.Context, in *TokenSearchRequest, opts ...grpc.CallOption) (*TokenSearchResponse, error) -} - -type tokenSearchClient struct { - cc grpc.ClientConnInterface -} - -func NewTokenSearchClient(cc grpc.ClientConnInterface) TokenSearchClient { - return &tokenSearchClient{cc} -} - -func (c *tokenSearchClient) TokenSearchHandle(ctx context.Context, in *TokenSearchRequest, opts ...grpc.CallOption) (*TokenSearchResponse, error) { - out := new(TokenSearchResponse) - err := c.cc.Invoke(ctx, "/proto.TokenSearch/TokenSearchHandle", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// TokenSearchServer is the server API for TokenSearch service. -type TokenSearchServer interface { - TokenSearchHandle(context.Context, *TokenSearchRequest) (*TokenSearchResponse, error) -} - -// UnimplementedTokenSearchServer can be embedded to have forward compatible implementations. -type UnimplementedTokenSearchServer struct { -} - -func (*UnimplementedTokenSearchServer) TokenSearchHandle(context.Context, *TokenSearchRequest) (*TokenSearchResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method TokenSearchHandle not implemented") -} - -func RegisterTokenSearchServer(s *grpc.Server, srv TokenSearchServer) { - s.RegisterService(&_TokenSearch_serviceDesc, srv) -} - -func _TokenSearch_TokenSearchHandle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TokenSearchRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TokenSearchServer).TokenSearchHandle(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/proto.TokenSearch/TokenSearchHandle", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TokenSearchServer).TokenSearchHandle(ctx, req.(*TokenSearchRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _TokenSearch_serviceDesc = grpc.ServiceDesc{ - ServiceName: "proto.TokenSearch", - HandlerType: (*TokenSearchServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "TokenSearchHandle", - Handler: _TokenSearch_TokenSearchHandle_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "pkg/proto/service.proto", -} diff --git a/pkg/proto/service.proto b/pkg/proto/service.proto index 3240290efee669e05c05a66fd607a655169427e8..4f8348f253d38d5ed03671107a5fda3aff2384f1 100644 --- a/pkg/proto/service.proto +++ b/pkg/proto/service.proto @@ -82,62 +82,4 @@ message SemanticData { service TencentNlu { rpc TencentNluParse (SemanticRequest) returns (SemanticResponse) {} rpc TencentNluParseStream (stream SemanticRequest) returns (stream SemanticResponse) {} -} - -/* -################## token_search.proto ################## -查询dsn及状态信息 -*/ - -message TokenSearchRequest { - string mac = 1; - string requestId = 2; - string mid = 3; // mid - string vender = 4; // 细分码,用于设备没授权的情况下给默认boot - string homeId = 5; // 设备所属家庭id - string userId = 6; // 用户id -} - - - - /* - data.uriType 取值说明: - QQMusic = 0 // qq音乐 - KugouMusic = 1 // 酷狗音乐 - - data.status 取值说明: - Unassigned = 0 //未分配 没有AppKey 没有token - Assigned = 1 //已分配 - Using = 2 //已授权,使用中 - Expired = 3 //过期 - Invalidation = 4 //异常失效 - Unbind = 5 //解除绑定 - - status.code - 200 成功 - 401 激活错误 - 403 参数格式 - 405 设备为激活 -*/ -message TokenSearchResponse { - message Status { - int32 code = 1; - string msg = 2; - } - message TokenMemo { - string dsn = 1; - string authorization = 2; - string accessToken = 3; - string appKey = 4; - int32 status = 5; - int32 uriType = 6; - string homeId = 7; // 设备所绑定家庭的 homeid - } - - Status status = 1; - TokenMemo data = 2; -} - -service TokenSearch{ - rpc TokenSearchHandle(TokenSearchRequest) returns (TokenSearchResponse); -} +} \ No newline at end of file diff --git a/pkg/proto/service_grpc.pb.go b/pkg/proto/service_grpc.pb.go new file mode 100644 index 0000000000000000000000000000000000000000..f7f76b260142c2f72e0e7a4dcc237e9b48300408 --- /dev/null +++ b/pkg/proto/service_grpc.pb.go @@ -0,0 +1,179 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: pkg/proto/service.proto + +package proto + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + TencentNlu_TencentNluParse_FullMethodName = "/proto.TencentNlu/TencentNluParse" + TencentNlu_TencentNluParseStream_FullMethodName = "/proto.TencentNlu/TencentNluParseStream" +) + +// TencentNluClient is the client API for TencentNlu service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type TencentNluClient interface { + TencentNluParse(ctx context.Context, in *SemanticRequest, opts ...grpc.CallOption) (*SemanticResponse, error) + TencentNluParseStream(ctx context.Context, opts ...grpc.CallOption) (TencentNlu_TencentNluParseStreamClient, error) +} + +type tencentNluClient struct { + cc grpc.ClientConnInterface +} + +func NewTencentNluClient(cc grpc.ClientConnInterface) TencentNluClient { + return &tencentNluClient{cc} +} + +func (c *tencentNluClient) TencentNluParse(ctx context.Context, in *SemanticRequest, opts ...grpc.CallOption) (*SemanticResponse, error) { + out := new(SemanticResponse) + err := c.cc.Invoke(ctx, TencentNlu_TencentNluParse_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *tencentNluClient) TencentNluParseStream(ctx context.Context, opts ...grpc.CallOption) (TencentNlu_TencentNluParseStreamClient, error) { + stream, err := c.cc.NewStream(ctx, &TencentNlu_ServiceDesc.Streams[0], TencentNlu_TencentNluParseStream_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &tencentNluTencentNluParseStreamClient{stream} + return x, nil +} + +type TencentNlu_TencentNluParseStreamClient interface { + Send(*SemanticRequest) error + Recv() (*SemanticResponse, error) + grpc.ClientStream +} + +type tencentNluTencentNluParseStreamClient struct { + grpc.ClientStream +} + +func (x *tencentNluTencentNluParseStreamClient) Send(m *SemanticRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *tencentNluTencentNluParseStreamClient) Recv() (*SemanticResponse, error) { + m := new(SemanticResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// TencentNluServer is the server API for TencentNlu service. +// All implementations must embed UnimplementedTencentNluServer +// for forward compatibility +type TencentNluServer interface { + TencentNluParse(context.Context, *SemanticRequest) (*SemanticResponse, error) + TencentNluParseStream(TencentNlu_TencentNluParseStreamServer) error + mustEmbedUnimplementedTencentNluServer() +} + +// UnimplementedTencentNluServer must be embedded to have forward compatible implementations. +type UnimplementedTencentNluServer struct { +} + +func (UnimplementedTencentNluServer) TencentNluParse(context.Context, *SemanticRequest) (*SemanticResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TencentNluParse not implemented") +} +func (UnimplementedTencentNluServer) TencentNluParseStream(TencentNlu_TencentNluParseStreamServer) error { + return status.Errorf(codes.Unimplemented, "method TencentNluParseStream not implemented") +} +func (UnimplementedTencentNluServer) mustEmbedUnimplementedTencentNluServer() {} + +// UnsafeTencentNluServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to TencentNluServer will +// result in compilation errors. +type UnsafeTencentNluServer interface { + mustEmbedUnimplementedTencentNluServer() +} + +func RegisterTencentNluServer(s grpc.ServiceRegistrar, srv TencentNluServer) { + s.RegisterService(&TencentNlu_ServiceDesc, srv) +} + +func _TencentNlu_TencentNluParse_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SemanticRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TencentNluServer).TencentNluParse(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TencentNlu_TencentNluParse_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TencentNluServer).TencentNluParse(ctx, req.(*SemanticRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TencentNlu_TencentNluParseStream_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(TencentNluServer).TencentNluParseStream(&tencentNluTencentNluParseStreamServer{stream}) +} + +type TencentNlu_TencentNluParseStreamServer interface { + Send(*SemanticResponse) error + Recv() (*SemanticRequest, error) + grpc.ServerStream +} + +type tencentNluTencentNluParseStreamServer struct { + grpc.ServerStream +} + +func (x *tencentNluTencentNluParseStreamServer) Send(m *SemanticResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *tencentNluTencentNluParseStreamServer) Recv() (*SemanticRequest, error) { + m := new(SemanticRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// TencentNlu_ServiceDesc is the grpc.ServiceDesc for TencentNlu service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var TencentNlu_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "proto.TencentNlu", + HandlerType: (*TencentNluServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "TencentNluParse", + Handler: _TencentNlu_TencentNluParse_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "TencentNluParseStream", + Handler: _TencentNlu_TencentNluParseStream_Handler, + ServerStreams: true, + ClientStreams: true, + }, + }, + Metadata: "pkg/proto/service.proto", +} diff --git a/pkg/proto/token/token_search.pb.go b/pkg/proto/token/token_search.pb.go new file mode 100644 index 0000000000000000000000000000000000000000..998f1fa7aac587765c325a150dcf0175a1f99ac1 --- /dev/null +++ b/pkg/proto/token/token_search.pb.go @@ -0,0 +1,1438 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc v4.25.1 +// source: pkg/proto/v1/token_search.proto + +package token + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type AppInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RequestId string `protobuf:"bytes,1,opt,name=requestId,proto3" json:"requestId,omitempty"` +} + +func (x *AppInfo) Reset() { + *x = AppInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_v1_token_search_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppInfo) ProtoMessage() {} + +func (x *AppInfo) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_v1_token_search_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AppInfo.ProtoReflect.Descriptor instead. +func (*AppInfo) Descriptor() ([]byte, []int) { + return file_pkg_proto_v1_token_search_proto_rawDescGZIP(), []int{0} +} + +func (x *AppInfo) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +type DevInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Mac string `protobuf:"bytes,1,opt,name=mac,proto3" json:"mac,omitempty"` + SubMac string `protobuf:"bytes,2,opt,name=subMac,proto3" json:"subMac,omitempty"` // 子设备mac,中控变成了子设备 + Mid string `protobuf:"bytes,3,opt,name=mid,proto3" json:"mid,omitempty"` // mid + Vender string `protobuf:"bytes,4,opt,name=vender,proto3" json:"vender,omitempty"` // 细分码,用于设备没授权的情况下给默认boot + Hid string `protobuf:"bytes,5,opt,name=hid,proto3" json:"hid,omitempty"` // 模组id,优先级高于细分码 - 若能匹配,优先使用 + HomeId string `protobuf:"bytes,6,opt,name=homeId,proto3" json:"homeId,omitempty"` // 设备所属家庭 id + UserId string `protobuf:"bytes,7,opt,name=userId,proto3" json:"userId,omitempty"` // 用户id,非必传 +} + +func (x *DevInfo) Reset() { + *x = DevInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_v1_token_search_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DevInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DevInfo) ProtoMessage() {} + +func (x *DevInfo) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_v1_token_search_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DevInfo.ProtoReflect.Descriptor instead. +func (*DevInfo) Descriptor() ([]byte, []int) { + return file_pkg_proto_v1_token_search_proto_rawDescGZIP(), []int{1} +} + +func (x *DevInfo) GetMac() string { + if x != nil { + return x.Mac + } + return "" +} + +func (x *DevInfo) GetSubMac() string { + if x != nil { + return x.SubMac + } + return "" +} + +func (x *DevInfo) GetMid() string { + if x != nil { + return x.Mid + } + return "" +} + +func (x *DevInfo) GetVender() string { + if x != nil { + return x.Vender + } + return "" +} + +func (x *DevInfo) GetHid() string { + if x != nil { + return x.Hid + } + return "" +} + +func (x *DevInfo) GetHomeId() string { + if x != nil { + return x.HomeId + } + return "" +} + +func (x *DevInfo) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +type TokenSearchRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Mac string `protobuf:"bytes,1,opt,name=mac,proto3" json:"mac,omitempty"` + RequestId string `protobuf:"bytes,2,opt,name=requestId,proto3" json:"requestId,omitempty"` + Mid string `protobuf:"bytes,3,opt,name=mid,proto3" json:"mid,omitempty"` // mid + Vender string `protobuf:"bytes,4,opt,name=vender,proto3" json:"vender,omitempty"` // 细分码,用于设备没授权的情况下给默认boot + HomeId string `protobuf:"bytes,5,opt,name=homeId,proto3" json:"homeId,omitempty"` // 设备所属家庭id + UserId string `protobuf:"bytes,6,opt,name=userId,proto3" json:"userId,omitempty"` // 用户id + SubMac string `protobuf:"bytes,7,opt,name=subMac,proto3" json:"subMac,omitempty"` // 子设备mac,中控变成了子设备 + Hid string `protobuf:"bytes,8,opt,name=hid,proto3" json:"hid,omitempty"` // 模组id,优先级高于细分码 - 若能匹配,优先使用 + IsReBind bool `protobuf:"varint,9,opt,name=isReBind,proto3" json:"isReBind,omitempty"` //是否强制重新绑定 +} + +func (x *TokenSearchRequest) Reset() { + *x = TokenSearchRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_v1_token_search_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TokenSearchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TokenSearchRequest) ProtoMessage() {} + +func (x *TokenSearchRequest) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_v1_token_search_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TokenSearchRequest.ProtoReflect.Descriptor instead. +func (*TokenSearchRequest) Descriptor() ([]byte, []int) { + return file_pkg_proto_v1_token_search_proto_rawDescGZIP(), []int{2} +} + +func (x *TokenSearchRequest) GetMac() string { + if x != nil { + return x.Mac + } + return "" +} + +func (x *TokenSearchRequest) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +func (x *TokenSearchRequest) GetMid() string { + if x != nil { + return x.Mid + } + return "" +} + +func (x *TokenSearchRequest) GetVender() string { + if x != nil { + return x.Vender + } + return "" +} + +func (x *TokenSearchRequest) GetHomeId() string { + if x != nil { + return x.HomeId + } + return "" +} + +func (x *TokenSearchRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *TokenSearchRequest) GetSubMac() string { + if x != nil { + return x.SubMac + } + return "" +} + +func (x *TokenSearchRequest) GetHid() string { + if x != nil { + return x.Hid + } + return "" +} + +func (x *TokenSearchRequest) GetIsReBind() bool { + if x != nil { + return x.IsReBind + } + return false +} + +// data.uriType 取值说明: +// QQMusic = 0 // qq音乐(腾讯v1) +// QQMusicV2 = 1 // qq音乐(腾讯v2) +// +// data.status 取值说明: +// Unassigned = 0 //未分配 +// Assigned = 1 //已分配 +// Using = 2 //已授权,使用中 +// Expired = 3 //过期 +// Invalidation = 4 //异常失效 +// Unbind = 5 //解除绑定 +type TokenSearchResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status *TokenSearchResponse_Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Data *TokenSearchResponse_TokenMemo `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *TokenSearchResponse) Reset() { + *x = TokenSearchResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_v1_token_search_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TokenSearchResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TokenSearchResponse) ProtoMessage() {} + +func (x *TokenSearchResponse) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_v1_token_search_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TokenSearchResponse.ProtoReflect.Descriptor instead. +func (*TokenSearchResponse) Descriptor() ([]byte, []int) { + return file_pkg_proto_v1_token_search_proto_rawDescGZIP(), []int{3} +} + +func (x *TokenSearchResponse) GetStatus() *TokenSearchResponse_Status { + if x != nil { + return x.Status + } + return nil +} + +func (x *TokenSearchResponse) GetData() *TokenSearchResponse_TokenMemo { + if x != nil { + return x.Data + } + return nil +} + +type DevMusicStatusChangeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status *DevMusicStatusChangeResponse_Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *DevMusicStatusChangeResponse) Reset() { + *x = DevMusicStatusChangeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_v1_token_search_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DevMusicStatusChangeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DevMusicStatusChangeResponse) ProtoMessage() {} + +func (x *DevMusicStatusChangeResponse) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_v1_token_search_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DevMusicStatusChangeResponse.ProtoReflect.Descriptor instead. +func (*DevMusicStatusChangeResponse) Descriptor() ([]byte, []int) { + return file_pkg_proto_v1_token_search_proto_rawDescGZIP(), []int{4} +} + +func (x *DevMusicStatusChangeResponse) GetStatus() *DevMusicStatusChangeResponse_Status { + if x != nil { + return x.Status + } + return nil +} + +type TokenSearchRequestV2 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AppInfo *AppInfo `protobuf:"bytes,1,opt,name=appInfo,proto3" json:"appInfo,omitempty"` + DevInfo *DevInfo `protobuf:"bytes,2,opt,name=devInfo,proto3" json:"devInfo,omitempty"` + IsReBind bool `protobuf:"varint,9,opt,name=isReBind,proto3" json:"isReBind,omitempty"` //是否强制重新绑定 +} + +func (x *TokenSearchRequestV2) Reset() { + *x = TokenSearchRequestV2{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_v1_token_search_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TokenSearchRequestV2) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TokenSearchRequestV2) ProtoMessage() {} + +func (x *TokenSearchRequestV2) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_v1_token_search_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TokenSearchRequestV2.ProtoReflect.Descriptor instead. +func (*TokenSearchRequestV2) Descriptor() ([]byte, []int) { + return file_pkg_proto_v1_token_search_proto_rawDescGZIP(), []int{5} +} + +func (x *TokenSearchRequestV2) GetAppInfo() *AppInfo { + if x != nil { + return x.AppInfo + } + return nil +} + +func (x *TokenSearchRequestV2) GetDevInfo() *DevInfo { + if x != nil { + return x.DevInfo + } + return nil +} + +func (x *TokenSearchRequestV2) GetIsReBind() bool { + if x != nil { + return x.IsReBind + } + return false +} + +type SpeechConfResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status *SpeechConfResponse_Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Data *SpeechConfResponse_Data `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *SpeechConfResponse) Reset() { + *x = SpeechConfResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_v1_token_search_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SpeechConfResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SpeechConfResponse) ProtoMessage() {} + +func (x *SpeechConfResponse) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_v1_token_search_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SpeechConfResponse.ProtoReflect.Descriptor instead. +func (*SpeechConfResponse) Descriptor() ([]byte, []int) { + return file_pkg_proto_v1_token_search_proto_rawDescGZIP(), []int{6} +} + +func (x *SpeechConfResponse) GetStatus() *SpeechConfResponse_Status { + if x != nil { + return x.Status + } + return nil +} + +func (x *SpeechConfResponse) GetData() *SpeechConfResponse_Data { + if x != nil { + return x.Data + } + return nil +} + +type TokenSearchResponseNetease struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status *TokenSearchResponseNetease_Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Data *TokenSearchResponseNetease_Data `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *TokenSearchResponseNetease) Reset() { + *x = TokenSearchResponseNetease{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_v1_token_search_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TokenSearchResponseNetease) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TokenSearchResponseNetease) ProtoMessage() {} + +func (x *TokenSearchResponseNetease) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_v1_token_search_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TokenSearchResponseNetease.ProtoReflect.Descriptor instead. +func (*TokenSearchResponseNetease) Descriptor() ([]byte, []int) { + return file_pkg_proto_v1_token_search_proto_rawDescGZIP(), []int{7} +} + +func (x *TokenSearchResponseNetease) GetStatus() *TokenSearchResponseNetease_Status { + if x != nil { + return x.Status + } + return nil +} + +func (x *TokenSearchResponseNetease) GetData() *TokenSearchResponseNetease_Data { + if x != nil { + return x.Data + } + return nil +} + +type TokenSearchResponse_TokenMemo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Dsn string `protobuf:"bytes,1,opt,name=dsn,proto3" json:"dsn,omitempty"` + Authorization string `protobuf:"bytes,2,opt,name=authorization,proto3" json:"authorization,omitempty"` + AccessToken string `protobuf:"bytes,3,opt,name=accessToken,proto3" json:"accessToken,omitempty"` + AppKey string `protobuf:"bytes,4,opt,name=appKey,proto3" json:"appKey,omitempty"` + Status int32 `protobuf:"varint,5,opt,name=status,proto3" json:"status,omitempty"` + UriType int32 `protobuf:"varint,6,opt,name=uriType,proto3" json:"uriType,omitempty"` + HomeId string `protobuf:"bytes,7,opt,name=homeId,proto3" json:"homeId,omitempty"` // 设备所绑定家庭的 homeid +} + +func (x *TokenSearchResponse_TokenMemo) Reset() { + *x = TokenSearchResponse_TokenMemo{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_v1_token_search_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TokenSearchResponse_TokenMemo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TokenSearchResponse_TokenMemo) ProtoMessage() {} + +func (x *TokenSearchResponse_TokenMemo) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_v1_token_search_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TokenSearchResponse_TokenMemo.ProtoReflect.Descriptor instead. +func (*TokenSearchResponse_TokenMemo) Descriptor() ([]byte, []int) { + return file_pkg_proto_v1_token_search_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *TokenSearchResponse_TokenMemo) GetDsn() string { + if x != nil { + return x.Dsn + } + return "" +} + +func (x *TokenSearchResponse_TokenMemo) GetAuthorization() string { + if x != nil { + return x.Authorization + } + return "" +} + +func (x *TokenSearchResponse_TokenMemo) GetAccessToken() string { + if x != nil { + return x.AccessToken + } + return "" +} + +func (x *TokenSearchResponse_TokenMemo) GetAppKey() string { + if x != nil { + return x.AppKey + } + return "" +} + +func (x *TokenSearchResponse_TokenMemo) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + +func (x *TokenSearchResponse_TokenMemo) GetUriType() int32 { + if x != nil { + return x.UriType + } + return 0 +} + +func (x *TokenSearchResponse_TokenMemo) GetHomeId() string { + if x != nil { + return x.HomeId + } + return "" +} + +type TokenSearchResponse_Status struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` +} + +func (x *TokenSearchResponse_Status) Reset() { + *x = TokenSearchResponse_Status{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_v1_token_search_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TokenSearchResponse_Status) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TokenSearchResponse_Status) ProtoMessage() {} + +func (x *TokenSearchResponse_Status) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_v1_token_search_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TokenSearchResponse_Status.ProtoReflect.Descriptor instead. +func (*TokenSearchResponse_Status) Descriptor() ([]byte, []int) { + return file_pkg_proto_v1_token_search_proto_rawDescGZIP(), []int{3, 1} +} + +func (x *TokenSearchResponse_Status) GetCode() int32 { + if x != nil { + return x.Code + } + return 0 +} + +func (x *TokenSearchResponse_Status) GetMsg() string { + if x != nil { + return x.Msg + } + return "" +} + +type DevMusicStatusChangeResponse_Status struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` +} + +func (x *DevMusicStatusChangeResponse_Status) Reset() { + *x = DevMusicStatusChangeResponse_Status{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_v1_token_search_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DevMusicStatusChangeResponse_Status) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DevMusicStatusChangeResponse_Status) ProtoMessage() {} + +func (x *DevMusicStatusChangeResponse_Status) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_v1_token_search_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DevMusicStatusChangeResponse_Status.ProtoReflect.Descriptor instead. +func (*DevMusicStatusChangeResponse_Status) Descriptor() ([]byte, []int) { + return file_pkg_proto_v1_token_search_proto_rawDescGZIP(), []int{4, 0} +} + +func (x *DevMusicStatusChangeResponse_Status) GetCode() int32 { + if x != nil { + return x.Code + } + return 0 +} + +func (x *DevMusicStatusChangeResponse_Status) GetMsg() string { + if x != nil { + return x.Msg + } + return "" +} + +type SpeechConfResponse_Data struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ProductId string `protobuf:"bytes,1,opt,name=productId,proto3" json:"productId,omitempty"` + Appkey string `protobuf:"bytes,2,opt,name=appkey,proto3" json:"appkey,omitempty"` +} + +func (x *SpeechConfResponse_Data) Reset() { + *x = SpeechConfResponse_Data{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_v1_token_search_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SpeechConfResponse_Data) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SpeechConfResponse_Data) ProtoMessage() {} + +func (x *SpeechConfResponse_Data) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_v1_token_search_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SpeechConfResponse_Data.ProtoReflect.Descriptor instead. +func (*SpeechConfResponse_Data) Descriptor() ([]byte, []int) { + return file_pkg_proto_v1_token_search_proto_rawDescGZIP(), []int{6, 0} +} + +func (x *SpeechConfResponse_Data) GetProductId() string { + if x != nil { + return x.ProductId + } + return "" +} + +func (x *SpeechConfResponse_Data) GetAppkey() string { + if x != nil { + return x.Appkey + } + return "" +} + +type SpeechConfResponse_Status struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` +} + +func (x *SpeechConfResponse_Status) Reset() { + *x = SpeechConfResponse_Status{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_v1_token_search_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SpeechConfResponse_Status) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SpeechConfResponse_Status) ProtoMessage() {} + +func (x *SpeechConfResponse_Status) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_v1_token_search_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SpeechConfResponse_Status.ProtoReflect.Descriptor instead. +func (*SpeechConfResponse_Status) Descriptor() ([]byte, []int) { + return file_pkg_proto_v1_token_search_proto_rawDescGZIP(), []int{6, 1} +} + +func (x *SpeechConfResponse_Status) GetCode() int32 { + if x != nil { + return x.Code + } + return 0 +} + +func (x *SpeechConfResponse_Status) GetMsg() string { + if x != nil { + return x.Msg + } + return "" +} + +type TokenSearchResponseNetease_Status struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` +} + +func (x *TokenSearchResponseNetease_Status) Reset() { + *x = TokenSearchResponseNetease_Status{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_v1_token_search_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TokenSearchResponseNetease_Status) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TokenSearchResponseNetease_Status) ProtoMessage() {} + +func (x *TokenSearchResponseNetease_Status) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_v1_token_search_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TokenSearchResponseNetease_Status.ProtoReflect.Descriptor instead. +func (*TokenSearchResponseNetease_Status) Descriptor() ([]byte, []int) { + return file_pkg_proto_v1_token_search_proto_rawDescGZIP(), []int{7, 0} +} + +func (x *TokenSearchResponseNetease_Status) GetCode() int32 { + if x != nil { + return x.Code + } + return 0 +} + +func (x *TokenSearchResponseNetease_Status) GetMsg() string { + if x != nil { + return x.Msg + } + return "" +} + +type TokenSearchResponseNetease_Data struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AccessToken string `protobuf:"bytes,1,opt,name=accessToken,proto3" json:"accessToken,omitempty"` + DeviceId string `protobuf:"bytes,2,opt,name=deviceId,proto3" json:"deviceId,omitempty"` + ClientId string `protobuf:"bytes,3,opt,name=clientId,proto3" json:"clientId,omitempty"` + ProductId string `protobuf:"bytes,4,opt,name=productId,proto3" json:"productId,omitempty"` + Status int32 `protobuf:"varint,5,opt,name=status,proto3" json:"status,omitempty"` + HomeId string `protobuf:"bytes,6,opt,name=homeId,proto3" json:"homeId,omitempty"` // 设备所绑定家庭的 homeid +} + +func (x *TokenSearchResponseNetease_Data) Reset() { + *x = TokenSearchResponseNetease_Data{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_v1_token_search_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TokenSearchResponseNetease_Data) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TokenSearchResponseNetease_Data) ProtoMessage() {} + +func (x *TokenSearchResponseNetease_Data) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_v1_token_search_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TokenSearchResponseNetease_Data.ProtoReflect.Descriptor instead. +func (*TokenSearchResponseNetease_Data) Descriptor() ([]byte, []int) { + return file_pkg_proto_v1_token_search_proto_rawDescGZIP(), []int{7, 1} +} + +func (x *TokenSearchResponseNetease_Data) GetAccessToken() string { + if x != nil { + return x.AccessToken + } + return "" +} + +func (x *TokenSearchResponseNetease_Data) GetDeviceId() string { + if x != nil { + return x.DeviceId + } + return "" +} + +func (x *TokenSearchResponseNetease_Data) GetClientId() string { + if x != nil { + return x.ClientId + } + return "" +} + +func (x *TokenSearchResponseNetease_Data) GetProductId() string { + if x != nil { + return x.ProductId + } + return "" +} + +func (x *TokenSearchResponseNetease_Data) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + +func (x *TokenSearchResponseNetease_Data) GetHomeId() string { + if x != nil { + return x.HomeId + } + return "" +} + +var File_pkg_proto_v1_token_search_proto protoreflect.FileDescriptor + +var file_pkg_proto_v1_token_search_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x31, 0x2f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x27, 0x0a, 0x07, 0x41, 0x70, 0x70, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, + 0x64, 0x22, 0x9f, 0x01, 0x0a, 0x07, 0x44, 0x65, 0x76, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, + 0x03, 0x6d, 0x61, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x61, 0x63, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x75, 0x62, 0x4d, 0x61, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x73, 0x75, 0x62, 0x4d, 0x61, 0x63, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x12, 0x10, 0x0a, 0x03, 0x68, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x68, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x6f, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x6f, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, + 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, + 0x72, 0x49, 0x64, 0x22, 0xe4, 0x01, 0x0a, 0x12, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x61, + 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x61, 0x63, 0x12, 0x1c, 0x0a, 0x09, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x69, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, + 0x76, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x76, 0x65, + 0x6e, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x6f, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x6f, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, + 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, + 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x75, 0x62, 0x4d, 0x61, 0x63, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x75, 0x62, 0x4d, 0x61, 0x63, 0x12, 0x10, 0x0a, 0x03, + 0x68, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x68, 0x69, 0x64, 0x12, 0x1a, + 0x0a, 0x08, 0x69, 0x73, 0x52, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x08, 0x69, 0x73, 0x52, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x22, 0x84, 0x03, 0x0a, 0x13, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x38, 0x0a, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x4d, 0x65, 0x6d, + 0x6f, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, 0xc7, 0x01, 0x0a, 0x09, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x4d, 0x65, 0x6d, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x73, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x64, 0x73, 0x6e, 0x12, 0x24, 0x0a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, + 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, + 0x16, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x4b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x61, 0x70, 0x70, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x18, 0x0a, 0x07, 0x75, 0x72, 0x69, 0x54, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x07, 0x75, 0x72, 0x69, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x6f, 0x6d, + 0x65, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x6f, 0x6d, 0x65, 0x49, + 0x64, 0x1a, 0x2e, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, + 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, + 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, + 0x67, 0x22, 0x92, 0x01, 0x0a, 0x1c, 0x44, 0x65, 0x76, 0x4d, 0x75, 0x73, 0x69, 0x63, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x42, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x76, 0x4d, 0x75, + 0x73, 0x69, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x1a, 0x2e, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, + 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0x86, 0x01, 0x0a, 0x14, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x32, 0x12, + 0x28, 0x0a, 0x07, 0x61, 0x70, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x70, 0x70, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x07, 0x61, 0x70, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x28, 0x0a, 0x07, 0x64, 0x65, 0x76, + 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x76, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x64, 0x65, 0x76, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x52, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x52, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x22, + 0xf0, 0x01, 0x0a, 0x12, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, + 0x70, 0x65, 0x65, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x32, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x43, 0x6f, 0x6e, + 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x1a, 0x3c, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x09, + 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x70, + 0x70, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x70, 0x70, 0x6b, + 0x65, 0x79, 0x1a, 0x2e, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, + 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, + 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, + 0x73, 0x67, 0x22, 0xfb, 0x02, 0x0a, 0x1a, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4e, 0x65, 0x74, 0x65, 0x61, 0x73, + 0x65, 0x12, 0x40, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x28, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4e, 0x65, 0x74, + 0x65, 0x61, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x3a, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x26, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4e, 0x65, 0x74, + 0x65, 0x61, 0x73, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, + 0x2e, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, + 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x1a, + 0xae, 0x01, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, + 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x6f, 0x6d, 0x65, + 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x6f, 0x6d, 0x65, 0x49, 0x64, + 0x32, 0xa7, 0x04, 0x0a, 0x0b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x12, 0x4a, 0x0a, 0x11, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x48, + 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x65, + 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x13, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x48, 0x61, 0x6e, 0x64, 0x6c, + 0x65, 0x56, 0x32, 0x12, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x07, 0x44, 0x65, + 0x76, 0x42, 0x69, 0x6e, 0x64, 0x12, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x65, + 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0c, + 0x44, 0x65, 0x76, 0x42, 0x69, 0x6e, 0x64, 0x42, 0x79, 0x53, 0x75, 0x62, 0x12, 0x19, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x14, 0x44, 0x65, 0x76, 0x4d, 0x75, 0x73, 0x69, 0x63, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x19, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, + 0x65, 0x76, 0x4d, 0x75, 0x73, 0x69, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0d, 0x47, + 0x65, 0x74, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x1b, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x32, 0x1a, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x12, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x4e, 0x65, 0x74, 0x65, 0x61, 0x73, 0x65, 0x12, 0x1b, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x32, 0x1a, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x4e, 0x65, 0x74, 0x65, 0x61, 0x73, 0x65, 0x42, 0x13, 0x5a, 0x11, 0x2e, 0x2f, + 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_pkg_proto_v1_token_search_proto_rawDescOnce sync.Once + file_pkg_proto_v1_token_search_proto_rawDescData = file_pkg_proto_v1_token_search_proto_rawDesc +) + +func file_pkg_proto_v1_token_search_proto_rawDescGZIP() []byte { + file_pkg_proto_v1_token_search_proto_rawDescOnce.Do(func() { + file_pkg_proto_v1_token_search_proto_rawDescData = protoimpl.X.CompressGZIP(file_pkg_proto_v1_token_search_proto_rawDescData) + }) + return file_pkg_proto_v1_token_search_proto_rawDescData +} + +var file_pkg_proto_v1_token_search_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_pkg_proto_v1_token_search_proto_goTypes = []interface{}{ + (*AppInfo)(nil), // 0: proto.AppInfo + (*DevInfo)(nil), // 1: proto.DevInfo + (*TokenSearchRequest)(nil), // 2: proto.TokenSearchRequest + (*TokenSearchResponse)(nil), // 3: proto.TokenSearchResponse + (*DevMusicStatusChangeResponse)(nil), // 4: proto.DevMusicStatusChangeResponse + (*TokenSearchRequestV2)(nil), // 5: proto.TokenSearchRequestV2 + (*SpeechConfResponse)(nil), // 6: proto.SpeechConfResponse + (*TokenSearchResponseNetease)(nil), // 7: proto.TokenSearchResponseNetease + (*TokenSearchResponse_TokenMemo)(nil), // 8: proto.TokenSearchResponse.TokenMemo + (*TokenSearchResponse_Status)(nil), // 9: proto.TokenSearchResponse.Status + (*DevMusicStatusChangeResponse_Status)(nil), // 10: proto.DevMusicStatusChangeResponse.Status + (*SpeechConfResponse_Data)(nil), // 11: proto.SpeechConfResponse.Data + (*SpeechConfResponse_Status)(nil), // 12: proto.SpeechConfResponse.Status + (*TokenSearchResponseNetease_Status)(nil), // 13: proto.TokenSearchResponseNetease.Status + (*TokenSearchResponseNetease_Data)(nil), // 14: proto.TokenSearchResponseNetease.Data +} +var file_pkg_proto_v1_token_search_proto_depIdxs = []int32{ + 9, // 0: proto.TokenSearchResponse.status:type_name -> proto.TokenSearchResponse.Status + 8, // 1: proto.TokenSearchResponse.data:type_name -> proto.TokenSearchResponse.TokenMemo + 10, // 2: proto.DevMusicStatusChangeResponse.status:type_name -> proto.DevMusicStatusChangeResponse.Status + 0, // 3: proto.TokenSearchRequestV2.appInfo:type_name -> proto.AppInfo + 1, // 4: proto.TokenSearchRequestV2.devInfo:type_name -> proto.DevInfo + 12, // 5: proto.SpeechConfResponse.status:type_name -> proto.SpeechConfResponse.Status + 11, // 6: proto.SpeechConfResponse.data:type_name -> proto.SpeechConfResponse.Data + 13, // 7: proto.TokenSearchResponseNetease.status:type_name -> proto.TokenSearchResponseNetease.Status + 14, // 8: proto.TokenSearchResponseNetease.data:type_name -> proto.TokenSearchResponseNetease.Data + 2, // 9: proto.TokenSearch.TokenSearchHandle:input_type -> proto.TokenSearchRequest + 2, // 10: proto.TokenSearch.TokenSearchHandleV2:input_type -> proto.TokenSearchRequest + 2, // 11: proto.TokenSearch.DevBind:input_type -> proto.TokenSearchRequest + 2, // 12: proto.TokenSearch.DevBindBySub:input_type -> proto.TokenSearchRequest + 2, // 13: proto.TokenSearch.DevMusicStatusChange:input_type -> proto.TokenSearchRequest + 5, // 14: proto.TokenSearch.GetSpeechConf:input_type -> proto.TokenSearchRequestV2 + 5, // 15: proto.TokenSearch.TokenSearchNetease:input_type -> proto.TokenSearchRequestV2 + 3, // 16: proto.TokenSearch.TokenSearchHandle:output_type -> proto.TokenSearchResponse + 3, // 17: proto.TokenSearch.TokenSearchHandleV2:output_type -> proto.TokenSearchResponse + 3, // 18: proto.TokenSearch.DevBind:output_type -> proto.TokenSearchResponse + 3, // 19: proto.TokenSearch.DevBindBySub:output_type -> proto.TokenSearchResponse + 4, // 20: proto.TokenSearch.DevMusicStatusChange:output_type -> proto.DevMusicStatusChangeResponse + 6, // 21: proto.TokenSearch.GetSpeechConf:output_type -> proto.SpeechConfResponse + 7, // 22: proto.TokenSearch.TokenSearchNetease:output_type -> proto.TokenSearchResponseNetease + 16, // [16:23] is the sub-list for method output_type + 9, // [9:16] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_pkg_proto_v1_token_search_proto_init() } +func file_pkg_proto_v1_token_search_proto_init() { + if File_pkg_proto_v1_token_search_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_pkg_proto_v1_token_search_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_v1_token_search_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DevInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_v1_token_search_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TokenSearchRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_v1_token_search_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TokenSearchResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_v1_token_search_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DevMusicStatusChangeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_v1_token_search_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TokenSearchRequestV2); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_v1_token_search_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SpeechConfResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_v1_token_search_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TokenSearchResponseNetease); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_v1_token_search_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TokenSearchResponse_TokenMemo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_v1_token_search_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TokenSearchResponse_Status); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_v1_token_search_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DevMusicStatusChangeResponse_Status); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_v1_token_search_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SpeechConfResponse_Data); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_v1_token_search_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SpeechConfResponse_Status); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_v1_token_search_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TokenSearchResponseNetease_Status); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_v1_token_search_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TokenSearchResponseNetease_Data); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_pkg_proto_v1_token_search_proto_rawDesc, + NumEnums: 0, + NumMessages: 15, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_pkg_proto_v1_token_search_proto_goTypes, + DependencyIndexes: file_pkg_proto_v1_token_search_proto_depIdxs, + MessageInfos: file_pkg_proto_v1_token_search_proto_msgTypes, + }.Build() + File_pkg_proto_v1_token_search_proto = out.File + file_pkg_proto_v1_token_search_proto_rawDesc = nil + file_pkg_proto_v1_token_search_proto_goTypes = nil + file_pkg_proto_v1_token_search_proto_depIdxs = nil +} diff --git a/pkg/proto/token/token_search.proto b/pkg/proto/token/token_search.proto new file mode 100644 index 0000000000000000000000000000000000000000..4b60a6584af4a09c048c34d4bdb339d865cebc9b --- /dev/null +++ b/pkg/proto/token/token_search.proto @@ -0,0 +1,122 @@ +syntax = "proto3"; + +package proto; //新增一个可选的package声明符,用来防止不同的消息类型有命名冲突 +option go_package = "./pkg/proto;proto"; //这个选项表明生成go结构体所在的包 + +//import "google/protobuf/any.proto"; + +message AppInfo { + string requestId = 1; +} + +message DevInfo { + string mac = 1; + string subMac = 2; // 子设备mac,中控变成了子设备 + string mid = 3; // mid + string vender = 4; // 细分码,用于设备没授权的情况下给默认boot + string hid = 5;// 模组id,优先级高于细分码 - 若能匹配,优先使用 + string homeId = 6; // 设备所属家庭 id + string userId = 7; // 用户id,非必传 +} + +message TokenSearchRequest { + string mac = 1; + string requestId = 2; + string mid = 3; // mid + string vender = 4; // 细分码,用于设备没授权的情况下给默认boot + string homeId = 5; // 设备所属家庭id + string userId = 6; // 用户id + string subMac = 7; // 子设备mac,中控变成了子设备 + string hid = 8;// 模组id,优先级高于细分码 - 若能匹配,优先使用 + + bool isReBind = 9; //是否强制重新绑定 +} + + +/* +data.uriType 取值说明: + QQMusic = 0 // qq音乐(腾讯v1) + QQMusicV2 = 1 // qq音乐(腾讯v2) + +data.status 取值说明: + Unassigned = 0 //未分配 + Assigned = 1 //已分配 + Using = 2 //已授权,使用中 + Expired = 3 //过期 + Invalidation = 4 //异常失效 + Unbind = 5 //解除绑定*/ +message TokenSearchResponse { + message TokenMemo { + string dsn = 1; + string authorization = 2; + string accessToken = 3; + string appKey = 4; + int32 status = 5; + int32 uriType = 6; + string homeId = 7; // 设备所绑定家庭的 homeid + } + message Status { + int32 code = 1; + string msg = 2; + } + Status status = 1; + TokenMemo data = 2; +} + +message DevMusicStatusChangeResponse { + message Status { + int32 code = 1; + string msg = 2; + } + Status status = 1; +} + +message TokenSearchRequestV2 { + AppInfo appInfo = 1; + DevInfo devInfo = 2; + + bool isReBind = 9; //是否强制重新绑定 +} + +message SpeechConfResponse { + message Data { + string productId = 1; + string appkey = 2; + } + message Status { + int32 code = 1; + string msg = 2; + } + Status status = 1; + Data data = 2; +} + + +message TokenSearchResponseNetease { + message Status { + int32 code = 1; + string msg = 2; + } + Status status = 1; + message Data { + string accessToken = 1; + string deviceId = 2; + string clientId = 3; + string productId = 4; + + int32 status = 5; + string homeId = 6; // 设备所绑定家庭的 homeid + } + Data data = 2; +} + +service TokenSearch{ + rpc TokenSearchHandle(TokenSearchRequest) returns (TokenSearchResponse); + rpc TokenSearchHandleV2(TokenSearchRequest) returns (TokenSearchResponse); //升级版,给什么用什么,只去 mac 和 subMac 字段,其他的传入字段都不使用,只分配不会绑定到主账号 + rpc DevBind(TokenSearchRequest) returns (TokenSearchResponse);//升级,给什么用什么,只去 mac 和 subMac 字段,其他的传入字段都不使用,且会绑定到主账号 + rpc DevBindBySub(TokenSearchRequest) returns (TokenSearchResponse); // 该接口,subMac 必填且会用 subMac 覆盖 mac 字段 + rpc DevMusicStatusChange(TokenSearchRequest) returns (DevMusicStatusChangeResponse); //如果发现设备音乐账号状态变更,则调用此接口 + rpc GetSpeechConf(TokenSearchRequestV2) returns (SpeechConfResponse); // 思必驰配置获取 + rpc TokenSearchNetease(TokenSearchRequestV2) returns (TokenSearchResponseNetease); // 网易云音乐token获取 +} + diff --git a/pkg/proto/token/token_search_grpc.pb.go b/pkg/proto/token/token_search_grpc.pb.go new file mode 100644 index 0000000000000000000000000000000000000000..44d20adb4a65daf8623d2418478857e40b77041f --- /dev/null +++ b/pkg/proto/token/token_search_grpc.pb.go @@ -0,0 +1,331 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: pkg/proto/v1/token_search.proto + +package token + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + TokenSearch_TokenSearchHandle_FullMethodName = "/proto.TokenSearch/TokenSearchHandle" + TokenSearch_TokenSearchHandleV2_FullMethodName = "/proto.TokenSearch/TokenSearchHandleV2" + TokenSearch_DevBind_FullMethodName = "/proto.TokenSearch/DevBind" + TokenSearch_DevBindBySub_FullMethodName = "/proto.TokenSearch/DevBindBySub" + TokenSearch_DevMusicStatusChange_FullMethodName = "/proto.TokenSearch/DevMusicStatusChange" + TokenSearch_GetSpeechConf_FullMethodName = "/proto.TokenSearch/GetSpeechConf" + TokenSearch_TokenSearchNetease_FullMethodName = "/proto.TokenSearch/TokenSearchNetease" +) + +// TokenSearchClient is the client API for TokenSearch service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type TokenSearchClient interface { + TokenSearchHandle(ctx context.Context, in *TokenSearchRequest, opts ...grpc.CallOption) (*TokenSearchResponse, error) + TokenSearchHandleV2(ctx context.Context, in *TokenSearchRequest, opts ...grpc.CallOption) (*TokenSearchResponse, error) + DevBind(ctx context.Context, in *TokenSearchRequest, opts ...grpc.CallOption) (*TokenSearchResponse, error) + DevBindBySub(ctx context.Context, in *TokenSearchRequest, opts ...grpc.CallOption) (*TokenSearchResponse, error) + DevMusicStatusChange(ctx context.Context, in *TokenSearchRequest, opts ...grpc.CallOption) (*DevMusicStatusChangeResponse, error) + GetSpeechConf(ctx context.Context, in *TokenSearchRequestV2, opts ...grpc.CallOption) (*SpeechConfResponse, error) + TokenSearchNetease(ctx context.Context, in *TokenSearchRequestV2, opts ...grpc.CallOption) (*TokenSearchResponseNetease, error) +} + +type tokenSearchClient struct { + cc grpc.ClientConnInterface +} + +func NewTokenSearchClient(cc grpc.ClientConnInterface) TokenSearchClient { + return &tokenSearchClient{cc} +} + +func (c *tokenSearchClient) TokenSearchHandle(ctx context.Context, in *TokenSearchRequest, opts ...grpc.CallOption) (*TokenSearchResponse, error) { + out := new(TokenSearchResponse) + err := c.cc.Invoke(ctx, TokenSearch_TokenSearchHandle_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *tokenSearchClient) TokenSearchHandleV2(ctx context.Context, in *TokenSearchRequest, opts ...grpc.CallOption) (*TokenSearchResponse, error) { + out := new(TokenSearchResponse) + err := c.cc.Invoke(ctx, TokenSearch_TokenSearchHandleV2_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *tokenSearchClient) DevBind(ctx context.Context, in *TokenSearchRequest, opts ...grpc.CallOption) (*TokenSearchResponse, error) { + out := new(TokenSearchResponse) + err := c.cc.Invoke(ctx, TokenSearch_DevBind_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *tokenSearchClient) DevBindBySub(ctx context.Context, in *TokenSearchRequest, opts ...grpc.CallOption) (*TokenSearchResponse, error) { + out := new(TokenSearchResponse) + err := c.cc.Invoke(ctx, TokenSearch_DevBindBySub_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *tokenSearchClient) DevMusicStatusChange(ctx context.Context, in *TokenSearchRequest, opts ...grpc.CallOption) (*DevMusicStatusChangeResponse, error) { + out := new(DevMusicStatusChangeResponse) + err := c.cc.Invoke(ctx, TokenSearch_DevMusicStatusChange_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *tokenSearchClient) GetSpeechConf(ctx context.Context, in *TokenSearchRequestV2, opts ...grpc.CallOption) (*SpeechConfResponse, error) { + out := new(SpeechConfResponse) + err := c.cc.Invoke(ctx, TokenSearch_GetSpeechConf_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *tokenSearchClient) TokenSearchNetease(ctx context.Context, in *TokenSearchRequestV2, opts ...grpc.CallOption) (*TokenSearchResponseNetease, error) { + out := new(TokenSearchResponseNetease) + err := c.cc.Invoke(ctx, TokenSearch_TokenSearchNetease_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// TokenSearchServer is the server API for TokenSearch service. +// All implementations must embed UnimplementedTokenSearchServer +// for forward compatibility +type TokenSearchServer interface { + TokenSearchHandle(context.Context, *TokenSearchRequest) (*TokenSearchResponse, error) + TokenSearchHandleV2(context.Context, *TokenSearchRequest) (*TokenSearchResponse, error) + DevBind(context.Context, *TokenSearchRequest) (*TokenSearchResponse, error) + DevBindBySub(context.Context, *TokenSearchRequest) (*TokenSearchResponse, error) + DevMusicStatusChange(context.Context, *TokenSearchRequest) (*DevMusicStatusChangeResponse, error) + GetSpeechConf(context.Context, *TokenSearchRequestV2) (*SpeechConfResponse, error) + TokenSearchNetease(context.Context, *TokenSearchRequestV2) (*TokenSearchResponseNetease, error) + mustEmbedUnimplementedTokenSearchServer() +} + +// UnimplementedTokenSearchServer must be embedded to have forward compatible implementations. +type UnimplementedTokenSearchServer struct { +} + +func (UnimplementedTokenSearchServer) TokenSearchHandle(context.Context, *TokenSearchRequest) (*TokenSearchResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TokenSearchHandle not implemented") +} +func (UnimplementedTokenSearchServer) TokenSearchHandleV2(context.Context, *TokenSearchRequest) (*TokenSearchResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TokenSearchHandleV2 not implemented") +} +func (UnimplementedTokenSearchServer) DevBind(context.Context, *TokenSearchRequest) (*TokenSearchResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DevBind not implemented") +} +func (UnimplementedTokenSearchServer) DevBindBySub(context.Context, *TokenSearchRequest) (*TokenSearchResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DevBindBySub not implemented") +} +func (UnimplementedTokenSearchServer) DevMusicStatusChange(context.Context, *TokenSearchRequest) (*DevMusicStatusChangeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DevMusicStatusChange not implemented") +} +func (UnimplementedTokenSearchServer) GetSpeechConf(context.Context, *TokenSearchRequestV2) (*SpeechConfResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSpeechConf not implemented") +} +func (UnimplementedTokenSearchServer) TokenSearchNetease(context.Context, *TokenSearchRequestV2) (*TokenSearchResponseNetease, error) { + return nil, status.Errorf(codes.Unimplemented, "method TokenSearchNetease not implemented") +} +func (UnimplementedTokenSearchServer) mustEmbedUnimplementedTokenSearchServer() {} + +// UnsafeTokenSearchServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to TokenSearchServer will +// result in compilation errors. +type UnsafeTokenSearchServer interface { + mustEmbedUnimplementedTokenSearchServer() +} + +func RegisterTokenSearchServer(s grpc.ServiceRegistrar, srv TokenSearchServer) { + s.RegisterService(&TokenSearch_ServiceDesc, srv) +} + +func _TokenSearch_TokenSearchHandle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TokenSearchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TokenSearchServer).TokenSearchHandle(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TokenSearch_TokenSearchHandle_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TokenSearchServer).TokenSearchHandle(ctx, req.(*TokenSearchRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TokenSearch_TokenSearchHandleV2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TokenSearchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TokenSearchServer).TokenSearchHandleV2(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TokenSearch_TokenSearchHandleV2_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TokenSearchServer).TokenSearchHandleV2(ctx, req.(*TokenSearchRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TokenSearch_DevBind_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TokenSearchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TokenSearchServer).DevBind(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TokenSearch_DevBind_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TokenSearchServer).DevBind(ctx, req.(*TokenSearchRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TokenSearch_DevBindBySub_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TokenSearchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TokenSearchServer).DevBindBySub(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TokenSearch_DevBindBySub_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TokenSearchServer).DevBindBySub(ctx, req.(*TokenSearchRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TokenSearch_DevMusicStatusChange_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TokenSearchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TokenSearchServer).DevMusicStatusChange(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TokenSearch_DevMusicStatusChange_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TokenSearchServer).DevMusicStatusChange(ctx, req.(*TokenSearchRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TokenSearch_GetSpeechConf_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TokenSearchRequestV2) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TokenSearchServer).GetSpeechConf(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TokenSearch_GetSpeechConf_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TokenSearchServer).GetSpeechConf(ctx, req.(*TokenSearchRequestV2)) + } + return interceptor(ctx, in, info, handler) +} + +func _TokenSearch_TokenSearchNetease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TokenSearchRequestV2) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TokenSearchServer).TokenSearchNetease(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TokenSearch_TokenSearchNetease_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TokenSearchServer).TokenSearchNetease(ctx, req.(*TokenSearchRequestV2)) + } + return interceptor(ctx, in, info, handler) +} + +// TokenSearch_ServiceDesc is the grpc.ServiceDesc for TokenSearch service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var TokenSearch_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "proto.TokenSearch", + HandlerType: (*TokenSearchServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "TokenSearchHandle", + Handler: _TokenSearch_TokenSearchHandle_Handler, + }, + { + MethodName: "TokenSearchHandleV2", + Handler: _TokenSearch_TokenSearchHandleV2_Handler, + }, + { + MethodName: "DevBind", + Handler: _TokenSearch_DevBind_Handler, + }, + { + MethodName: "DevBindBySub", + Handler: _TokenSearch_DevBindBySub_Handler, + }, + { + MethodName: "DevMusicStatusChange", + Handler: _TokenSearch_DevMusicStatusChange_Handler, + }, + { + MethodName: "GetSpeechConf", + Handler: _TokenSearch_GetSpeechConf_Handler, + }, + { + MethodName: "TokenSearchNetease", + Handler: _TokenSearch_TokenSearchNetease_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "pkg/proto/v1/token_search.proto", +} diff --git a/pkg/setting/section.go b/pkg/setting/section.go index 97f17b2f5668721f173489015b1fba492c7cd73f..3d6807b23969f51587cada9491b10a3102720025 100644 --- a/pkg/setting/section.go +++ b/pkg/setting/section.go @@ -94,6 +94,7 @@ type SpeechSettings struct { ProductId string ApiKey string Url string + ChildUrl string FeedBackUrl string } diff --git a/service/connect/music.go b/service/connect/music.go index cbe6e043fa85f8a75c2917b7bf04feb108bfdfcc..92c2a744b9fff04d49822ba0c4c0c8027253e181 100644 --- a/service/connect/music.go +++ b/service/connect/music.go @@ -53,6 +53,14 @@ func MusicGrpc(params *model.SpeechDomainParams) (*proto.MusicSpotResponse, erro Hid: "", HomeId: params.HomeId, UserId: "", + + AuthData: &proto.MusicSpotRequest_DevInfo_TokenMemo{ + AccessToken: params.TokenMemo.AccessToken, + DeviceId: params.TokenMemo.DeviceId, + ClientId: params.TokenMemo.ClientId, + ProductId: params.TokenMemo.ProductId, + Status: params.TokenMemo.Status, + }, }, Data: &proto.MusicSpotRequest_Data{ Query: params.Query, diff --git a/service/connect/token.go b/service/connect/token.go new file mode 100644 index 0000000000000000000000000000000000000000..5eaf6a131683a77dd2766239f75ff9cff043f4c3 --- /dev/null +++ b/service/connect/token.go @@ -0,0 +1,62 @@ +package connect + +import ( + "context" + "fmt" + "google.golang.org/grpc" + "speech-nlu-parse/global" + "speech-nlu-parse/pkg/logger" + "speech-nlu-parse/pkg/proto/token" + "time" +) + +const ( + TokenSpot = "dmsdk" +) + +func TokenGrpc(requestId, mac, mid, vender string) (*token.TokenSearchResponseNetease, error) { + // consul注册中心获取host port + serviceInfo, err := global.ConsulObj.GetService(TokenSpot, "") + if err != nil { + return nil, err + } + conn, err := grpc.Dial(fmt.Sprintf("%s:%d", serviceInfo.GetAddress(), serviceInfo.GetPort()), grpc.WithInsecure(), grpc.WithNoProxy()) + + if err != nil { + return nil, err + } + defer conn.Close() + + ctx, cancel := context.WithTimeout(context.Background(), time.Second*2) + defer cancel() + + c := token.NewTokenSearchClient(conn) + + req := &token.TokenSearchRequestV2{ + AppInfo: &token.AppInfo{RequestId: requestId}, + DevInfo: &token.DevInfo{ + Mac: mac, + Mid: mid, + Vender: vender, + }, + IsReBind: false, + } + + resp, err := c.TokenSearchNetease(ctx, req) + if err != nil { + global.Logger.WithFields(logger.Fields{ + "requestId": requestId, + "dmsdk serverName": TokenSpot, + "dmsdk request": req, + }).Errorf("dmsdk error: %v", err) + return nil, err + } + global.Logger.WithFields(logger.Fields{ + "requestId": requestId, + "dmsdk serverName": TokenSpot, + "dmsdk request": req, + "dmsdk response": resp, + }).Info("dmsdk") + + return resp, nil +} diff --git a/service/service.go b/service/service.go index 6a8c4d668562a71cbce7d537d7922ea5d880f6f0..aa5342a97b0c32db6c2f0627243dce80e2f9000c 100644 --- a/service/service.go +++ b/service/service.go @@ -15,12 +15,14 @@ import ( "speech-nlu-parse/pkg/errCode" "speech-nlu-parse/pkg/logger" "speech-nlu-parse/pkg/proto" - "speech-nlu-parse/pkg/util" + "speech-nlu-parse/service/connect" "speech-nlu-parse/service/speechNlu" "speech-nlu-parse/service/tencentNlu" ) -type TencentNlu struct{} +type TencentNlu struct { + proto.UnimplementedTencentNluServer +} func TencentNluParseSemanticRequest2ModelSemanticReq(tencentNluParseSemanticRequest *proto.SemanticRequest) *model.SemanticReq { if tencentNluParseSemanticRequest == nil { @@ -324,11 +326,26 @@ func (TencentNlu) TencentNluParseStream(stream proto.TencentNlu_TencentNluParseS // accessToken = "a59e94b052ac11eeaffae3150c8945b2" // } + var productId, deviceId string + token, err := connect.TokenGrpc(requestId, mac, mid, vender) + if err != nil || token.GetData().GetDeviceId() == "" { + global.Logger.WithFields(logger.Fields{ + "deviceId": token.GetData().GetProductId(), + "productId": token.GetData().GetProductId(), + }).Errorf("connect.TokenGrpc err: %v", err) + return err + //productId = global.SpeechSetting.ProductId + //deviceId = util.EncodeMD5(mac) + } else { + productId = token.GetData().ProductId + deviceId = token.GetData().DeviceId + } + speechNluWs := speechNlu.SpeechNlpWs{} var nlpWsConn *websocket.Conn - deviceId := util.EncodeMD5(mac) - nlpWsConn, err = speechNluWs.SpeechWs(ip, deviceId) + //deviceId := util.EncodeMD5(mac) + nlpWsConn, err = speechNluWs.SpeechWs(ip, productId, deviceId, mid) if err != nil { global.Logger.Errorf("speechWs.SpeechWs error. %v", err) return err diff --git a/service/speechNlu/domain.go b/service/speechNlu/domain.go index 76de391732c8c3e328d7140e078f2503f68344c9..fd89a7918a38da2562e3e13582a7cee0b55974e7 100644 --- a/service/speechNlu/domain.go +++ b/service/speechNlu/domain.go @@ -4,7 +4,6 @@ import ( "encoding/json" "errors" "fmt" - "log" "regexp" "speech-nlu-parse/global" "speech-nlu-parse/model" @@ -767,9 +766,6 @@ func globalCtrlDomain(params *model.SpeechDomainParams) []byte { semanticParams["degree"] = model.ParamsStr{Origin: "一", Norm: "1", Code: 0} } - log.Println("11111111111111111") - fmt.Println(sign) - if sign == "-" { action = "control_reduceVol" } else { diff --git a/service/speechNlu/speech.go b/service/speechNlu/speech.go index 799a9b080502fdd0738f27aef9a3174f3919ce46..c5d5ec2782b341446cb416185642db6d6cc41db8 100644 --- a/service/speechNlu/speech.go +++ b/service/speechNlu/speech.go @@ -4,7 +4,6 @@ import ( "encoding/json" "fmt" "github.com/gorilla/websocket" - "log" "speech-nlu-parse/dao" "speech-nlu-parse/global" "speech-nlu-parse/model" @@ -12,6 +11,7 @@ import ( "speech-nlu-parse/pkg/errCode" "speech-nlu-parse/pkg/logger" "speech-nlu-parse/pkg/util" + "speech-nlu-parse/service/connect" "sync" "time" ) @@ -74,12 +74,33 @@ func SpeechNlu(reqStruct *model.SemanticReq) (string, *errCode.Error) { start := time.Now() data := SpeechNlpWsReq(reqStruct, sessionId) + var productId, deviceId string //有deviceId才请求,有AccessToken才请求音乐 + token, err := connect.TokenGrpc(reqStruct.RequestId, reqStruct.MacWifi, reqStruct.Mid, reqStruct.Vender) + if err != nil || token.GetData().GetDeviceId() == "" { + global.Logger.WithFields(logger.Fields{ + "deviceId": token.GetData().GetProductId(), + "productId": token.GetData().GetProductId(), + }).Errorf("connect.TokenGrpc err: %v", err) + //productId = global.SpeechSetting.ProductId + //deviceId = util.EncodeMD5(reqStruct.MacWifi) + channelStr = string(replyWithChat(error_reply, "doudi")) + return channelStr, errCode.InformationMissing + } else { + productId = token.GetData().GetProductId() + deviceId = token.GetData().GetDeviceId() + } + + var tomo model.TokenMemo + tomo.AccessToken = token.GetData().GetAccessToken() + tomo.DeviceId = deviceId + tomo.ProductId = productId + tomo.ClientId = token.GetData().GetClientId() + tomo.Status = token.GetData().GetStatus() + speechNluWs := SpeechNlpWs{} var nlpWsConn *websocket.Conn - deviceId := util.EncodeMD5(reqStruct.MacWifi) - - nlpWsConn, err = speechNluWs.SpeechWs(reqStruct.Ip, deviceId) + nlpWsConn, err = speechNluWs.SpeechWs(reqStruct.Ip, productId, deviceId, reqStruct.Mid) if err != nil { global.Logger.WithFields(logger.Fields{ "requestId": reqStruct.RequestId, @@ -109,7 +130,7 @@ func SpeechNlu(reqStruct *model.SemanticReq) (string, *errCode.Error) { responses = <-dataChan for _, resp := range responses { semanticRespByteData := ParseSpeechJson(resp, reqStruct.MacWifi, reqStruct.OriginQuery, reqStruct.Mid, reqStruct.RequestId, - reqStruct.Vender) + reqStruct.Vender, tomo) return string(semanticRespByteData), errCode.Success } case <-time.After(5 * time.Minute): @@ -118,7 +139,7 @@ func SpeechNlu(reqStruct *model.SemanticReq) (string, *errCode.Error) { for _, resp := range responses { fmt.Printf("%+v\n", resp) semanticRespByteData := ParseSpeechJson(resp, reqStruct.MacWifi, reqStruct.OriginQuery, reqStruct.Mid, reqStruct.RequestId, - reqStruct.Vender) + reqStruct.Vender, tomo) return string(semanticRespByteData), errCode.Success } default: @@ -165,8 +186,6 @@ func receiveMessage(conn *websocket.Conn, done chan struct{}, dataChan chan<- [] "time": fmt.Sprintf("%.3fs", time.Since(start).Seconds()), }).Info("speech origin data") - log.Println(string(message)) - //思必驰nlu回复 var resp model.SpeechWsResp if err := json.Unmarshal(message, &resp); err != nil { @@ -189,7 +208,7 @@ func receiveMessage(conn *websocket.Conn, done chan struct{}, dataChan chan<- [] } } -func ParseSpeechJson(speechJson model.SpeechWsResp, mac string, query, mid, requestId, vender string) []byte { +func ParseSpeechJson(speechJson model.SpeechWsResp, mac string, query, mid, requestId, vender string, tomo model.TokenMemo) []byte { //思必驰返回的domain是中文,待改 domain := speechJson.Skill @@ -204,13 +223,20 @@ func ParseSpeechJson(speechJson model.SpeechWsResp, mac string, query, mid, requ Domain: domain, Mid: mid, MidType: vender, + TokenMemo: &model.TokenMemo{ + AccessToken: tomo.AccessToken, + DeviceId: tomo.DeviceId, + ClientId: tomo.ClientId, + ProductId: tomo.ProductId, + Status: tomo.Status, + }, } // 根据mid屏蔽部分domain, 并返回 - //if util.IsContain(domain, global.GetLimitedSetting(mid).ShieldedDomainList) { - // jsonByte = shieldedDomain() - // return jsonByte - //} + if util.IsContain(domain, global.GetLimitedSetting(mid).ShieldedDomainList) { + jsonByte = shieldedDomain() + return jsonByte + } //jsonByte = jokeDomain(speechJson) diff --git a/service/speechNlu/speechWs.go b/service/speechNlu/speechWs.go index 6e3e0a2326dcf66f341aeb0ddb18a4a71f8650fd..670bb8c5ec1c7d1a85a62cc4c3308f02d9ddda53 100644 --- a/service/speechNlu/speechWs.go +++ b/service/speechNlu/speechWs.go @@ -19,9 +19,9 @@ type SpeechNlpWs struct { mutex sync.Mutex } -func (s *SpeechNlpWs) SpeechWs(ip, deviceId string) (*websocket.Conn, error) { - SpeechWs_Url := global.SpeechSetting.Url - SpeechWs_ProductId := global.SpeechSetting.ProductId +func (s *SpeechNlpWs) SpeechWs(ip, productId, deviceId, mid string) (*websocket.Conn, error) { + var SpeechWs_Url string + //SpeechWs_ProductId := global.SpeechSetting.ProductId SpeechWs_ApiKey := global.SpeechSetting.ApiKey //st := time.Now() @@ -32,9 +32,14 @@ func (s *SpeechNlpWs) SpeechWs(ip, deviceId string) (*websocket.Conn, error) { header := http.Header{} header.Set("X-Forwarded-For", ip) - SpeechUrl := SpeechWs_Url + "?serviceType=websocket&productId=" + SpeechWs_ProductId + + if mid == "10f04" { + SpeechWs_Url = global.SpeechSetting.ChildUrl + } else { + SpeechWs_Url = global.SpeechSetting.Url + } + + SpeechUrl := SpeechWs_Url + "?serviceType=websocket&productId=" + productId + "&apikey=" + SpeechWs_ApiKey + "&deviceId=" + deviceId - fmt.Println(SpeechUrl) conn, resp, err := dialer.Dial(SpeechUrl, header) if err != nil { diff --git a/service/tencentNlu/auth.go b/service/tencentNlu/auth.go index 2c4eaaf341a7d15e991ab8c1c4ff846c40942992..4c2cc3eb0d92736d7d2008e7714397decf7462f3 100644 --- a/service/tencentNlu/auth.go +++ b/service/tencentNlu/auth.go @@ -7,7 +7,7 @@ import ( "speech-nlu-parse/global" "speech-nlu-parse/model" "speech-nlu-parse/pkg/logger" - "speech-nlu-parse/pkg/proto" + "speech-nlu-parse/pkg/proto/token" "time" "google.golang.org/grpc" @@ -29,11 +29,11 @@ func GetAuthorizationByGRPC(macWifi, requestId, mid, vender string) (*model.Toke } defer conn.Close() - c := proto.NewTokenSearchClient(conn) + c := token.NewTokenSearchClient(conn) ctx, cancel := context.WithTimeout(context.Background(), time.Second*2) defer cancel() - req := proto.TokenSearchRequest{Mac: macWifi, RequestId: requestId, Mid: mid, Vender: vender} + req := token.TokenSearchRequest{Mac: macWifi, RequestId: requestId, Mid: mid, Vender: vender} global.Logger.WithFields(logger.Fields{"data": map[string]interface{}{"tokenSearchRequest": &req}, "mac": macWifi, "mid": mid, "vender": vender, "requestId": requestId}).Info("GetAuthorizationByGRPC request") @@ -53,7 +53,7 @@ func GetAuthorizationByGRPC(macWifi, requestId, mid, vender string) (*model.Toke } // 结构体转换 -func GrpcTokenSearchResponse2ModelTokenSearchResponse(grpcTokenSearchResponse *proto.TokenSearchResponse) (*model.TokenSearchResponse, error) { +func GrpcTokenSearchResponse2ModelTokenSearchResponse(grpcTokenSearchResponse *token.TokenSearchResponse) (*model.TokenSearchResponse, error) { if grpcTokenSearchResponse == nil { return nil, nil }