1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-04 19:17:38 +08:00

Merge pull request #46 from wdvxdr1123/master

fix tts
This commit is contained in:
Mrs4s 2020-10-04 12:07:52 +08:00 committed by GitHub
commit 737a80c701
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 1420 additions and 831 deletions

View File

@ -923,13 +923,13 @@ func (c *QQClient) buildEditGroupTagPacket(groupCode, memberUin int64, newTag st
func (c *QQClient) buildEditSpecialTitlePacket(groupCode, memberUin int64, newTitle string) (uint16, []byte) { func (c *QQClient) buildEditSpecialTitlePacket(groupCode, memberUin int64, newTitle string) (uint16, []byte) {
seq := c.nextSeq() seq := c.nextSeq()
body := &oidb.D8FCReqBody{ body := &oidb.D8FCReqBody{
GroupCode: groupCode, GroupCode: &groupCode,
MemLevelInfo: []*oidb.D8FCMemberInfo{ MemLevelInfo: []*oidb.D8FCMemberInfo{
{ {
Uin: memberUin, Uin: &memberUin,
UinName: []byte(newTitle), UinName: []byte(newTitle),
SpecialTitle: []byte(newTitle), SpecialTitle: []byte(newTitle),
SpecialTitleExpireTime: -1, SpecialTitleExpireTime: proto.Int32(-1),
}, },
}, },
} }
@ -1288,7 +1288,6 @@ func (c *QQClient) buildAppInfoRequestPacket(id string) (uint16, []byte) {
packet := packets.BuildUniPacket(c.Uin, seq, "LightAppSvc.mini_app_info.GetAppInfoById", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload) packet := packets.BuildUniPacket(c.Uin, seq, "LightAppSvc.mini_app_info.GetAppInfoById", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
return seq, packet return seq, packet
} }
func (c *QQClient) buildWordSegmentationPacket(data []byte) (uint16, []byte) { func (c *QQClient) buildWordSegmentationPacket(data []byte) (uint16, []byte) {
seq := c.nextSeq() seq := c.nextSeq()
body := &oidb.D79ReqBody{ body := &oidb.D79ReqBody{

View File

@ -152,6 +152,7 @@ func NewClientMd5(uin int64, passwordMd5 [16]byte) *QQClient {
"SummaryCard.ReqSummaryCard": decodeSummaryCardResponse, "SummaryCard.ReqSummaryCard": decodeSummaryCardResponse,
"PttCenterSvr.ShortVideoDownReq": decodePttShortVideoDownResponse, "PttCenterSvr.ShortVideoDownReq": decodePttShortVideoDownResponse,
"LightAppSvc.mini_app_info.GetAppInfoById": decodeAppInfoResponse, "LightAppSvc.mini_app_info.GetAppInfoById": decodeAppInfoResponse,
"OidbSvc.0x990": decodeTranslateResponse,
}, },
sigInfo: &loginSigInfo{}, sigInfo: &loginSigInfo{},
requestPacketRequestId: 1921334513, requestPacketRequestId: 1921334513,

File diff suppressed because it is too large Load Diff

View File

@ -33,19 +33,6 @@ message D8A0ReqBody {
bytes kickMsg = 5; bytes kickMsg = 5;
} }
message D8FCReqBody {
int64 groupCode = 1;
int32 showFlag = 2;
repeated D8FCMemberInfo memLevelInfo = 3;
repeated D8FCLevelName levelName = 4;
int32 updateTime = 5;
int32 officeMode = 6;
int32 groupOpenAppid = 7;
D8FCClientInfo msgClientInfo = 8;
bytes authKey = 9;
}
message D89AReqBody { message D89AReqBody {
int64 groupCode = 1; int64 groupCode = 1;
D89AGroupinfo stGroupInfo = 2; D89AGroupinfo stGroupInfo = 2;
@ -112,41 +99,6 @@ message D89AGroupGeoInfo {
int64 poiId = 5; int64 poiId = 5;
} }
message D8FCMemberInfo {
int64 uin = 1;
int32 point = 2;
int32 activeDay = 3;
int32 level = 4;
bytes specialTitle = 5;
int32 specialTitleExpireTime = 6;
bytes uinName = 7;
bytes memberCardName = 8;
bytes phone = 9;
bytes email = 10;
bytes remark = 11;
int32 gender = 12;
bytes job = 13;
int32 tribeLevel = 14;
int32 tribePoint = 15;
repeated D8FCCardNameElem richCardName = 16;
bytes commRichCardName = 17;
}
message D8FCCardNameElem {
int32 enumCardType = 1;
bytes value = 2;
}
message D8FCLevelName {
int32 level = 1;
string name = 2;
}
message D8FCClientInfo {
int32 implat = 1;
string ingClientver = 2;
}
message DED3ReqBody { message DED3ReqBody {
int64 toUin = 1; int64 toUin = 1;
int64 groupCode = 2; int64 groupCode = 2;

View File

@ -0,0 +1,673 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.13.0
// source: oidb0x8fc.proto
package oidb
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type D8FCReqBody struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
GroupCode *int64 `protobuf:"varint,1,opt,name=groupCode" json:"groupCode,omitempty"`
ShowFlag *int32 `protobuf:"varint,2,opt,name=showFlag" json:"showFlag,omitempty"`
MemLevelInfo []*D8FCMemberInfo `protobuf:"bytes,3,rep,name=memLevelInfo" json:"memLevelInfo,omitempty"`
LevelName []*D8FCLevelName `protobuf:"bytes,4,rep,name=levelName" json:"levelName,omitempty"`
UpdateTime *int32 `protobuf:"varint,5,opt,name=updateTime" json:"updateTime,omitempty"`
OfficeMode *int32 `protobuf:"varint,6,opt,name=officeMode" json:"officeMode,omitempty"`
GroupOpenAppid *int32 `protobuf:"varint,7,opt,name=groupOpenAppid" json:"groupOpenAppid,omitempty"`
MsgClientInfo *D8FCClientInfo `protobuf:"bytes,8,opt,name=msgClientInfo" json:"msgClientInfo,omitempty"`
AuthKey []byte `protobuf:"bytes,9,opt,name=authKey" json:"authKey,omitempty"`
}
func (x *D8FCReqBody) Reset() {
*x = D8FCReqBody{}
if protoimpl.UnsafeEnabled {
mi := &file_oidb0x8fc_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *D8FCReqBody) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*D8FCReqBody) ProtoMessage() {}
func (x *D8FCReqBody) ProtoReflect() protoreflect.Message {
mi := &file_oidb0x8fc_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 D8FCReqBody.ProtoReflect.Descriptor instead.
func (*D8FCReqBody) Descriptor() ([]byte, []int) {
return file_oidb0x8fc_proto_rawDescGZIP(), []int{0}
}
func (x *D8FCReqBody) GetGroupCode() int64 {
if x != nil && x.GroupCode != nil {
return *x.GroupCode
}
return 0
}
func (x *D8FCReqBody) GetShowFlag() int32 {
if x != nil && x.ShowFlag != nil {
return *x.ShowFlag
}
return 0
}
func (x *D8FCReqBody) GetMemLevelInfo() []*D8FCMemberInfo {
if x != nil {
return x.MemLevelInfo
}
return nil
}
func (x *D8FCReqBody) GetLevelName() []*D8FCLevelName {
if x != nil {
return x.LevelName
}
return nil
}
func (x *D8FCReqBody) GetUpdateTime() int32 {
if x != nil && x.UpdateTime != nil {
return *x.UpdateTime
}
return 0
}
func (x *D8FCReqBody) GetOfficeMode() int32 {
if x != nil && x.OfficeMode != nil {
return *x.OfficeMode
}
return 0
}
func (x *D8FCReqBody) GetGroupOpenAppid() int32 {
if x != nil && x.GroupOpenAppid != nil {
return *x.GroupOpenAppid
}
return 0
}
func (x *D8FCReqBody) GetMsgClientInfo() *D8FCClientInfo {
if x != nil {
return x.MsgClientInfo
}
return nil
}
func (x *D8FCReqBody) GetAuthKey() []byte {
if x != nil {
return x.AuthKey
}
return nil
}
type D8FCMemberInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Uin *int64 `protobuf:"varint,1,opt,name=uin" json:"uin,omitempty"`
Point *int32 `protobuf:"varint,2,opt,name=point" json:"point,omitempty"`
ActiveDay *int32 `protobuf:"varint,3,opt,name=activeDay" json:"activeDay,omitempty"`
Level *int32 `protobuf:"varint,4,opt,name=level" json:"level,omitempty"`
SpecialTitle []byte `protobuf:"bytes,5,opt,name=specialTitle" json:"specialTitle,omitempty"`
SpecialTitleExpireTime *int32 `protobuf:"varint,6,opt,name=specialTitleExpireTime" json:"specialTitleExpireTime,omitempty"`
UinName []byte `protobuf:"bytes,7,opt,name=uinName" json:"uinName,omitempty"`
MemberCardName []byte `protobuf:"bytes,8,opt,name=memberCardName" json:"memberCardName,omitempty"`
Phone []byte `protobuf:"bytes,9,opt,name=phone" json:"phone,omitempty"`
Email []byte `protobuf:"bytes,10,opt,name=email" json:"email,omitempty"`
Remark []byte `protobuf:"bytes,11,opt,name=remark" json:"remark,omitempty"`
Gender *int32 `protobuf:"varint,12,opt,name=gender" json:"gender,omitempty"`
Job []byte `protobuf:"bytes,13,opt,name=job" json:"job,omitempty"`
TribeLevel *int32 `protobuf:"varint,14,opt,name=tribeLevel" json:"tribeLevel,omitempty"`
TribePoint *int32 `protobuf:"varint,15,opt,name=tribePoint" json:"tribePoint,omitempty"`
RichCardName []*D8FCCardNameElem `protobuf:"bytes,16,rep,name=richCardName" json:"richCardName,omitempty"`
CommRichCardName []byte `protobuf:"bytes,17,opt,name=commRichCardName" json:"commRichCardName,omitempty"`
}
func (x *D8FCMemberInfo) Reset() {
*x = D8FCMemberInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_oidb0x8fc_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *D8FCMemberInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*D8FCMemberInfo) ProtoMessage() {}
func (x *D8FCMemberInfo) ProtoReflect() protoreflect.Message {
mi := &file_oidb0x8fc_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 D8FCMemberInfo.ProtoReflect.Descriptor instead.
func (*D8FCMemberInfo) Descriptor() ([]byte, []int) {
return file_oidb0x8fc_proto_rawDescGZIP(), []int{1}
}
func (x *D8FCMemberInfo) GetUin() int64 {
if x != nil && x.Uin != nil {
return *x.Uin
}
return 0
}
func (x *D8FCMemberInfo) GetPoint() int32 {
if x != nil && x.Point != nil {
return *x.Point
}
return 0
}
func (x *D8FCMemberInfo) GetActiveDay() int32 {
if x != nil && x.ActiveDay != nil {
return *x.ActiveDay
}
return 0
}
func (x *D8FCMemberInfo) GetLevel() int32 {
if x != nil && x.Level != nil {
return *x.Level
}
return 0
}
func (x *D8FCMemberInfo) GetSpecialTitle() []byte {
if x != nil {
return x.SpecialTitle
}
return nil
}
func (x *D8FCMemberInfo) GetSpecialTitleExpireTime() int32 {
if x != nil && x.SpecialTitleExpireTime != nil {
return *x.SpecialTitleExpireTime
}
return 0
}
func (x *D8FCMemberInfo) GetUinName() []byte {
if x != nil {
return x.UinName
}
return nil
}
func (x *D8FCMemberInfo) GetMemberCardName() []byte {
if x != nil {
return x.MemberCardName
}
return nil
}
func (x *D8FCMemberInfo) GetPhone() []byte {
if x != nil {
return x.Phone
}
return nil
}
func (x *D8FCMemberInfo) GetEmail() []byte {
if x != nil {
return x.Email
}
return nil
}
func (x *D8FCMemberInfo) GetRemark() []byte {
if x != nil {
return x.Remark
}
return nil
}
func (x *D8FCMemberInfo) GetGender() int32 {
if x != nil && x.Gender != nil {
return *x.Gender
}
return 0
}
func (x *D8FCMemberInfo) GetJob() []byte {
if x != nil {
return x.Job
}
return nil
}
func (x *D8FCMemberInfo) GetTribeLevel() int32 {
if x != nil && x.TribeLevel != nil {
return *x.TribeLevel
}
return 0
}
func (x *D8FCMemberInfo) GetTribePoint() int32 {
if x != nil && x.TribePoint != nil {
return *x.TribePoint
}
return 0
}
func (x *D8FCMemberInfo) GetRichCardName() []*D8FCCardNameElem {
if x != nil {
return x.RichCardName
}
return nil
}
func (x *D8FCMemberInfo) GetCommRichCardName() []byte {
if x != nil {
return x.CommRichCardName
}
return nil
}
type D8FCCardNameElem struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
EnumCardType *int32 `protobuf:"varint,1,opt,name=enumCardType" json:"enumCardType,omitempty"`
Value []byte `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
}
func (x *D8FCCardNameElem) Reset() {
*x = D8FCCardNameElem{}
if protoimpl.UnsafeEnabled {
mi := &file_oidb0x8fc_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *D8FCCardNameElem) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*D8FCCardNameElem) ProtoMessage() {}
func (x *D8FCCardNameElem) ProtoReflect() protoreflect.Message {
mi := &file_oidb0x8fc_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 D8FCCardNameElem.ProtoReflect.Descriptor instead.
func (*D8FCCardNameElem) Descriptor() ([]byte, []int) {
return file_oidb0x8fc_proto_rawDescGZIP(), []int{2}
}
func (x *D8FCCardNameElem) GetEnumCardType() int32 {
if x != nil && x.EnumCardType != nil {
return *x.EnumCardType
}
return 0
}
func (x *D8FCCardNameElem) GetValue() []byte {
if x != nil {
return x.Value
}
return nil
}
type D8FCLevelName struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Level *int32 `protobuf:"varint,1,opt,name=level" json:"level,omitempty"`
Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
}
func (x *D8FCLevelName) Reset() {
*x = D8FCLevelName{}
if protoimpl.UnsafeEnabled {
mi := &file_oidb0x8fc_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *D8FCLevelName) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*D8FCLevelName) ProtoMessage() {}
func (x *D8FCLevelName) ProtoReflect() protoreflect.Message {
mi := &file_oidb0x8fc_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 D8FCLevelName.ProtoReflect.Descriptor instead.
func (*D8FCLevelName) Descriptor() ([]byte, []int) {
return file_oidb0x8fc_proto_rawDescGZIP(), []int{3}
}
func (x *D8FCLevelName) GetLevel() int32 {
if x != nil && x.Level != nil {
return *x.Level
}
return 0
}
func (x *D8FCLevelName) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
type D8FCClientInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Implat *int32 `protobuf:"varint,1,opt,name=implat" json:"implat,omitempty"`
IngClientver *string `protobuf:"bytes,2,opt,name=ingClientver" json:"ingClientver,omitempty"`
}
func (x *D8FCClientInfo) Reset() {
*x = D8FCClientInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_oidb0x8fc_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *D8FCClientInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*D8FCClientInfo) ProtoMessage() {}
func (x *D8FCClientInfo) ProtoReflect() protoreflect.Message {
mi := &file_oidb0x8fc_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 D8FCClientInfo.ProtoReflect.Descriptor instead.
func (*D8FCClientInfo) Descriptor() ([]byte, []int) {
return file_oidb0x8fc_proto_rawDescGZIP(), []int{4}
}
func (x *D8FCClientInfo) GetImplat() int32 {
if x != nil && x.Implat != nil {
return *x.Implat
}
return 0
}
func (x *D8FCClientInfo) GetIngClientver() string {
if x != nil && x.IngClientver != nil {
return *x.IngClientver
}
return ""
}
var File_oidb0x8fc_proto protoreflect.FileDescriptor
var file_oidb0x8fc_proto_rawDesc = []byte{
0x0a, 0x0f, 0x6f, 0x69, 0x64, 0x62, 0x30, 0x78, 0x38, 0x66, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x22, 0xe3, 0x02, 0x0a, 0x0b, 0x44, 0x38, 0x46, 0x43, 0x52, 0x65, 0x71, 0x42, 0x6f, 0x64,
0x79, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x12,
0x1a, 0x0a, 0x08, 0x73, 0x68, 0x6f, 0x77, 0x46, 0x6c, 0x61, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28,
0x05, 0x52, 0x08, 0x73, 0x68, 0x6f, 0x77, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x33, 0x0a, 0x0c, 0x6d,
0x65, 0x6d, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x0f, 0x2e, 0x44, 0x38, 0x46, 0x43, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x6e,
0x66, 0x6f, 0x52, 0x0c, 0x6d, 0x65, 0x6d, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x49, 0x6e, 0x66, 0x6f,
0x12, 0x2c, 0x0a, 0x09, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x38, 0x46, 0x43, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x4e,
0x61, 0x6d, 0x65, 0x52, 0x09, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1e,
0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01,
0x28, 0x05, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1e,
0x0a, 0x0a, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01,
0x28, 0x05, 0x52, 0x0a, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x26,
0x0a, 0x0e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4f, 0x70, 0x65, 0x6e, 0x41, 0x70, 0x70, 0x69, 0x64,
0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4f, 0x70, 0x65,
0x6e, 0x41, 0x70, 0x70, 0x69, 0x64, 0x12, 0x35, 0x0a, 0x0d, 0x6d, 0x73, 0x67, 0x43, 0x6c, 0x69,
0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e,
0x44, 0x38, 0x46, 0x43, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0d,
0x6d, 0x73, 0x67, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a,
0x07, 0x61, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07,
0x61, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x22, 0x9b, 0x04, 0x0a, 0x0e, 0x44, 0x38, 0x46, 0x43,
0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69,
0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05,
0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x6f, 0x69,
0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x44, 0x61, 0x79, 0x18,
0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x44, 0x61, 0x79,
0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52,
0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x70, 0x65, 0x63, 0x69, 0x61,
0x6c, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x73, 0x70,
0x65, 0x63, 0x69, 0x61, 0x6c, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x36, 0x0a, 0x16, 0x73, 0x70,
0x65, 0x63, 0x69, 0x61, 0x6c, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65,
0x54, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x16, 0x73, 0x70, 0x65, 0x63,
0x69, 0x61, 0x6c, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x54, 0x69,
0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20,
0x01, 0x28, 0x0c, 0x52, 0x07, 0x75, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e,
0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x61, 0x72, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x08,
0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x61, 0x72, 0x64,
0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x09, 0x20,
0x01, 0x28, 0x0c, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d,
0x61, 0x69, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c,
0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0c,
0x52, 0x06, 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x65, 0x6e, 0x64,
0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72,
0x12, 0x10, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6a,
0x6f, 0x62, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x72, 0x69, 0x62, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c,
0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x72, 0x69, 0x62, 0x65, 0x4c, 0x65, 0x76,
0x65, 0x6c, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x72, 0x69, 0x62, 0x65, 0x50, 0x6f, 0x69, 0x6e, 0x74,
0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x72, 0x69, 0x62, 0x65, 0x50, 0x6f, 0x69,
0x6e, 0x74, 0x12, 0x35, 0x0a, 0x0c, 0x72, 0x69, 0x63, 0x68, 0x43, 0x61, 0x72, 0x64, 0x4e, 0x61,
0x6d, 0x65, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x44, 0x38, 0x46, 0x43, 0x43,
0x61, 0x72, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x45, 0x6c, 0x65, 0x6d, 0x52, 0x0c, 0x72, 0x69, 0x63,
0x68, 0x43, 0x61, 0x72, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x63, 0x6f, 0x6d,
0x6d, 0x52, 0x69, 0x63, 0x68, 0x43, 0x61, 0x72, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x11, 0x20,
0x01, 0x28, 0x0c, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x52, 0x69, 0x63, 0x68, 0x43, 0x61, 0x72,
0x64, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x4c, 0x0a, 0x10, 0x44, 0x38, 0x46, 0x43, 0x43, 0x61, 0x72,
0x64, 0x4e, 0x61, 0x6d, 0x65, 0x45, 0x6c, 0x65, 0x6d, 0x12, 0x22, 0x0a, 0x0c, 0x65, 0x6e, 0x75,
0x6d, 0x43, 0x61, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
0x0c, 0x65, 0x6e, 0x75, 0x6d, 0x43, 0x61, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x22, 0x39, 0x0a, 0x0d, 0x44, 0x38, 0x46, 0x43, 0x4c, 0x65, 0x76, 0x65, 0x6c,
0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20,
0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x4c,
0x0a, 0x0e, 0x44, 0x38, 0x46, 0x43, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f,
0x12, 0x16, 0x0a, 0x06, 0x69, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x52, 0x06, 0x69, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x6e, 0x67, 0x43,
0x6c, 0x69, 0x65, 0x6e, 0x74, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c,
0x69, 0x6e, 0x67, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x76, 0x65, 0x72, 0x42, 0x08, 0x5a, 0x06,
0x2e, 0x3b, 0x6f, 0x69, 0x64, 0x62,
}
var (
file_oidb0x8fc_proto_rawDescOnce sync.Once
file_oidb0x8fc_proto_rawDescData = file_oidb0x8fc_proto_rawDesc
)
func file_oidb0x8fc_proto_rawDescGZIP() []byte {
file_oidb0x8fc_proto_rawDescOnce.Do(func() {
file_oidb0x8fc_proto_rawDescData = protoimpl.X.CompressGZIP(file_oidb0x8fc_proto_rawDescData)
})
return file_oidb0x8fc_proto_rawDescData
}
var file_oidb0x8fc_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_oidb0x8fc_proto_goTypes = []interface{}{
(*D8FCReqBody)(nil), // 0: D8FCReqBody
(*D8FCMemberInfo)(nil), // 1: D8FCMemberInfo
(*D8FCCardNameElem)(nil), // 2: D8FCCardNameElem
(*D8FCLevelName)(nil), // 3: D8FCLevelName
(*D8FCClientInfo)(nil), // 4: D8FCClientInfo
}
var file_oidb0x8fc_proto_depIdxs = []int32{
1, // 0: D8FCReqBody.memLevelInfo:type_name -> D8FCMemberInfo
3, // 1: D8FCReqBody.levelName:type_name -> D8FCLevelName
4, // 2: D8FCReqBody.msgClientInfo:type_name -> D8FCClientInfo
2, // 3: D8FCMemberInfo.richCardName:type_name -> D8FCCardNameElem
4, // [4:4] is the sub-list for method output_type
4, // [4:4] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
}
func init() { file_oidb0x8fc_proto_init() }
func file_oidb0x8fc_proto_init() {
if File_oidb0x8fc_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_oidb0x8fc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*D8FCReqBody); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_oidb0x8fc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*D8FCMemberInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_oidb0x8fc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*D8FCCardNameElem); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_oidb0x8fc_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*D8FCLevelName); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_oidb0x8fc_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*D8FCClientInfo); 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_oidb0x8fc_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_oidb0x8fc_proto_goTypes,
DependencyIndexes: file_oidb0x8fc_proto_depIdxs,
MessageInfos: file_oidb0x8fc_proto_msgTypes,
}.Build()
File_oidb0x8fc_proto = out.File
file_oidb0x8fc_proto_rawDesc = nil
file_oidb0x8fc_proto_goTypes = nil
file_oidb0x8fc_proto_depIdxs = nil
}

View File

@ -0,0 +1,50 @@
syntax = "proto2";
option go_package = ".;oidb";
message D8FCReqBody {
optional int64 groupCode = 1;
optional int32 showFlag = 2;
repeated D8FCMemberInfo memLevelInfo = 3;
repeated D8FCLevelName levelName = 4;
optional int32 updateTime = 5;
optional int32 officeMode = 6;
optional int32 groupOpenAppid = 7;
optional D8FCClientInfo msgClientInfo = 8;
optional bytes authKey = 9;
}
message D8FCMemberInfo {
optional int64 uin = 1;
optional int32 point = 2;
optional int32 activeDay = 3;
optional int32 level = 4;
optional bytes specialTitle = 5;
optional int32 specialTitleExpireTime = 6;
optional bytes uinName = 7;
optional bytes memberCardName = 8;
optional bytes phone = 9;
optional bytes email = 10;
optional bytes remark = 11;
optional int32 gender = 12;
optional bytes job = 13;
optional int32 tribeLevel = 14;
optional int32 tribePoint = 15;
repeated D8FCCardNameElem richCardName = 16;
optional bytes commRichCardName = 17;
}
message D8FCCardNameElem {
optional int32 enumCardType = 1;
optional bytes value = 2;
}
message D8FCLevelName {
optional int32 level = 1;
optional string name = 2;
}
message D8FCClientInfo {
optional int32 implat = 1;
optional string ingClientver = 2;
}

View File

@ -0,0 +1,417 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.13.0
// source: oidb0x990.proto
package oidb
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type TranslateReqBody struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// TranslateReq translate_req = 1;
BatchTranslateReq *BatchTranslateReq `protobuf:"bytes,2,opt,name=batch_translate_req,json=batchTranslateReq,proto3" json:"batch_translate_req,omitempty"`
}
func (x *TranslateReqBody) Reset() {
*x = TranslateReqBody{}
if protoimpl.UnsafeEnabled {
mi := &file_oidb0x990_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TranslateReqBody) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TranslateReqBody) ProtoMessage() {}
func (x *TranslateReqBody) ProtoReflect() protoreflect.Message {
mi := &file_oidb0x990_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 TranslateReqBody.ProtoReflect.Descriptor instead.
func (*TranslateReqBody) Descriptor() ([]byte, []int) {
return file_oidb0x990_proto_rawDescGZIP(), []int{0}
}
func (x *TranslateReqBody) GetBatchTranslateReq() *BatchTranslateReq {
if x != nil {
return x.BatchTranslateReq
}
return nil
}
type TranslateRspBody struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// TranslateRsp translate_rsp = 1;
BatchTranslateRsp *BatchTranslateRsp `protobuf:"bytes,2,opt,name=batch_translate_rsp,json=batchTranslateRsp,proto3" json:"batch_translate_rsp,omitempty"`
}
func (x *TranslateRspBody) Reset() {
*x = TranslateRspBody{}
if protoimpl.UnsafeEnabled {
mi := &file_oidb0x990_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TranslateRspBody) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TranslateRspBody) ProtoMessage() {}
func (x *TranslateRspBody) ProtoReflect() protoreflect.Message {
mi := &file_oidb0x990_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 TranslateRspBody.ProtoReflect.Descriptor instead.
func (*TranslateRspBody) Descriptor() ([]byte, []int) {
return file_oidb0x990_proto_rawDescGZIP(), []int{1}
}
func (x *TranslateRspBody) GetBatchTranslateRsp() *BatchTranslateRsp {
if x != nil {
return x.BatchTranslateRsp
}
return nil
}
type BatchTranslateReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
SrcLanguage string `protobuf:"bytes,1,opt,name=src_language,json=srcLanguage,proto3" json:"src_language,omitempty"`
DstLanguage string `protobuf:"bytes,2,opt,name=dst_language,json=dstLanguage,proto3" json:"dst_language,omitempty"`
SrcTextList []string `protobuf:"bytes,3,rep,name=src_text_list,json=srcTextList,proto3" json:"src_text_list,omitempty"`
}
func (x *BatchTranslateReq) Reset() {
*x = BatchTranslateReq{}
if protoimpl.UnsafeEnabled {
mi := &file_oidb0x990_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BatchTranslateReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BatchTranslateReq) ProtoMessage() {}
func (x *BatchTranslateReq) ProtoReflect() protoreflect.Message {
mi := &file_oidb0x990_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 BatchTranslateReq.ProtoReflect.Descriptor instead.
func (*BatchTranslateReq) Descriptor() ([]byte, []int) {
return file_oidb0x990_proto_rawDescGZIP(), []int{2}
}
func (x *BatchTranslateReq) GetSrcLanguage() string {
if x != nil {
return x.SrcLanguage
}
return ""
}
func (x *BatchTranslateReq) GetDstLanguage() string {
if x != nil {
return x.DstLanguage
}
return ""
}
func (x *BatchTranslateReq) GetSrcTextList() []string {
if x != nil {
return x.SrcTextList
}
return nil
}
type BatchTranslateRsp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ErrorCode int32 `protobuf:"varint,1,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"`
ErrorMsg []byte `protobuf:"bytes,2,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"`
SrcLanguage string `protobuf:"bytes,3,opt,name=src_language,json=srcLanguage,proto3" json:"src_language,omitempty"`
DstLanguage string `protobuf:"bytes,4,opt,name=dst_language,json=dstLanguage,proto3" json:"dst_language,omitempty"`
SrcTextList []string `protobuf:"bytes,5,rep,name=src_text_list,json=srcTextList,proto3" json:"src_text_list,omitempty"`
DstTextList []string `protobuf:"bytes,6,rep,name=dst_text_list,json=dstTextList,proto3" json:"dst_text_list,omitempty"`
}
func (x *BatchTranslateRsp) Reset() {
*x = BatchTranslateRsp{}
if protoimpl.UnsafeEnabled {
mi := &file_oidb0x990_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BatchTranslateRsp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BatchTranslateRsp) ProtoMessage() {}
func (x *BatchTranslateRsp) ProtoReflect() protoreflect.Message {
mi := &file_oidb0x990_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 BatchTranslateRsp.ProtoReflect.Descriptor instead.
func (*BatchTranslateRsp) Descriptor() ([]byte, []int) {
return file_oidb0x990_proto_rawDescGZIP(), []int{3}
}
func (x *BatchTranslateRsp) GetErrorCode() int32 {
if x != nil {
return x.ErrorCode
}
return 0
}
func (x *BatchTranslateRsp) GetErrorMsg() []byte {
if x != nil {
return x.ErrorMsg
}
return nil
}
func (x *BatchTranslateRsp) GetSrcLanguage() string {
if x != nil {
return x.SrcLanguage
}
return ""
}
func (x *BatchTranslateRsp) GetDstLanguage() string {
if x != nil {
return x.DstLanguage
}
return ""
}
func (x *BatchTranslateRsp) GetSrcTextList() []string {
if x != nil {
return x.SrcTextList
}
return nil
}
func (x *BatchTranslateRsp) GetDstTextList() []string {
if x != nil {
return x.DstTextList
}
return nil
}
var File_oidb0x990_proto protoreflect.FileDescriptor
var file_oidb0x990_proto_rawDesc = []byte{
0x0a, 0x0f, 0x6f, 0x69, 0x64, 0x62, 0x30, 0x78, 0x39, 0x39, 0x30, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x22, 0x56, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65,
0x71, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x42, 0x0a, 0x13, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x74,
0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x12, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c,
0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x52, 0x11, 0x62, 0x61, 0x74, 0x63, 0x68, 0x54, 0x72, 0x61,
0x6e, 0x73, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x22, 0x56, 0x0a, 0x10, 0x54, 0x72, 0x61,
0x6e, 0x73, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x73, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x42, 0x0a,
0x13, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x65,
0x5f, 0x72, 0x73, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x42, 0x61, 0x74,
0x63, 0x68, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x73, 0x70, 0x52, 0x11,
0x62, 0x61, 0x74, 0x63, 0x68, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x73,
0x70, 0x22, 0x7d, 0x0a, 0x11, 0x42, 0x61, 0x74, 0x63, 0x68, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c,
0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x72, 0x63, 0x5f, 0x6c, 0x61,
0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x72,
0x63, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x73, 0x74,
0x5f, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0b, 0x64, 0x73, 0x74, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x12, 0x22, 0x0a, 0x0d,
0x73, 0x72, 0x63, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20,
0x03, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x72, 0x63, 0x54, 0x65, 0x78, 0x74, 0x4c, 0x69, 0x73, 0x74,
0x22, 0xdd, 0x01, 0x0a, 0x11, 0x42, 0x61, 0x74, 0x63, 0x68, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c,
0x61, 0x74, 0x65, 0x52, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f,
0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f,
0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d,
0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d,
0x73, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x72, 0x63, 0x5f, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61,
0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x72, 0x63, 0x4c, 0x61, 0x6e,
0x67, 0x75, 0x61, 0x67, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x73, 0x74, 0x5f, 0x6c, 0x61, 0x6e,
0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x73, 0x74,
0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x73, 0x72, 0x63, 0x5f,
0x74, 0x65, 0x78, 0x74, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52,
0x0b, 0x73, 0x72, 0x63, 0x54, 0x65, 0x78, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0d,
0x64, 0x73, 0x74, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x06, 0x20,
0x03, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x73, 0x74, 0x54, 0x65, 0x78, 0x74, 0x4c, 0x69, 0x73, 0x74,
0x42, 0x08, 0x5a, 0x06, 0x2e, 0x3b, 0x6f, 0x69, 0x64, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
}
var (
file_oidb0x990_proto_rawDescOnce sync.Once
file_oidb0x990_proto_rawDescData = file_oidb0x990_proto_rawDesc
)
func file_oidb0x990_proto_rawDescGZIP() []byte {
file_oidb0x990_proto_rawDescOnce.Do(func() {
file_oidb0x990_proto_rawDescData = protoimpl.X.CompressGZIP(file_oidb0x990_proto_rawDescData)
})
return file_oidb0x990_proto_rawDescData
}
var file_oidb0x990_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_oidb0x990_proto_goTypes = []interface{}{
(*TranslateReqBody)(nil), // 0: TranslateReqBody
(*TranslateRspBody)(nil), // 1: TranslateRspBody
(*BatchTranslateReq)(nil), // 2: BatchTranslateReq
(*BatchTranslateRsp)(nil), // 3: BatchTranslateRsp
}
var file_oidb0x990_proto_depIdxs = []int32{
2, // 0: TranslateReqBody.batch_translate_req:type_name -> BatchTranslateReq
3, // 1: TranslateRspBody.batch_translate_rsp:type_name -> BatchTranslateRsp
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_oidb0x990_proto_init() }
func file_oidb0x990_proto_init() {
if File_oidb0x990_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_oidb0x990_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TranslateReqBody); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_oidb0x990_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TranslateRspBody); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_oidb0x990_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BatchTranslateReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_oidb0x990_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BatchTranslateRsp); 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_oidb0x990_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_oidb0x990_proto_goTypes,
DependencyIndexes: file_oidb0x990_proto_depIdxs,
MessageInfos: file_oidb0x990_proto_msgTypes,
}.Build()
File_oidb0x990_proto = out.File
file_oidb0x990_proto_rawDesc = nil
file_oidb0x990_proto_goTypes = nil
file_oidb0x990_proto_depIdxs = nil
}

View File

@ -0,0 +1,28 @@
syntax = "proto3";
option go_package = ".;oidb";
message TranslateReqBody {
// TranslateReq translate_req = 1;
BatchTranslateReq batch_translate_req = 2;
}
message TranslateRspBody {
// TranslateRsp translate_rsp = 1;
BatchTranslateRsp batch_translate_rsp = 2;
}
message BatchTranslateReq {
string src_language = 1;
string dst_language = 2;
repeated string src_text_list = 3;
}
message BatchTranslateRsp {
int32 error_code = 1;
bytes error_msg = 2;
string src_language = 3;
string dst_language = 4;
repeated string src_text_list = 5;
repeated string dst_text_list = 6;
}

55
client/translate.go Normal file
View File

@ -0,0 +1,55 @@
package client
import (
"errors"
"github.com/Mrs4s/MiraiGo/client/pb/oidb"
"github.com/Mrs4s/MiraiGo/protocol/packets"
"github.com/golang/protobuf/proto"
)
func (c *QQClient) buildTranslatePacket(src, dst, text string) (uint16, []byte) {
seq := c.nextSeq()
body := &oidb.TranslateReqBody{
BatchTranslateReq: &oidb.BatchTranslateReq{
SrcLanguage: src,
DstLanguage: dst,
SrcTextList: []string{text},
},
}
b, _ := proto.Marshal(body)
req := &oidb.OIDBSSOPkg{
Command: 2448,
ServiceType: 2,
Bodybuffer: b,
}
payload, _ := proto.Marshal(req)
packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0x990", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
return seq, packet
}
func (c *QQClient) Translate(src, dst, text string) (string, error) {
rsp, err := c.sendAndWait(c.buildTranslatePacket(src, dst, text))
if err != nil {
return "", err
}
if data, ok := rsp.(*oidb.BatchTranslateRsp); ok {
if data.ErrorCode != 0 {
return "", errors.New(string(data.ErrorMsg))
}
return data.DstTextList[0], nil
}
return "", errors.New("decode error")
}
// OidbSvc.0x990
func decodeTranslateResponse(c *QQClient, _ uint16, payload []byte) (interface{}, error) {
pkg := oidb.OIDBSSOPkg{}
rsp := oidb.TranslateRspBody{}
if err := proto.Unmarshal(payload, &pkg); err != nil {
return nil, err
}
if err := proto.Unmarshal(pkg.Bodybuffer, &rsp); err != nil {
return nil, err
}
return rsp.BatchTranslateRsp, nil
}

View File

@ -1,6 +1,7 @@
package client package client
import ( import (
"errors"
"fmt" "fmt"
"github.com/Mrs4s/MiraiGo/binary" "github.com/Mrs4s/MiraiGo/binary"
"github.com/Mrs4s/MiraiGo/client/pb/richmedia" "github.com/Mrs4s/MiraiGo/client/pb/richmedia"
@ -35,6 +36,9 @@ func (c *QQClient) GetTts(text string) ([]byte, error) {
if err != nil { if err != nil {
return nil, err return nil, err
} }
if ttsRsp.RetCode != 0 {
return nil, errors.New("can't convert text to voice")
}
for _, voiceItem := range ttsRsp.VoiceData { for _, voiceItem := range ttsRsp.VoiceData {
ttsWriter.Write(voiceItem.Voice) ttsWriter.Write(voiceItem.Voice)
} }