diff --git a/client/builders.go b/client/builders.go index 2312d460..d6584d1c 100644 --- a/client/builders.go +++ b/client/builders.go @@ -4,18 +4,9 @@ import ( "crypto/md5" "encoding/hex" "fmt" - "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0x89a" - "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0x8a0" - "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0x8fc" - "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0xd79" - "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0xed3" "math/rand" "time" - "github.com/Mrs4s/MiraiGo/internal/crypto" - packets2 "github.com/Mrs4s/MiraiGo/internal/packets" - tlv2 "github.com/Mrs4s/MiraiGo/internal/tlv" - "google.golang.org/protobuf/proto" "github.com/Mrs4s/MiraiGo/binary" @@ -26,6 +17,14 @@ import ( "github.com/Mrs4s/MiraiGo/client/pb/profilecard" "github.com/Mrs4s/MiraiGo/client/pb/qweb" "github.com/Mrs4s/MiraiGo/client/pb/structmsg" + "github.com/Mrs4s/MiraiGo/internal/crypto" + "github.com/Mrs4s/MiraiGo/internal/packets" + "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0x89a" + "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0x8a0" + "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0x8fc" + "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0xd79" + "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0xed3" + "github.com/Mrs4s/MiraiGo/internal/tlv" ) var ( @@ -35,7 +34,7 @@ var ( func (c *QQClient) buildLoginPacket() (uint16, []byte) { seq := c.nextSeq() - req := packets2.BuildOicqRequestPacket(c.Uin, 0x0810, c.ecdh, c.RandomKey, func(w *binary.Writer) { + req := packets.BuildOicqRequestPacket(c.Uin, 0x0810, c.ecdh, c.RandomKey, func(w *binary.Writer) { w.WriteUInt16(9) if c.AllowSlider { w.WriteUInt16(0x17) @@ -43,87 +42,87 @@ func (c *QQClient) buildLoginPacket() (uint16, []byte) { w.WriteUInt16(0x16) } - w.Write(tlv2.T18(16, uint32(c.Uin))) - w.Write(tlv2.T1(uint32(c.Uin), c.deviceInfo.IpAddress)) - w.Write(tlv2.T106(uint32(c.Uin), 0, c.version.AppId, c.version.SSOVersion, c.PasswordMd5, true, c.deviceInfo.Guid, c.deviceInfo.TgtgtKey, 0)) - w.Write(tlv2.T116(c.version.MiscBitmap, c.version.SubSigmap)) - w.Write(tlv2.T100(c.version.SSOVersion, c.version.SubAppId, c.version.MainSigMap)) - w.Write(tlv2.T107(0)) - w.Write(tlv2.T142(c.version.ApkId)) - w.Write(tlv2.T144( + w.Write(tlv.T18(16, uint32(c.Uin))) + w.Write(tlv.T1(uint32(c.Uin), c.deviceInfo.IpAddress)) + w.Write(tlv.T106(uint32(c.Uin), 0, c.version.AppId, c.version.SSOVersion, c.PasswordMd5, true, c.deviceInfo.Guid, c.deviceInfo.TgtgtKey, 0)) + w.Write(tlv.T116(c.version.MiscBitmap, c.version.SubSigmap)) + w.Write(tlv.T100(c.version.SSOVersion, c.version.SubAppId, c.version.MainSigMap)) + w.Write(tlv.T107(0)) + w.Write(tlv.T142(c.version.ApkId)) + w.Write(tlv.T144( []byte(c.deviceInfo.IMEI), c.deviceInfo.GenDeviceInfoData(), c.deviceInfo.OSType, c.deviceInfo.Version.Release, c.deviceInfo.SimInfo, c.deviceInfo.APN, - false, true, false, tlv2.GuidFlag(), + false, true, false, tlv.GuidFlag(), c.deviceInfo.Model, c.deviceInfo.Guid, c.deviceInfo.Brand, c.deviceInfo.TgtgtKey, )) - w.Write(tlv2.T145(c.deviceInfo.Guid)) - w.Write(tlv2.T147(16, []byte(c.version.SortVersionName), c.version.ApkSign)) + w.Write(tlv.T145(c.deviceInfo.Guid)) + w.Write(tlv.T147(16, []byte(c.version.SortVersionName), c.version.ApkSign)) /* if (miscBitMap & 0x80) != 0{ w.Write(tlv.T166(1)) } */ - w.Write(tlv2.T154(seq)) - w.Write(tlv2.T141(c.deviceInfo.SimInfo, c.deviceInfo.APN)) - w.Write(tlv2.T8(2052)) - w.Write(tlv2.T511([]string{ + w.Write(tlv.T154(seq)) + w.Write(tlv.T141(c.deviceInfo.SimInfo, c.deviceInfo.APN)) + w.Write(tlv.T8(2052)) + w.Write(tlv.T511([]string{ "tenpay.com", "openmobile.qq.com", "docs.qq.com", "connect.qq.com", "qzone.qq.com", "vip.qq.com", "gamecenter.qq.com", "qun.qq.com", "game.qq.com", "qqweb.qq.com", "office.qq.com", "ti.qq.com", "mail.qq.com", "mma.qq.com", })) - w.Write(tlv2.T187(c.deviceInfo.MacAddress)) - w.Write(tlv2.T188(c.deviceInfo.AndroidId)) + w.Write(tlv.T187(c.deviceInfo.MacAddress)) + w.Write(tlv.T188(c.deviceInfo.AndroidId)) if len(c.deviceInfo.IMSIMd5) != 0 { - w.Write(tlv2.T194(c.deviceInfo.IMSIMd5)) + w.Write(tlv.T194(c.deviceInfo.IMSIMd5)) } if c.AllowSlider { - w.Write(tlv2.T191(0x82)) + w.Write(tlv.T191(0x82)) } if len(c.deviceInfo.WifiBSSID) != 0 && len(c.deviceInfo.WifiSSID) != 0 { - w.Write(tlv2.T202(c.deviceInfo.WifiBSSID, c.deviceInfo.WifiSSID)) + w.Write(tlv.T202(c.deviceInfo.WifiBSSID, c.deviceInfo.WifiSSID)) } - w.Write(tlv2.T177(c.version.BuildTime, c.version.SdkVersion)) - w.Write(tlv2.T516()) - w.Write(tlv2.T521(0)) - w.Write(tlv2.T525(tlv2.T536([]byte{0x01, 0x00}))) + w.Write(tlv.T177(c.version.BuildTime, c.version.SdkVersion)) + w.Write(tlv.T516()) + w.Write(tlv.T521(0)) + w.Write(tlv.T525(tlv.T536([]byte{0x01, 0x00}))) }) - sso := packets2.BuildSsoPacket(seq, c.version.AppId, c.version.SubAppId, "wtlogin.login", c.deviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, req, c.ksid) - packet := packets2.BuildLoginPacket(c.Uin, 2, make([]byte, 16), sso, []byte{}) + sso := packets.BuildSsoPacket(seq, c.version.AppId, c.version.SubAppId, "wtlogin.login", c.deviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, req, c.ksid) + packet := packets.BuildLoginPacket(c.Uin, 2, make([]byte, 16), sso, []byte{}) return seq, packet } func (c *QQClient) buildDeviceLockLoginPacket() (uint16, []byte) { seq := c.nextSeq() - req := packets2.BuildOicqRequestPacket(c.Uin, 0x0810, c.ecdh, c.RandomKey, func(w *binary.Writer) { + req := packets.BuildOicqRequestPacket(c.Uin, 0x0810, c.ecdh, c.RandomKey, func(w *binary.Writer) { w.WriteUInt16(20) w.WriteUInt16(4) - w.Write(tlv2.T8(2052)) - w.Write(tlv2.T104(c.t104)) - w.Write(tlv2.T116(c.version.MiscBitmap, c.version.SubSigmap)) - w.Write(tlv2.T401(c.g)) + w.Write(tlv.T8(2052)) + w.Write(tlv.T104(c.t104)) + w.Write(tlv.T116(c.version.MiscBitmap, c.version.SubSigmap)) + w.Write(tlv.T401(c.g)) }) - sso := packets2.BuildSsoPacket(seq, c.version.AppId, c.version.SubAppId, "wtlogin.login", c.deviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, req, c.ksid) - packet := packets2.BuildLoginPacket(c.Uin, 2, make([]byte, 16), sso, []byte{}) + sso := packets.BuildSsoPacket(seq, c.version.AppId, c.version.SubAppId, "wtlogin.login", c.deviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, req, c.ksid) + packet := packets.BuildLoginPacket(c.Uin, 2, make([]byte, 16), sso, []byte{}) return seq, packet } func (c *QQClient) buildQRCodeFetchRequestPacket() (uint16, []byte) { watch := genVersionInfo(AndroidWatch) seq := c.nextSeq() - req := packets2.BuildOicqRequestPacket(0, 0x812, c.ecdh, c.RandomKey, func(w *binary.Writer) { + req := packets.BuildOicqRequestPacket(0, 0x812, c.ecdh, c.RandomKey, func(w *binary.Writer) { w.WriteHex(`0001110000001000000072000000`) // trans header w.WriteUInt32(uint32(time.Now().Unix())) - w.Write(packets2.BuildCode2DRequestPacket(0, 0, 0x31, func(w *binary.Writer) { + w.Write(packets.BuildCode2DRequestPacket(0, 0, 0x31, func(w *binary.Writer) { w.WriteUInt16(0) // const w.WriteUInt32(16) // app id w.WriteUInt64(0) // const @@ -131,26 +130,26 @@ func (c *QQClient) buildQRCodeFetchRequestPacket() (uint16, []byte) { w.WriteBytesShort(EmptyBytes) w.WriteUInt16(6) - w.Write(tlv2.T16(watch.SSOVersion, 16, watch.AppId, c.deviceInfo.Guid, []byte(watch.ApkId), []byte(watch.SortVersionName), watch.ApkSign)) - w.Write(tlv2.T1B(0, 0, 3, 4, 72, 2, 2)) - w.Write(tlv2.T1D(watch.MiscBitmap)) - w.Write(tlv2.T1F(false, c.deviceInfo.OSType, []byte("7.1.2"), []byte("China Mobile GSM"), c.deviceInfo.APN, 2)) - w.Write(tlv2.T33(c.deviceInfo.Guid)) - w.Write(tlv2.T35(8)) + w.Write(tlv.T16(watch.SSOVersion, 16, watch.AppId, c.deviceInfo.Guid, []byte(watch.ApkId), []byte(watch.SortVersionName), watch.ApkSign)) + w.Write(tlv.T1B(0, 0, 3, 4, 72, 2, 2)) + w.Write(tlv.T1D(watch.MiscBitmap)) + w.Write(tlv.T1F(false, c.deviceInfo.OSType, []byte("7.1.2"), []byte("China Mobile GSM"), c.deviceInfo.APN, 2)) + w.Write(tlv.T33(c.deviceInfo.Guid)) + w.Write(tlv.T35(8)) })) }) - sso := packets2.BuildSsoPacket(seq, watch.AppId, c.version.SubAppId, "wtlogin.trans_emp", c.deviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, req, c.ksid) - packet := packets2.BuildLoginPacket(0, 2, make([]byte, 16), sso, []byte{}) + sso := packets.BuildSsoPacket(seq, watch.AppId, c.version.SubAppId, "wtlogin.trans_emp", c.deviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, req, c.ksid) + packet := packets.BuildLoginPacket(0, 2, make([]byte, 16), sso, []byte{}) return seq, packet } func (c *QQClient) buildQRCodeResultQueryRequestPacket(sig []byte) (uint16, []byte) { watch := genVersionInfo(AndroidWatch) seq := c.nextSeq() - req := packets2.BuildOicqRequestPacket(0, 0x812, c.ecdh, c.RandomKey, func(w *binary.Writer) { + req := packets.BuildOicqRequestPacket(0, 0x812, c.ecdh, c.RandomKey, func(w *binary.Writer) { w.WriteHex(`0000620000001000000072000000`) // trans header w.WriteUInt32(uint32(time.Now().Unix())) - w.Write(packets2.BuildCode2DRequestPacket(1, 0, 0x12, func(w *binary.Writer) { + w.Write(packets.BuildCode2DRequestPacket(1, 0, 0x12, func(w *binary.Writer) { w.WriteUInt16(5) // const w.WriteByte(1) // const w.WriteUInt32(8) // product type @@ -162,246 +161,246 @@ func (c *QQClient) buildQRCodeResultQueryRequestPacket(sig []byte) (uint16, []by w.WriteUInt16(0) // const })) }) - sso := packets2.BuildSsoPacket(seq, watch.AppId, c.version.SubAppId, "wtlogin.trans_emp", c.deviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, req, c.ksid) - packet := packets2.BuildLoginPacket(0, 2, make([]byte, 16), sso, []byte{}) + sso := packets.BuildSsoPacket(seq, watch.AppId, c.version.SubAppId, "wtlogin.trans_emp", c.deviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, req, c.ksid) + packet := packets.BuildLoginPacket(0, 2, make([]byte, 16), sso, []byte{}) return seq, packet } func (c *QQClient) buildQRCodeLoginPacket(t106, t16a, t318 []byte) (uint16, []byte) { seq := c.nextSeq() - req := packets2.BuildOicqRequestPacket(c.Uin, 0x0810, c.ecdh, c.RandomKey, func(w *binary.Writer) { + req := packets.BuildOicqRequestPacket(c.Uin, 0x0810, c.ecdh, c.RandomKey, func(w *binary.Writer) { w.WriteUInt16(9) w.WriteUInt16(24) - w.Write(tlv2.T18(16, uint32(c.Uin))) - w.Write(tlv2.T1(uint32(c.Uin), c.deviceInfo.IpAddress)) + w.Write(tlv.T18(16, uint32(c.Uin))) + w.Write(tlv.T1(uint32(c.Uin), c.deviceInfo.IpAddress)) w.Write(binary.NewWriterF(func(w *binary.Writer) { w.WriteUInt16(0x106) w.WriteBytesShort(t106) })) // w.Write(tlv.T106(uint32(c.Uin), 0, c.version.AppId, c.version.SSOVersion, c.PasswordMd5, true, c.deviceInfo.Guid, c.deviceInfo.TgtgtKey, 0)) - w.Write(tlv2.T116(c.version.MiscBitmap, c.version.SubSigmap)) - w.Write(tlv2.T100(c.version.SSOVersion, c.version.SubAppId, c.version.MainSigMap)) - w.Write(tlv2.T107(0)) - w.Write(tlv2.T142(c.version.ApkId)) - w.Write(tlv2.T144( + w.Write(tlv.T116(c.version.MiscBitmap, c.version.SubSigmap)) + w.Write(tlv.T100(c.version.SSOVersion, c.version.SubAppId, c.version.MainSigMap)) + w.Write(tlv.T107(0)) + w.Write(tlv.T142(c.version.ApkId)) + w.Write(tlv.T144( []byte(c.deviceInfo.IMEI), c.deviceInfo.GenDeviceInfoData(), c.deviceInfo.OSType, c.deviceInfo.Version.Release, c.deviceInfo.SimInfo, c.deviceInfo.APN, - false, true, false, tlv2.GuidFlag(), + false, true, false, tlv.GuidFlag(), c.deviceInfo.Model, c.deviceInfo.Guid, c.deviceInfo.Brand, c.deviceInfo.TgtgtKey, )) - w.Write(tlv2.T145(c.deviceInfo.Guid)) - w.Write(tlv2.T147(16, []byte(c.version.SortVersionName), c.version.ApkSign)) + w.Write(tlv.T145(c.deviceInfo.Guid)) + w.Write(tlv.T147(16, []byte(c.version.SortVersionName), c.version.ApkSign)) w.Write(binary.NewWriterF(func(w *binary.Writer) { w.WriteUInt16(0x16A) w.WriteBytesShort(t16a) })) - w.Write(tlv2.T154(seq)) - w.Write(tlv2.T141(c.deviceInfo.SimInfo, c.deviceInfo.APN)) - w.Write(tlv2.T8(2052)) - w.Write(tlv2.T511([]string{ + w.Write(tlv.T154(seq)) + w.Write(tlv.T141(c.deviceInfo.SimInfo, c.deviceInfo.APN)) + w.Write(tlv.T8(2052)) + w.Write(tlv.T511([]string{ "tenpay.com", "openmobile.qq.com", "docs.qq.com", "connect.qq.com", "qzone.qq.com", "vip.qq.com", "gamecenter.qq.com", "qun.qq.com", "game.qq.com", "qqweb.qq.com", "office.qq.com", "ti.qq.com", "mail.qq.com", "mma.qq.com", })) - w.Write(tlv2.T187(c.deviceInfo.MacAddress)) - w.Write(tlv2.T188(c.deviceInfo.AndroidId)) + w.Write(tlv.T187(c.deviceInfo.MacAddress)) + w.Write(tlv.T188(c.deviceInfo.AndroidId)) if len(c.deviceInfo.IMSIMd5) != 0 { - w.Write(tlv2.T194(c.deviceInfo.IMSIMd5)) + w.Write(tlv.T194(c.deviceInfo.IMSIMd5)) } - w.Write(tlv2.T191(0x00)) + w.Write(tlv.T191(0x00)) if len(c.deviceInfo.WifiBSSID) != 0 && len(c.deviceInfo.WifiSSID) != 0 { - w.Write(tlv2.T202(c.deviceInfo.WifiBSSID, c.deviceInfo.WifiSSID)) + w.Write(tlv.T202(c.deviceInfo.WifiBSSID, c.deviceInfo.WifiSSID)) } - w.Write(tlv2.T177(c.version.BuildTime, c.version.SdkVersion)) - w.Write(tlv2.T516()) - w.Write(tlv2.T521(8)) + w.Write(tlv.T177(c.version.BuildTime, c.version.SdkVersion)) + w.Write(tlv.T516()) + w.Write(tlv.T521(8)) // w.Write(tlv.T525(tlv.T536([]byte{0x01, 0x00}))) w.Write(binary.NewWriterF(func(w *binary.Writer) { w.WriteUInt16(0x318) w.WriteBytesShort(t318) })) }) - sso := packets2.BuildSsoPacket(seq, c.version.AppId, c.version.SubAppId, "wtlogin.login", c.deviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, req, c.ksid) - packet := packets2.BuildLoginPacket(c.Uin, 2, make([]byte, 16), sso, []byte{}) + sso := packets.BuildSsoPacket(seq, c.version.AppId, c.version.SubAppId, "wtlogin.login", c.deviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, req, c.ksid) + packet := packets.BuildLoginPacket(c.Uin, 2, make([]byte, 16), sso, []byte{}) return seq, packet } func (c *QQClient) buildCaptchaPacket(result string, sign []byte) (uint16, []byte) { seq := c.nextSeq() - req := packets2.BuildOicqRequestPacket(c.Uin, 0x810, c.ecdh, c.RandomKey, func(w *binary.Writer) { + req := packets.BuildOicqRequestPacket(c.Uin, 0x810, c.ecdh, c.RandomKey, func(w *binary.Writer) { w.WriteUInt16(2) // sub command w.WriteUInt16(4) - w.Write(tlv2.T2(result, sign)) - w.Write(tlv2.T8(2052)) - w.Write(tlv2.T104(c.t104)) - w.Write(tlv2.T116(c.version.MiscBitmap, c.version.SubSigmap)) + w.Write(tlv.T2(result, sign)) + w.Write(tlv.T8(2052)) + w.Write(tlv.T104(c.t104)) + w.Write(tlv.T116(c.version.MiscBitmap, c.version.SubSigmap)) }) - sso := packets2.BuildSsoPacket(seq, c.version.AppId, c.version.SubAppId, "wtlogin.login", c.deviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, req, c.ksid) - packet := packets2.BuildLoginPacket(c.Uin, 2, make([]byte, 16), sso, []byte{}) + sso := packets.BuildSsoPacket(seq, c.version.AppId, c.version.SubAppId, "wtlogin.login", c.deviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, req, c.ksid) + packet := packets.BuildLoginPacket(c.Uin, 2, make([]byte, 16), sso, []byte{}) return seq, packet } func (c *QQClient) buildSMSRequestPacket() (uint16, []byte) { seq := c.nextSeq() - req := packets2.BuildOicqRequestPacket(c.Uin, 0x810, c.ecdh, c.RandomKey, func(w *binary.Writer) { + req := packets.BuildOicqRequestPacket(c.Uin, 0x810, c.ecdh, c.RandomKey, func(w *binary.Writer) { w.WriteUInt16(8) w.WriteUInt16(6) - w.Write(tlv2.T8(2052)) - w.Write(tlv2.T104(c.t104)) - w.Write(tlv2.T116(c.version.MiscBitmap, c.version.SubSigmap)) - w.Write(tlv2.T174(c.t174)) - w.Write(tlv2.T17A(9)) - w.Write(tlv2.T197()) + w.Write(tlv.T8(2052)) + w.Write(tlv.T104(c.t104)) + w.Write(tlv.T116(c.version.MiscBitmap, c.version.SubSigmap)) + w.Write(tlv.T174(c.t174)) + w.Write(tlv.T17A(9)) + w.Write(tlv.T197()) }) - sso := packets2.BuildSsoPacket(seq, c.version.AppId, c.version.SubAppId, "wtlogin.login", c.deviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, req, c.ksid) - packet := packets2.BuildLoginPacket(c.Uin, 2, make([]byte, 16), sso, []byte{}) + sso := packets.BuildSsoPacket(seq, c.version.AppId, c.version.SubAppId, "wtlogin.login", c.deviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, req, c.ksid) + packet := packets.BuildLoginPacket(c.Uin, 2, make([]byte, 16), sso, []byte{}) return seq, packet } func (c *QQClient) buildSMSCodeSubmitPacket(code string) (uint16, []byte) { seq := c.nextSeq() - req := packets2.BuildOicqRequestPacket(c.Uin, 0x810, c.ecdh, c.RandomKey, func(w *binary.Writer) { + req := packets.BuildOicqRequestPacket(c.Uin, 0x810, c.ecdh, c.RandomKey, func(w *binary.Writer) { w.WriteUInt16(7) w.WriteUInt16(7) - w.Write(tlv2.T8(2052)) - w.Write(tlv2.T104(c.t104)) - w.Write(tlv2.T116(c.version.MiscBitmap, c.version.SubSigmap)) - w.Write(tlv2.T174(c.t174)) - w.Write(tlv2.T17C(code)) - w.Write(tlv2.T401(c.g)) - w.Write(tlv2.T198()) + w.Write(tlv.T8(2052)) + w.Write(tlv.T104(c.t104)) + w.Write(tlv.T116(c.version.MiscBitmap, c.version.SubSigmap)) + w.Write(tlv.T174(c.t174)) + w.Write(tlv.T17C(code)) + w.Write(tlv.T401(c.g)) + w.Write(tlv.T198()) }) - sso := packets2.BuildSsoPacket(seq, c.version.AppId, c.version.SubAppId, "wtlogin.login", c.deviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, req, c.ksid) - packet := packets2.BuildLoginPacket(c.Uin, 2, make([]byte, 16), sso, []byte{}) + sso := packets.BuildSsoPacket(seq, c.version.AppId, c.version.SubAppId, "wtlogin.login", c.deviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, req, c.ksid) + packet := packets.BuildLoginPacket(c.Uin, 2, make([]byte, 16), sso, []byte{}) return seq, packet } func (c *QQClient) buildTicketSubmitPacket(ticket string) (uint16, []byte) { seq := c.nextSeq() - req := packets2.BuildOicqRequestPacket(c.Uin, 0x810, c.ecdh, c.RandomKey, func(w *binary.Writer) { + req := packets.BuildOicqRequestPacket(c.Uin, 0x810, c.ecdh, c.RandomKey, func(w *binary.Writer) { w.WriteUInt16(2) w.WriteUInt16(4) - w.Write(tlv2.T193(ticket)) - w.Write(tlv2.T8(2052)) - w.Write(tlv2.T104(c.t104)) - w.Write(tlv2.T116(c.version.MiscBitmap, c.version.SubSigmap)) + w.Write(tlv.T193(ticket)) + w.Write(tlv.T8(2052)) + w.Write(tlv.T104(c.t104)) + w.Write(tlv.T116(c.version.MiscBitmap, c.version.SubSigmap)) }) - sso := packets2.BuildSsoPacket(seq, c.version.AppId, c.version.SubAppId, "wtlogin.login", c.deviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, req, c.ksid) - packet := packets2.BuildLoginPacket(c.Uin, 2, make([]byte, 16), sso, []byte{}) + sso := packets.BuildSsoPacket(seq, c.version.AppId, c.version.SubAppId, "wtlogin.login", c.deviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, req, c.ksid) + packet := packets.BuildLoginPacket(c.Uin, 2, make([]byte, 16), sso, []byte{}) return seq, packet } func (c *QQClient) buildRequestTgtgtNopicsigPacket() (uint16, []byte) { seq := c.nextSeq() - req := packets2.BuildOicqRequestPacket(c.Uin, 0x0810, crypto.NewEncryptSession(c.sigInfo.t133), c.sigInfo.wtSessionTicketKey, func(w *binary.Writer) { + req := packets.BuildOicqRequestPacket(c.Uin, 0x0810, crypto.NewEncryptSession(c.sigInfo.t133), c.sigInfo.wtSessionTicketKey, func(w *binary.Writer) { w.WriteUInt16(15) w.WriteUInt16(24) - w.Write(tlv2.T18(16, uint32(c.Uin))) - w.Write(tlv2.T1(uint32(c.Uin), c.deviceInfo.IpAddress)) + w.Write(tlv.T18(16, uint32(c.Uin))) + w.Write(tlv.T1(uint32(c.Uin), c.deviceInfo.IpAddress)) w.Write(binary.NewWriterF(func(w *binary.Writer) { w.WriteUInt16(0x106) w.WriteBytesShort(c.sigInfo.encryptedA1) })) - w.Write(tlv2.T116(c.version.MiscBitmap, c.version.SubSigmap)) - w.Write(tlv2.T100(c.version.SSOVersion, 2, c.version.MainSigMap)) - w.Write(tlv2.T107(0)) - w.Write(tlv2.T144( + w.Write(tlv.T116(c.version.MiscBitmap, c.version.SubSigmap)) + w.Write(tlv.T100(c.version.SSOVersion, 2, c.version.MainSigMap)) + w.Write(tlv.T107(0)) + w.Write(tlv.T144( c.deviceInfo.AndroidId, c.deviceInfo.GenDeviceInfoData(), c.deviceInfo.OSType, c.deviceInfo.Version.Release, c.deviceInfo.SimInfo, c.deviceInfo.APN, - false, true, false, tlv2.GuidFlag(), + false, true, false, tlv.GuidFlag(), c.deviceInfo.Model, c.deviceInfo.Guid, c.deviceInfo.Brand, c.deviceInfo.TgtgtKey, )) - w.Write(tlv2.T142(c.version.ApkId)) - w.Write(tlv2.T145(c.deviceInfo.Guid)) - w.Write(tlv2.T16A(c.sigInfo.srmToken)) - w.Write(tlv2.T154(seq)) - w.Write(tlv2.T141(c.deviceInfo.SimInfo, c.deviceInfo.APN)) - w.Write(tlv2.T8(2052)) - w.Write(tlv2.T511([]string{ + w.Write(tlv.T142(c.version.ApkId)) + w.Write(tlv.T145(c.deviceInfo.Guid)) + w.Write(tlv.T16A(c.sigInfo.srmToken)) + w.Write(tlv.T154(seq)) + w.Write(tlv.T141(c.deviceInfo.SimInfo, c.deviceInfo.APN)) + w.Write(tlv.T8(2052)) + w.Write(tlv.T511([]string{ "tenpay.com", "openmobile.qq.com", "docs.qq.com", "connect.qq.com", "qzone.qq.com", "vip.qq.com", "qun.qq.com", "game.qq.com", "qqweb.qq.com", "office.qq.com", "ti.qq.com", "mail.qq.com", "qzone.com", "mma.qq.com", })) - w.Write(tlv2.T147(16, []byte(c.version.SortVersionName), c.version.ApkSign)) - w.Write(tlv2.T177(c.version.BuildTime, c.version.SdkVersion)) - w.Write(tlv2.T400(c.g, c.Uin, c.deviceInfo.Guid, c.dpwd, 1, 16, c.randSeed)) - w.Write(tlv2.T187(c.deviceInfo.MacAddress)) - w.Write(tlv2.T188(c.deviceInfo.AndroidId)) - w.Write(tlv2.T194(c.deviceInfo.IMSIMd5)) - w.Write(tlv2.T202(c.deviceInfo.WifiBSSID, c.deviceInfo.WifiSSID)) - w.Write(tlv2.T516()) - w.Write(tlv2.T521(0)) - w.Write(tlv2.T525(tlv2.T536([]byte{0x01, 0x00}))) + w.Write(tlv.T147(16, []byte(c.version.SortVersionName), c.version.ApkSign)) + w.Write(tlv.T177(c.version.BuildTime, c.version.SdkVersion)) + w.Write(tlv.T400(c.g, c.Uin, c.deviceInfo.Guid, c.dpwd, 1, 16, c.randSeed)) + w.Write(tlv.T187(c.deviceInfo.MacAddress)) + w.Write(tlv.T188(c.deviceInfo.AndroidId)) + w.Write(tlv.T194(c.deviceInfo.IMSIMd5)) + w.Write(tlv.T202(c.deviceInfo.WifiBSSID, c.deviceInfo.WifiSSID)) + w.Write(tlv.T516()) + w.Write(tlv.T521(0)) + w.Write(tlv.T525(tlv.T536([]byte{0x01, 0x00}))) }) - packet := packets2.BuildUniPacket(c.Uin, seq, "wtlogin.exchange_emp", 2, c.OutGoingPacketSessionId, []byte{}, make([]byte, 16), req) + packet := packets.BuildUniPacket(c.Uin, seq, "wtlogin.exchange_emp", 2, c.OutGoingPacketSessionId, []byte{}, make([]byte, 16), req) return seq, packet } func (c *QQClient) buildRequestChangeSigPacket() (uint16, []byte) { seq := c.nextSeq() - req := packets2.BuildOicqRequestPacket(c.Uin, 0x0810, c.ecdh, c.RandomKey, func(w *binary.Writer) { + req := packets.BuildOicqRequestPacket(c.Uin, 0x0810, c.ecdh, c.RandomKey, func(w *binary.Writer) { w.WriteUInt16(11) w.WriteUInt16(17) - w.Write(tlv2.T100(c.version.SSOVersion, 100, c.version.MainSigMap)) - w.Write(tlv2.T10A(c.sigInfo.tgt)) - w.Write(tlv2.T116(c.version.MiscBitmap, c.version.SubSigmap)) - w.Write(tlv2.T108(c.deviceInfo.IMEI)) + w.Write(tlv.T100(c.version.SSOVersion, 100, c.version.MainSigMap)) + w.Write(tlv.T10A(c.sigInfo.tgt)) + w.Write(tlv.T116(c.version.MiscBitmap, c.version.SubSigmap)) + w.Write(tlv.T108(c.deviceInfo.IMEI)) h := md5.Sum(c.sigInfo.d2Key) - w.Write(tlv2.T144( + w.Write(tlv.T144( c.deviceInfo.AndroidId, c.deviceInfo.GenDeviceInfoData(), c.deviceInfo.OSType, c.deviceInfo.Version.Release, c.deviceInfo.SimInfo, c.deviceInfo.APN, - false, true, false, tlv2.GuidFlag(), + false, true, false, tlv.GuidFlag(), c.deviceInfo.Model, c.deviceInfo.Guid, c.deviceInfo.Brand, h[:], )) - w.Write(tlv2.T143(c.sigInfo.d2)) - w.Write(tlv2.T142(c.version.ApkId)) - w.Write(tlv2.T154(seq)) - w.Write(tlv2.T18(16, uint32(c.Uin))) - w.Write(tlv2.T141(c.deviceInfo.SimInfo, c.deviceInfo.APN)) - w.Write(tlv2.T8(2052)) - w.Write(tlv2.T147(16, []byte(c.version.SortVersionName), c.version.ApkSign)) - w.Write(tlv2.T177(c.version.BuildTime, c.version.SdkVersion)) - w.Write(tlv2.T187(c.deviceInfo.MacAddress)) - w.Write(tlv2.T188(c.deviceInfo.AndroidId)) - w.Write(tlv2.T194(c.deviceInfo.IMSIMd5)) - w.Write(tlv2.T511([]string{ + w.Write(tlv.T143(c.sigInfo.d2)) + w.Write(tlv.T142(c.version.ApkId)) + w.Write(tlv.T154(seq)) + w.Write(tlv.T18(16, uint32(c.Uin))) + w.Write(tlv.T141(c.deviceInfo.SimInfo, c.deviceInfo.APN)) + w.Write(tlv.T8(2052)) + w.Write(tlv.T147(16, []byte(c.version.SortVersionName), c.version.ApkSign)) + w.Write(tlv.T177(c.version.BuildTime, c.version.SdkVersion)) + w.Write(tlv.T187(c.deviceInfo.MacAddress)) + w.Write(tlv.T188(c.deviceInfo.AndroidId)) + w.Write(tlv.T194(c.deviceInfo.IMSIMd5)) + w.Write(tlv.T511([]string{ "tenpay.com", "openmobile.qq.com", "docs.qq.com", "connect.qq.com", "qzone.qq.com", "vip.qq.com", "qun.qq.com", "game.qq.com", "qqweb.qq.com", "office.qq.com", "ti.qq.com", "mail.qq.com", "qzone.com", "mma.qq.com", })) // w.Write(tlv.T202(c.deviceInfo.WifiBSSID, c.deviceInfo.WifiSSID)) }) - sso := packets2.BuildSsoPacket(seq, c.version.AppId, c.version.SubAppId, "wtlogin.exchange_emp", c.deviceInfo.IMEI, c.sigInfo.tgt, c.OutGoingPacketSessionId, req, c.ksid) - packet := packets2.BuildLoginPacket(c.Uin, 2, make([]byte, 16), sso, []byte{}) + sso := packets.BuildSsoPacket(seq, c.version.AppId, c.version.SubAppId, "wtlogin.exchange_emp", c.deviceInfo.IMEI, c.sigInfo.tgt, c.OutGoingPacketSessionId, req, c.ksid) + packet := packets.BuildLoginPacket(c.Uin, 2, make([]byte, 16), sso, []byte{}) return seq, packet } @@ -448,8 +447,8 @@ func (c *QQClient) buildClientRegisterPacket() (uint16, []byte) { Context: make(map[string]string), Status: make(map[string]string), } - sso := packets2.BuildSsoPacket(seq, c.version.AppId, c.version.SubAppId, "StatSvc.register", c.deviceInfo.IMEI, c.sigInfo.tgt, c.OutGoingPacketSessionId, pkt.ToBytes(), c.ksid) - packet := packets2.BuildLoginPacket(c.Uin, 1, c.sigInfo.d2Key, sso, c.sigInfo.d2) + sso := packets.BuildSsoPacket(seq, c.version.AppId, c.version.SubAppId, "StatSvc.register", c.deviceInfo.IMEI, c.sigInfo.tgt, c.OutGoingPacketSessionId, pkt.ToBytes(), c.ksid) + packet := packets.BuildLoginPacket(c.Uin, 1, c.sigInfo.d2Key, sso, c.sigInfo.d2) return seq, packet } @@ -487,7 +486,7 @@ func (c *QQClient) buildStatusSetPacket(status, extStatus int32) (uint16, []byte Context: make(map[string]string), Status: make(map[string]string), } - packet := packets2.BuildUniPacket(c.Uin, seq, "StatSvc.SetStatusFromClient", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, pkt.ToBytes()) + packet := packets.BuildUniPacket(c.Uin, seq, "StatSvc.SetStatusFromClient", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, pkt.ToBytes()) return seq, packet } @@ -509,7 +508,7 @@ func (c *QQClient) buildConfPushRespPacket(t int32, pktSeq int64, jceBuf []byte) Context: make(map[string]string), Status: make(map[string]string), } - packet := packets2.BuildUniPacket(c.Uin, seq, "ConfigPushSvc.PushResp", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, pkt.ToBytes()) + packet := packets.BuildUniPacket(c.Uin, seq, "ConfigPushSvc.PushResp", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, pkt.ToBytes()) return seq, packet } @@ -567,7 +566,7 @@ func (c *QQClient) buildFriendGroupListRequestPacket(friendStartIndex, friendLis Context: make(map[string]string), Status: make(map[string]string), } - packet := packets2.BuildUniPacket(c.Uin, seq, "friendlist.getFriendGroupList", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, pkt.ToBytes()) + packet := packets.BuildUniPacket(c.Uin, seq, "friendlist.getFriendGroupList", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, pkt.ToBytes()) return seq, packet } @@ -652,7 +651,7 @@ func (c *QQClient) buildSummaryCardRequestPacket(target int64) (uint16, []byte) Context: make(map[string]string), Status: make(map[string]string), } - packet := packets2.BuildUniPacket(c.Uin, seq, "SummaryCard.ReqSummaryCard", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, pkt.ToBytes()) + packet := packets.BuildUniPacket(c.Uin, seq, "SummaryCard.ReqSummaryCard", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, pkt.ToBytes()) return seq, packet } @@ -677,7 +676,7 @@ func (c *QQClient) buildFriendDeletePacket(target int64) (uint16, []byte) { Context: make(map[string]string), Status: make(map[string]string), } - packet := packets2.BuildUniPacket(c.Uin, seq, "friendlist.delFriend", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, pkt.ToBytes()) + packet := packets.BuildUniPacket(c.Uin, seq, "friendlist.delFriend", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, pkt.ToBytes()) return seq, packet } @@ -708,7 +707,7 @@ func (c *QQClient) buildGroupListRequestPacket(vecCookie []byte) (uint16, []byte Context: make(map[string]string), Status: make(map[string]string), } - packet := packets2.BuildUniPacket(c.Uin, seq, "friendlist.GetTroopListReqV2", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, pkt.ToBytes()) + packet := packets.BuildUniPacket(c.Uin, seq, "friendlist.GetTroopListReqV2", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, pkt.ToBytes()) return seq, packet } @@ -736,7 +735,7 @@ func (c *QQClient) buildGroupMemberListRequestPacket(groupUin, groupCode, nextUi Context: make(map[string]string), Status: make(map[string]string), } - packet := packets2.BuildUniPacket(c.Uin, seq, "friendlist.GetTroopMemberListReq", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, pkt.ToBytes()) + packet := packets.BuildUniPacket(c.Uin, seq, "friendlist.GetTroopMemberListReq", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, pkt.ToBytes()) return seq, packet } @@ -751,7 +750,7 @@ func (c *QQClient) buildGroupMemberInfoRequestPacket(groupCode, uin int64) (uint RichCardNameVer: 1, } payload, _ := proto.Marshal(req) - packet := packets2.BuildUniPacket(c.Uin, seq, "group_member_card.get_group_member_card_info", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload) + packet := packets.BuildUniPacket(c.Uin, seq, "group_member_card.get_group_member_card_info", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload) return seq, packet } @@ -782,7 +781,7 @@ func (c *QQClient) buildGetMessageRequestPacket(flag msg.SyncFlag, msgTime int64 ServerBuf: []byte{}, } payload, _ := proto.Marshal(req) - packet := packets2.BuildUniPacket(c.Uin, seq, "MessageSvc.PbGetMsg", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, payload) + packet := packets.BuildUniPacket(c.Uin, seq, "MessageSvc.PbGetMsg", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, payload) return seq, packet } @@ -791,7 +790,7 @@ func (c *QQClient) buildDeleteMessageRequestPacket(msg []*pb.MessageItem) (uint1 seq := c.nextSeq() req := &pb.DeleteMessageRequest{Items: msg} payload, _ := proto.Marshal(req) - packet := packets2.BuildUniPacket(c.Uin, seq, "MessageSvc.PbDeleteMsg", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload) + packet := packets.BuildUniPacket(c.Uin, seq, "MessageSvc.PbDeleteMsg", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload) return seq, packet } @@ -819,7 +818,7 @@ func (c *QQClient) buildDeleteOnlinePushPacket(uin int64, svrip int32, pushToken Context: make(map[string]string), Status: make(map[string]string), } - return packets2.BuildUniPacket(c.Uin, seq, "OnlinePush.RespPush", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, pkt.ToBytes()) + return packets.BuildUniPacket(c.Uin, seq, "OnlinePush.RespPush", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, pkt.ToBytes()) } // LongConn.OffPicUp @@ -847,7 +846,7 @@ func (c *QQClient) buildOffPicUpPacket(target int64, md5 []byte, size int32) (ui }, } payload, _ := proto.Marshal(req) - packet := packets2.BuildUniPacket(c.Uin, seq, "LongConn.OffPicUp", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload) + packet := packets.BuildUniPacket(c.Uin, seq, "LongConn.OffPicUp", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload) return seq, packet } @@ -868,7 +867,7 @@ func (c *QQClient) buildSystemMsgNewFriendPacket() (uint16, []byte) { FriendMsgTypeFlag: 1, } payload, _ := proto.Marshal(req) - packet := packets2.BuildUniPacket(c.Uin, seq, "ProfileService.Pb.ReqSystemMsgNew.Friend", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload) + packet := packets.BuildUniPacket(c.Uin, seq, "ProfileService.Pb.ReqSystemMsgNew.Friend", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload) return seq, packet } @@ -895,7 +894,7 @@ func (c *QQClient) buildEditGroupTagPacket(groupCode, memberUin int64, newTag st Context: map[string]string{}, Status: map[string]string{}, } - packet := packets2.BuildUniPacket(c.Uin, seq, "friendlist.ModifyGroupCardReq", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, pkt.ToBytes()) + packet := packets.BuildUniPacket(c.Uin, seq, "friendlist.ModifyGroupCardReq", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, pkt.ToBytes()) return seq, packet } @@ -903,10 +902,10 @@ func (c *QQClient) buildEditGroupTagPacket(groupCode, memberUin int64, newTag st func (c *QQClient) buildEditSpecialTitlePacket(groupCode, memberUin int64, newTitle string) (uint16, []byte) { seq := c.nextSeq() body := &oidb0x8fc.ReqBody{ - GroupCode: &groupCode, + GroupCode: proto.Uint64(uint64(groupCode)), MemLevelInfo: []*oidb0x8fc.MemberInfo{ { - Uin: &memberUin, + Uin: proto.Uint64(uint64(memberUin)), UinName: []byte(newTitle), SpecialTitle: []byte(newTitle), SpecialTitleExpireTime: proto.Int32(-1), @@ -915,7 +914,7 @@ func (c *QQClient) buildEditSpecialTitlePacket(groupCode, memberUin int64, newTi } b, _ := body.Marshal() payload := c.packOIDBPackage(2300, 2, b) - packet := packets2.BuildUniPacket(c.Uin, seq, "OidbSvc.0x8fc_2", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload) + packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0x8fc_2", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload) return seq, packet } @@ -924,16 +923,16 @@ func (c *QQClient) buildGroupOperationPacket(body *oidb0x89a.ReqBody) (uint16, [ seq := c.nextSeq() b, _ := body.Marshal() payload := c.packOIDBPackage(2202, 0, b) - packet := packets2.BuildUniPacket(c.Uin, seq, "OidbSvc.0x89a_0", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload) + packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0x89a_0", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload) return seq, packet } // OidbSvc.0x89a_0 func (c *QQClient) buildGroupNameUpdatePacket(groupCode int64, newName string) (uint16, []byte) { body := &oidb0x89a.ReqBody{ - GroupCode: &groupCode, + GroupCode: proto.Uint64(uint64(groupCode)), StGroupInfo: &oidb0x89a.GroupInfo{ - IngGroupName: []byte(newName), + GroupName: []byte(newName), }, } return c.buildGroupOperationPacket(body) @@ -941,9 +940,9 @@ func (c *QQClient) buildGroupNameUpdatePacket(groupCode int64, newName string) ( func (c *QQClient) buildGroupMemoUpdatePacket(groupCode int64, newMemo string) (uint16, []byte) { body := &oidb0x89a.ReqBody{ - GroupCode: &groupCode, + GroupCode: proto.Uint64(uint64(groupCode)), StGroupInfo: &oidb0x89a.GroupInfo{ - IngGroupMemo: []byte(newMemo), + GroupMemo: []byte(newMemo), }, } return c.buildGroupOperationPacket(body) @@ -952,16 +951,14 @@ func (c *QQClient) buildGroupMemoUpdatePacket(groupCode int64, newMemo string) ( // OidbSvc.0x89a_0 func (c *QQClient) buildGroupMuteAllPacket(groupCode int64, mute bool) (uint16, []byte) { body := &oidb0x89a.ReqBody{ - GroupCode: &groupCode, + GroupCode: proto.Uint64(uint64(groupCode)), StGroupInfo: &oidb0x89a.GroupInfo{ - ShutupTime: proto.Int32(func() int32 { - if mute { - return 268435455 - } - return 0 - }()), + ShutupTime: proto.Uint32(0), }, } + if mute { + body.StGroupInfo.ShutupTime = proto.Uint32(268435455) + } return c.buildGroupOperationPacket(body) } @@ -973,19 +970,19 @@ func (c *QQClient) buildGroupKickPacket(groupCode, memberUin int64, kickMsg stri flagBlock = 1 } body := &oidb0x8a0.ReqBody{ - OptUint64GroupCode: &groupCode, + GroupCode: proto.Uint64(uint64(groupCode)), MsgKickList: []*oidb0x8a0.KickMemberInfo{ { - OptUint32Operate: proto.Int32(5), - OptUint64MemberUin: &memberUin, - OptUint32Flag: proto.Int32(int32(flagBlock)), + Operate: proto.Uint32(5), + MemberUin: proto.Uint64(uint64(memberUin)), + Flag: proto.Uint32(uint32(flagBlock)), }, }, KickMsg: []byte(kickMsg), } b, _ := body.Marshal() payload := c.packOIDBPackage(2208, 0, b) - packet := packets2.BuildUniPacket(c.Uin, seq, "OidbSvc.0x8a0_0", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload) + packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0x8a0_0", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload) return seq, packet } @@ -999,7 +996,7 @@ func (c *QQClient) buildGroupMutePacket(groupCode, memberUin int64, time uint32) w.WriteUInt32(uint32(memberUin)) w.WriteUInt32(time) })) - packet := packets2.BuildUniPacket(c.Uin, seq, "OidbSvc.0x570_8", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload) + packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0x570_8", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload) return seq, packet } @@ -1007,12 +1004,12 @@ func (c *QQClient) buildGroupMutePacket(groupCode, memberUin int64, time uint32) func (c *QQClient) buildGroupPokePacket(groupCode, target int64) (uint16, []byte) { seq := c.nextSeq() body := &oidb0xed3.ReqBody{ - ToUin: &target, - GroupCode: &groupCode, + ToUin: proto.Uint64(uint64(target)), + GroupCode: proto.Uint64(uint64(groupCode)), } b, _ := body.Marshal() payload := c.packOIDBPackage(3795, 1, b) - packet := packets2.BuildUniPacket(c.Uin, seq, "OidbSvc.0xed3", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload) + packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0xed3", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload) return seq, packet } @@ -1020,12 +1017,12 @@ func (c *QQClient) buildGroupPokePacket(groupCode, target int64) (uint16, []byte func (c *QQClient) buildFriendPokePacket(target int64) (uint16, []byte) { seq := c.nextSeq() body := &oidb0xed3.ReqBody{ - ToUin: &target, - AioUin: &target, + ToUin: proto.Uint64(uint64(target)), + AioUin: proto.Uint64(uint64(target)), } b, _ := body.Marshal() payload := c.packOIDBPackage(3795, 1, b) - packet := packets2.BuildUniPacket(c.Uin, seq, "OidbSvc.0xed3", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload) + packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0xed3", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload) return seq, packet } @@ -1042,7 +1039,7 @@ func (c *QQClient) buildGroupAdminSetPacket(groupCode, member int64, flag bool) return 0 }()) })) - packet := packets2.BuildUniPacket(c.Uin, seq, "OidbSvc.0x55c_1", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload) + packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0x55c_1", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload) return seq, packet } @@ -1066,7 +1063,7 @@ func (c *QQClient) buildQuitGroupPacket(groupCode int64) (uint16, []byte) { Context: map[string]string{}, Status: map[string]string{}, } - packet := packets2.BuildUniPacket(c.Uin, seq, "ProfileService.GroupMngReq", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, pkt.ToBytes()) + packet := packets.BuildUniPacket(c.Uin, seq, "ProfileService.GroupMngReq", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, pkt.ToBytes()) return seq, packet } @@ -1086,7 +1083,7 @@ func (c *QQClient) buildAppInfoRequestPacket(id string) (uint16, []byte) { TraceId: fmt.Sprintf("%v_%v_%v", c.Uin, time.Now().Format("0102150405"), rand.Int63()), } payload, _ := proto.Marshal(body) - packet := packets2.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 } @@ -1097,7 +1094,7 @@ func (c *QQClient) buildWordSegmentationPacket(data []byte) (uint16, []byte) { Content: data, Qua: []byte("and_537065262_8.4.5"), }) - packet := packets2.BuildUniPacket(c.Uin, seq, "OidbSvc.0xd79", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload) + packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0xd79", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload) return seq, packet } @@ -1116,7 +1113,7 @@ func (c *QQClient) sendGroupGiftPacket(groupCode, uin uint64, productID message. Sig: []byte(c.getSKey()), }, }) - packet := packets2.BuildUniPacket(c.Uin, seq, "OidbSvc.0xdad_1", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload) + packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0xdad_1", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload) return seq, packet } */ diff --git a/client/decoders.go b/client/decoders.go index cae4a569..d03fa13b 100644 --- a/client/decoders.go +++ b/client/decoders.go @@ -4,9 +4,6 @@ import ( "crypto/md5" "encoding/hex" "fmt" - "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb" - "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0xd79" - "go.dedis.ch/protobuf" "net" "strconv" "strings" @@ -14,6 +11,7 @@ import ( "time" "github.com/pkg/errors" + protobuf "github.com/segmentio/encoding/proto" "google.golang.org/protobuf/proto" "github.com/Mrs4s/MiraiGo/binary" @@ -25,6 +23,8 @@ import ( "github.com/Mrs4s/MiraiGo/client/pb/profilecard" "github.com/Mrs4s/MiraiGo/client/pb/qweb" "github.com/Mrs4s/MiraiGo/client/pb/structmsg" + "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb" + "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0xd79" "github.com/Mrs4s/MiraiGo/utils" ) @@ -793,10 +793,10 @@ func decodeMSFOfflinePacket(c *QQClient, _ *incomingPacketInfo, _ []byte) (inter func decodeWordSegmentation(_ *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) { pkg := oidb.OIDBSSOPkg{} rsp := &oidb0xd79.RspBody{} - if err := protobuf.Decode(payload, &pkg); err != nil { + if err := protobuf.Unmarshal(payload, &pkg); err != nil { return nil, errors.Wrap(err, "failed to unmarshal protobuf message") } - if err := protobuf.Decode(pkg.Bodybuffer, rsp); err != nil { + if err := protobuf.Unmarshal(pkg.Bodybuffer, rsp); err != nil { return nil, errors.Wrap(err, "failed to unmarshal protobuf message") } if rsp.Content != nil { diff --git a/client/group_file.go b/client/group_file.go index dcf99f6f..96a3b554 100644 --- a/client/group_file.go +++ b/client/group_file.go @@ -4,24 +4,23 @@ import ( "crypto/sha1" "encoding/hex" "fmt" - "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb" - "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0x6d6" - "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0x6d7" - "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0x6d8" - "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0x6d9" - "go.dedis.ch/protobuf" "io" "math/rand" "os" "runtime/debug" - "github.com/Mrs4s/MiraiGo/internal/packets" - + "github.com/pkg/errors" + protobuf "github.com/segmentio/encoding/proto" "google.golang.org/protobuf/proto" - "github.com/pkg/errors" - "github.com/Mrs4s/MiraiGo/client/pb/exciting" + "github.com/Mrs4s/MiraiGo/internal/packets" + "github.com/Mrs4s/MiraiGo/internal/protobuf/data/group_file_common" + "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb" + "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0x6d6" + "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0x6d7" + "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0x6d8" + "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0x6d9" "github.com/Mrs4s/MiraiGo/utils" ) @@ -299,7 +298,7 @@ func (c *QQClient) buildGroupFileFeedsRequest(groupCode int64, fileID string, bu req := c.packOIDBPackageProto2(1753, 4, &oidb0x6d9.ReqBody{FeedsInfoReq: &oidb0x6d9.FeedsReqBody{ GroupCode: proto.Uint64(uint64(groupCode)), AppId: proto.Uint32(3), - FeedsInfoList: []*oidb0x6d9.GroupFileFeedsInfo{{ + FeedsInfoList: []*group_file_common.FeedsInfo{{ FileId: &fileID, FeedFlag: proto.Uint32(1), BusId: proto.Uint32(uint32(busId)), @@ -422,10 +421,10 @@ func (c *QQClient) buildGroupFileDeleteReqPacket(groupCode int64, parentFolderId func decodeOIDB6d81Response(_ *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) { pkg := oidb.OIDBSSOPkg{} rsp := oidb0x6d8.RspBody{} - if err := protobuf.Decode(payload, &pkg); err != nil { + if err := protobuf.Unmarshal(payload, &pkg); err != nil { return nil, errors.Wrap(err, "failed to unmarshal protobuf message") } - if err := protobuf.Decode(pkg.Bodybuffer, &rsp); err != nil { + if err := protobuf.Unmarshal(pkg.Bodybuffer, &rsp); err != nil { return nil, errors.Wrap(err, "failed to unmarshal protobuf message") } return &rsp, nil @@ -435,10 +434,10 @@ func decodeOIDB6d81Response(_ *QQClient, _ *incomingPacketInfo, payload []byte) func decodeOIDB6d62Response(_ *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) { pkg := oidb.OIDBSSOPkg{} rsp := oidb0x6d6.RspBody{} - if err := protobuf.Decode(payload, &pkg); err != nil { + if err := protobuf.Unmarshal(payload, &pkg); err != nil { return nil, errors.Wrap(err, "failed to unmarshal protobuf message") } - if err := protobuf.Decode(pkg.Bodybuffer, &rsp); err != nil { + if err := protobuf.Unmarshal(pkg.Bodybuffer, &rsp); err != nil { return nil, errors.Wrap(err, "failed to unmarshal protobuf message") } if rsp.DownloadFileRsp.DownloadUrl == nil { @@ -452,10 +451,10 @@ func decodeOIDB6d62Response(_ *QQClient, _ *incomingPacketInfo, payload []byte) func decodeOIDB6d63Response(_ *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) { pkg := oidb.OIDBSSOPkg{} rsp := oidb0x6d6.RspBody{} - if err := protobuf.Decode(payload, &pkg); err != nil { + if err := protobuf.Unmarshal(payload, &pkg); err != nil { return nil, errors.Wrap(err, "failed to unmarshal protobuf message") } - if err := protobuf.Decode(pkg.Bodybuffer, &rsp); err != nil { + if err := protobuf.Unmarshal(pkg.Bodybuffer, &rsp); err != nil { return nil, errors.Wrap(err, "failed to unmarshal protobuf message") } if rsp.DeleteFileRsp == nil { @@ -467,10 +466,10 @@ func decodeOIDB6d63Response(_ *QQClient, _ *incomingPacketInfo, payload []byte) func decodeOIDB6d60Response(_ *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) { pkg := oidb.OIDBSSOPkg{} rsp := oidb0x6d6.RspBody{} - if err := protobuf.Decode(payload, &pkg); err != nil { + if err := protobuf.Unmarshal(payload, &pkg); err != nil { return nil, errors.Wrap(err, "failed to unmarshal protobuf message") } - if err := protobuf.Decode(pkg.Bodybuffer, &rsp); err != nil { + if err := protobuf.Unmarshal(pkg.Bodybuffer, &rsp); err != nil { return nil, errors.Wrap(err, "failed to unmarshal protobuf message") } return rsp.UploadFileRsp, nil @@ -479,10 +478,10 @@ func decodeOIDB6d60Response(_ *QQClient, _ *incomingPacketInfo, payload []byte) func decodeOIDB6d7Response(_ *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) { pkg := oidb.OIDBSSOPkg{} rsp := oidb0x6d7.RspBody{} - if err := protobuf.Decode(payload, &pkg); err != nil { + if err := protobuf.Unmarshal(payload, &pkg); err != nil { return nil, errors.Wrap(err, "failed to unmarshal protobuf message") } - if err := protobuf.Decode(pkg.Bodybuffer, &rsp); err != nil { + if err := protobuf.Unmarshal(pkg.Bodybuffer, &rsp); err != nil { return nil, errors.Wrap(err, "failed to unmarshal protobuf message") } if rsp.CreateFolderRsp != nil && rsp.CreateFolderRsp.GetRetCode() != 0 { diff --git a/client/group_info.go b/client/group_info.go index 6a3b0818..e261d864 100644 --- a/client/group_info.go +++ b/client/group_info.go @@ -3,23 +3,22 @@ package client import ( "encoding/json" "fmt" - "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb" - "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0x88d" - "go.dedis.ch/protobuf" - "google.golang.org/protobuf/proto" "math/rand" "net/url" "sort" "strings" "sync" - "github.com/Mrs4s/MiraiGo/internal/packets" - "github.com/pkg/errors" + protobuf "github.com/segmentio/encoding/proto" + "google.golang.org/protobuf/proto" "github.com/Mrs4s/MiraiGo/binary" "github.com/Mrs4s/MiraiGo/binary/jce" "github.com/Mrs4s/MiraiGo/client/pb/profilecard" + "github.com/Mrs4s/MiraiGo/internal/packets" + "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb" + "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0x88d" "github.com/Mrs4s/MiraiGo/utils" ) @@ -228,10 +227,10 @@ func decodeGroupSearchResponse(_ *QQClient, _ *incomingPacketInfo, payload []byt func decodeGroupInfoResponse(c *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) { pkg := oidb.OIDBSSOPkg{} rsp := oidb0x88d.RspBody{} - if err := protobuf.Decode(payload, &pkg); err != nil { + if err := protobuf.Unmarshal(payload, &pkg); err != nil { return nil, errors.Wrap(err, "failed to unmarshal protobuf message") } - if err := protobuf.Decode(pkg.Bodybuffer, &rsp); err != nil { + if err := protobuf.Unmarshal(pkg.Bodybuffer, &rsp); err != nil { return nil, errors.Wrap(err, "failed to unmarshal protobuf message") } if len(rsp.Stzrspgroupinfo) == 0 { diff --git a/client/group_msg.go b/client/group_msg.go index c8cefc4a..cf485d09 100644 --- a/client/group_msg.go +++ b/client/group_msg.go @@ -5,27 +5,26 @@ import ( "encoding/base64" "encoding/json" "fmt" - "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb" - "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0x8a7" - "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0x8fc" - "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0xeac" - "go.dedis.ch/protobuf" "math" "math/rand" "strconv" "strings" "time" - "github.com/Mrs4s/MiraiGo/internal/packets" + "github.com/pkg/errors" + protobuf "github.com/segmentio/encoding/proto" + "google.golang.org/protobuf/proto" "github.com/Mrs4s/MiraiGo/client/pb/longmsg" "github.com/Mrs4s/MiraiGo/client/pb/msg" "github.com/Mrs4s/MiraiGo/client/pb/multimsg" + "github.com/Mrs4s/MiraiGo/internal/packets" + "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb" + "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0x8a7" + "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0x8fc" + "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0xeac" "github.com/Mrs4s/MiraiGo/message" "github.com/Mrs4s/MiraiGo/utils" - - "github.com/pkg/errors" - "google.golang.org/protobuf/proto" ) func init() { @@ -408,10 +407,10 @@ func decodeGetGroupMsgResponse(c *QQClient, info *incomingPacketInfo, payload [] func decodeAtAllRemainResponse(_ *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) { pkg := oidb.OIDBSSOPkg{} rsp := oidb0x8a7.RspBody{} - if err := protobuf.Decode(payload, &pkg); err != nil { + if err := protobuf.Unmarshal(payload, &pkg); err != nil { return nil, errors.Wrap(err, "failed to unmarshal protobuf message") } - if err := protobuf.Decode(pkg.Bodybuffer, &rsp); err != nil { + if err := protobuf.Unmarshal(pkg.Bodybuffer, &rsp); err != nil { return nil, errors.Wrap(err, "failed to unmarshal protobuf message") } return &AtAllRemainInfo{ @@ -524,7 +523,7 @@ func (c *QQClient) parseGroupMessage(m *msg.Message) *message.GroupMessage { groupCard := m.Head.GroupInfo.GetGroupCard() if extInfo != nil && len(extInfo.GroupCard) > 0 && extInfo.GroupCard[0] == 0x0A { buf := oidb0x8fc.CommCardNameBuf{} - if err := protobuf.Decode(extInfo.GroupCard, &buf); err == nil && len(buf.RichCardName) > 0 { + if err := protobuf.Unmarshal(extInfo.GroupCard, &buf); err == nil && len(buf.RichCardName) > 0 { var gcard strings.Builder for _, e := range buf.RichCardName { gcard.Write(e.Text) @@ -606,10 +605,10 @@ func (c *QQClient) buildEssenceMsgOperatePacket(groupCode int64, msgSeq, msgRand func decodeEssenceMsgResponse(_ *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) { pkg := oidb.OIDBSSOPkg{} rsp := &oidb0xeac.RspBody{} - if err := protobuf.Decode(payload, &pkg); err != nil { + if err := protobuf.Unmarshal(payload, &pkg); err != nil { return nil, errors.Wrap(err, "failed to unmarshal protobuf message") } - if err := protobuf.Decode(pkg.Bodybuffer, rsp); err != nil { + if err := protobuf.Unmarshal(pkg.Bodybuffer, rsp); err != nil { return nil, errors.Wrap(err, "failed to unmarshal protobuf message") } return rsp, nil diff --git a/client/image.go b/client/image.go index 767d24ac..fdeb9a9a 100644 --- a/client/image.go +++ b/client/image.go @@ -4,9 +4,6 @@ import ( "bytes" "encoding/hex" "fmt" - "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb" - "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0xe07" - "go.dedis.ch/protobuf" "image" _ "image/gif" "io" @@ -15,15 +12,16 @@ import ( "strings" "time" - "github.com/Mrs4s/MiraiGo/internal/packets" - - "github.com/Mrs4s/MiraiGo/client/pb/highway" - "github.com/pkg/errors" + protobuf "github.com/segmentio/encoding/proto" "google.golang.org/protobuf/proto" "github.com/Mrs4s/MiraiGo/binary" "github.com/Mrs4s/MiraiGo/client/pb/cmd0x388" + "github.com/Mrs4s/MiraiGo/client/pb/highway" + "github.com/Mrs4s/MiraiGo/internal/packets" + "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb" + "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0xe07" "github.com/Mrs4s/MiraiGo/message" "github.com/Mrs4s/MiraiGo/utils" ) @@ -360,10 +358,10 @@ func decodeGroupImageDownloadResponse(_ *QQClient, _ *incomingPacketInfo, payloa func decodeImageOcrResponse(_ *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) { pkg := oidb.OIDBSSOPkg{} rsp := oidb0xe07.RspBody{} - if err := protobuf.Decode(payload, &pkg); err != nil { + if err := protobuf.Unmarshal(payload, &pkg); err != nil { return nil, errors.Wrap(err, "failed to unmarshal protobuf message") } - if err := protobuf.Decode(pkg.Bodybuffer, &rsp); err != nil { + if err := protobuf.Unmarshal(pkg.Bodybuffer, &rsp); err != nil { return nil, errors.Wrap(err, "failed to unmarshal protobuf message") } if rsp.GetWording() != "" { diff --git a/client/richmsg.go b/client/richmsg.go index 5c79b00e..70c568ea 100644 --- a/client/richmsg.go +++ b/client/richmsg.go @@ -1,16 +1,16 @@ package client import ( - "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0xb77" "math/rand" "time" - "github.com/Mrs4s/MiraiGo/internal/packets" - - "github.com/Mrs4s/MiraiGo/message" - "github.com/Mrs4s/MiraiGo/utils" "github.com/pkg/errors" "google.golang.org/protobuf/proto" + + "github.com/Mrs4s/MiraiGo/internal/packets" + "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0xb77" + "github.com/Mrs4s/MiraiGo/message" + "github.com/Mrs4s/MiraiGo/utils" ) type musicTypeInfo struct { @@ -98,7 +98,7 @@ func (c *QQClient) buildRichMsgSendingPacket(target int64, msg *message.MusicSha body := &oidb0xb77.ReqBody{ AppId: &tp.appID, AppType: &tp.appType, - MsgStyle: proto.Uint32(func() uint32 { + Style: proto.Uint32(func() uint32 { if msg.MusicUrl == "" { return 0 } @@ -110,7 +110,7 @@ func (c *QQClient) buildRichMsgSendingPacket(target int64, msg *message.MusicSha AndroidPackageName: &tp.packageName, AndroidSignature: &tp.signature, }, - ExtInfo: &oidb0xb77.ExtInfo{MsgSeq: proto.Uint64(rand.Uint64())}, + ExtInfo: &oidb0xb77.ExtInfo{Seq: proto.Uint64(rand.Uint64())}, SendType: &sendType, RecvUin: proto.Uint64(uint64(target)), RichMsgBody: &oidb0xb77.RichMsgBody{ diff --git a/client/security.go b/client/security.go index 936c875c..f6949508 100644 --- a/client/security.go +++ b/client/security.go @@ -1,12 +1,13 @@ package client import ( + "github.com/pkg/errors" + protobuf "github.com/segmentio/encoding/proto" + "google.golang.org/protobuf/proto" + "github.com/Mrs4s/MiraiGo/internal/packets" "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb" "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0xbcb" - "github.com/pkg/errors" - "go.dedis.ch/protobuf" - "google.golang.org/protobuf/proto" ) func init() { @@ -54,10 +55,10 @@ func (c *QQClient) buildUrlCheckRequest(url string) (uint16, []byte) { func decodeUrlCheckResponse(_ *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) { pkg := &oidb.OIDBSSOPkg{} rsp := &oidb0xbcb.RspBody{} - if err := protobuf.Decode(payload, pkg); err != nil { + if err := protobuf.Unmarshal(payload, pkg); err != nil { return nil, errors.Wrap(err, "failed to unmarshal protobuf message") } - if err := protobuf.Decode(pkg.Bodybuffer, rsp); err != nil { + if err := protobuf.Unmarshal(pkg.Bodybuffer, rsp); err != nil { return nil, errors.Wrap(err, "failed to unmarshal protobuf message") } if rsp.CheckUrlRsp == nil || len(rsp.CheckUrlRsp.Results) == 0 { diff --git a/client/sync.go b/client/sync.go index 44ec8cbc..7dcdab34 100644 --- a/client/sync.go +++ b/client/sync.go @@ -1,22 +1,21 @@ package client import ( - "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0x769" - "go.dedis.ch/protobuf" "math/rand" "sync" "sync/atomic" "time" - "github.com/Mrs4s/MiraiGo/internal/packets" - + "github.com/pkg/errors" + protobuf "github.com/segmentio/encoding/proto" "google.golang.org/protobuf/proto" "github.com/Mrs4s/MiraiGo/binary/jce" "github.com/Mrs4s/MiraiGo/client/pb/msf" "github.com/Mrs4s/MiraiGo/client/pb/msg" + "github.com/Mrs4s/MiraiGo/internal/packets" + "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0x769" "github.com/Mrs4s/MiraiGo/message" - "github.com/pkg/errors" ) func init() { @@ -203,7 +202,7 @@ func (c *QQClient) buildGetOfflineMsgRequestPacket() (uint16, []byte) { // RegPrxySvc.PbSyncMsg func (c *QQClient) buildSyncMsgRequestPacket() (uint16, []byte) { seq := c.nextSeq() - oidbReq, _ := protobuf.Encode(&oidb0x769.RspBody{ + oidbReq, _ := protobuf.Marshal(&oidb0x769.RspBody{ ConfigList: []*oidb0x769.ConfigSeq{ { Type: proto.Uint32(46), diff --git a/client/translate.go b/client/translate.go index 7c807ba2..cd73fcc4 100644 --- a/client/translate.go +++ b/client/translate.go @@ -1,12 +1,13 @@ package client import ( + "github.com/pkg/errors" + protobuf "github.com/segmentio/encoding/proto" + "github.com/Mrs4s/MiraiGo/internal/packets" "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb" "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0x990" "github.com/Mrs4s/MiraiGo/utils" - "github.com/pkg/errors" - "go.dedis.ch/protobuf" ) func (c *QQClient) buildTranslatePacket(src, dst, text string) (uint16, []byte) { @@ -41,10 +42,10 @@ func (c *QQClient) Translate(src, dst, text string) (string, error) { func decodeTranslateResponse(_ *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) { pkg := oidb.OIDBSSOPkg{} rsp := oidb0x990.RspBody{} - if err := protobuf.Decode(payload, &pkg); err != nil { + if err := protobuf.Unmarshal(payload, &pkg); err != nil { return nil, errors.Wrap(err, "failed to unmarshal protobuf message") } - if err := protobuf.Decode(pkg.Bodybuffer, &rsp); err != nil { + if err := protobuf.Unmarshal(pkg.Bodybuffer, &rsp); err != nil { return nil, errors.Wrap(err, "failed to unmarshal protobuf message") } return rsp.BatchTranslateRsp, nil diff --git a/go.mod b/go.mod index 283c182b..7f062501 100644 --- a/go.mod +++ b/go.mod @@ -5,9 +5,9 @@ go 1.16 require ( github.com/klauspost/compress v1.13.6 github.com/pkg/errors v0.9.1 + github.com/segmentio/encoding v0.2.23 github.com/stretchr/testify v1.3.0 github.com/tidwall/gjson v1.11.0 - go.dedis.ch/protobuf v1.0.11 golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f golang.org/x/sync v0.0.0-20210220032951-036812b2e83c google.golang.org/protobuf v1.27.1 diff --git a/go.sum b/go.sum index c8f50d1e..4c07a111 100644 --- a/go.sum +++ b/go.sum @@ -5,10 +5,16 @@ github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/klauspost/compress v1.13.6 h1:P76CopJELS0TiO2mebmnzgWaajssP/EszplttgQxcgc= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/cpuid/v2 v2.0.6 h1:dQ5ueTiftKxp0gyjKSx5+8BtPWkyQbd95m8Gys/RarI= +github.com/klauspost/cpuid/v2 v2.0.6/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/segmentio/asm v1.1.0 h1:fkVr8k5J4sKoFjTGVD6r1yKvDKqmvrEh3K7iyVxgBs8= +github.com/segmentio/asm v1.1.0/go.mod h1:4EUJGaKsB8ImLUwOGORVsNd9vTRDeh44JGsY4aKp5I4= +github.com/segmentio/encoding v0.2.23 h1:5C68yOwOsmUc04L+Od9VeNvqxaVsTcUPbnOUzXDs48A= +github.com/segmentio/encoding v0.2.23/go.mod h1:waft2p6XI4z2pk07M0YzZV4wEiqaRvsBSyWNHxVx4gU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -18,22 +24,10 @@ github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= -go.dedis.ch/fixbuf v1.0.3 h1:hGcV9Cd/znUxlusJ64eAlExS+5cJDIyTyEG+otu5wQs= -go.dedis.ch/fixbuf v1.0.3/go.mod h1:yzJMt34Wa5xD37V5RTdmp38cz3QhMagdGoem9anUalw= -go.dedis.ch/kyber/v3 v3.0.4/go.mod h1:OzvaEnPvKlyrWyp3kGXlFdp7ap1VC6RkZDTaPikqhsQ= -go.dedis.ch/kyber/v3 v3.0.9 h1:i0ZbOQocHUjfFasBiUql5zVeC7u/vahFd96DFA8UOWk= -go.dedis.ch/kyber/v3 v3.0.9/go.mod h1:rhNjUUg6ahf8HEg5HUvVBYoWY4boAafX8tYxX+PS+qg= -go.dedis.ch/protobuf v1.0.5/go.mod h1:eIV4wicvi6JK0q/QnfIEGeSFNG0ZeB24kzut5+HaRLo= -go.dedis.ch/protobuf v1.0.7/go.mod h1:pv5ysfkDX/EawiPqcW3ikOxsL5t+BqnV6xHSmE79KI4= -go.dedis.ch/protobuf v1.0.11 h1:FTYVIEzY/bfl37lu3pR4lIj+F9Vp1jE8oh91VmxKgLo= -go.dedis.ch/protobuf v1.0.11/go.mod h1:97QR256dnkimeNdfmURz0wAMNVbd1VmLXhG1CrTYrJ4= -golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b h1:Elez2XeF2p9uyVj0yEUDqQ56NFcDtcBNkYP7yv8YbUE= -golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f h1:OfiFi4JbukWwe3lzw+xunroH1mnC1e2Gy5cxNJApiSY= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190124100055-b90733256f2e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da h1:b3NXsE2LusjYGGjL5bxEVZZORm/YEFFrWFjR8eFrw/c= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/internal/protobuf/data/group_file_common/common.pb.go b/internal/protobuf/data/group_file_common/common.pb.go new file mode 100644 index 00000000..efc8abf6 --- /dev/null +++ b/internal/protobuf/data/group_file_common/common.pb.go @@ -0,0 +1,427 @@ +// Code generated by yaprotoc. DO NOT EDIT. +// source: group_file_common/common.proto + +package group_file_common + +import ( + "github.com/pkg/errors" + "github.com/segmentio/encoding/proto" +) + +type FeedsInfo struct { + BusId *uint32 `protobuf:"varint,1,opt"` + FileId *string `protobuf:"bytes,2,opt"` + MsgRandom *uint32 `protobuf:"varint,3,opt"` + Ext []byte `protobuf:"bytes,4,opt"` + FeedFlag *uint32 `protobuf:"varint,5,opt"` +} + +func (x *FeedsInfo) GetBusId() uint32 { + if x != nil && x.BusId != nil { + return *x.BusId + } + return 0 +} + +func (x *FeedsInfo) GetFileId() string { + if x != nil && x.FileId != nil { + return *x.FileId + } + return "" +} + +func (x *FeedsInfo) GetMsgRandom() uint32 { + if x != nil && x.MsgRandom != nil { + return *x.MsgRandom + } + return 0 +} + +func (x *FeedsInfo) GetFeedFlag() uint32 { + if x != nil && x.FeedFlag != nil { + return *x.FeedFlag + } + return 0 +} + +func (x *FeedsInfo) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type FeedsResult struct { + RetCode *int32 `protobuf:"varint,1,opt"` + Detail *string `protobuf:"bytes,2,opt"` + FileId *string `protobuf:"bytes,3,opt"` + BusId *uint32 `protobuf:"varint,4,opt"` + DeadTime *uint32 `protobuf:"varint,5,opt"` +} + +func (x *FeedsResult) GetRetCode() int32 { + if x != nil && x.RetCode != nil { + return *x.RetCode + } + return 0 +} + +func (x *FeedsResult) GetDetail() string { + if x != nil && x.Detail != nil { + return *x.Detail + } + return "" +} + +func (x *FeedsResult) GetFileId() string { + if x != nil && x.FileId != nil { + return *x.FileId + } + return "" +} + +func (x *FeedsResult) GetBusId() uint32 { + if x != nil && x.BusId != nil { + return *x.BusId + } + return 0 +} + +func (x *FeedsResult) GetDeadTime() uint32 { + if x != nil && x.DeadTime != nil { + return *x.DeadTime + } + return 0 +} + +func (x *FeedsResult) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type FileInfo struct { + FileId *string `protobuf:"bytes,1,opt"` + FileName *string `protobuf:"bytes,2,opt"` + FileSize *uint64 `protobuf:"varint,3,opt"` + BusId *uint32 `protobuf:"varint,4,opt"` + UploadedSize *uint64 `protobuf:"varint,5,opt"` + UploadTime *uint32 `protobuf:"varint,6,opt"` + DeadTime *uint32 `protobuf:"varint,7,opt"` + ModifyTime *uint32 `protobuf:"varint,8,opt"` + DownloadTimes *uint32 `protobuf:"varint,9,opt"` + Sha []byte `protobuf:"bytes,10,opt"` + Sha3 []byte `protobuf:"bytes,11,opt"` + Md5 []byte `protobuf:"bytes,12,opt"` + LocalPath *string `protobuf:"bytes,13,opt"` + UploaderName *string `protobuf:"bytes,14,opt"` + UploaderUin *uint64 `protobuf:"varint,15,opt"` + ParentFolderId *string `protobuf:"bytes,16,opt"` + SafeType *uint32 `protobuf:"varint,17,opt"` + FileBlobExt []byte `protobuf:"bytes,20,opt"` + OwnerUin *uint64 `protobuf:"varint,21,opt"` + FeedId *string `protobuf:"bytes,22,opt"` + ReservedField []byte `protobuf:"bytes,23,opt"` +} + +func (x *FileInfo) GetFileId() string { + if x != nil && x.FileId != nil { + return *x.FileId + } + return "" +} + +func (x *FileInfo) GetFileName() string { + if x != nil && x.FileName != nil { + return *x.FileName + } + return "" +} + +func (x *FileInfo) GetFileSize() uint64 { + if x != nil && x.FileSize != nil { + return *x.FileSize + } + return 0 +} + +func (x *FileInfo) GetBusId() uint32 { + if x != nil && x.BusId != nil { + return *x.BusId + } + return 0 +} + +func (x *FileInfo) GetUploadedSize() uint64 { + if x != nil && x.UploadedSize != nil { + return *x.UploadedSize + } + return 0 +} + +func (x *FileInfo) GetUploadTime() uint32 { + if x != nil && x.UploadTime != nil { + return *x.UploadTime + } + return 0 +} + +func (x *FileInfo) GetDeadTime() uint32 { + if x != nil && x.DeadTime != nil { + return *x.DeadTime + } + return 0 +} + +func (x *FileInfo) GetModifyTime() uint32 { + if x != nil && x.ModifyTime != nil { + return *x.ModifyTime + } + return 0 +} + +func (x *FileInfo) GetDownloadTimes() uint32 { + if x != nil && x.DownloadTimes != nil { + return *x.DownloadTimes + } + return 0 +} + +func (x *FileInfo) GetLocalPath() string { + if x != nil && x.LocalPath != nil { + return *x.LocalPath + } + return "" +} + +func (x *FileInfo) GetUploaderName() string { + if x != nil && x.UploaderName != nil { + return *x.UploaderName + } + return "" +} + +func (x *FileInfo) GetUploaderUin() uint64 { + if x != nil && x.UploaderUin != nil { + return *x.UploaderUin + } + return 0 +} + +func (x *FileInfo) GetParentFolderId() string { + if x != nil && x.ParentFolderId != nil { + return *x.ParentFolderId + } + return "" +} + +func (x *FileInfo) GetSafeType() uint32 { + if x != nil && x.SafeType != nil { + return *x.SafeType + } + return 0 +} + +func (x *FileInfo) GetOwnerUin() uint64 { + if x != nil && x.OwnerUin != nil { + return *x.OwnerUin + } + return 0 +} + +func (x *FileInfo) GetFeedId() string { + if x != nil && x.FeedId != nil { + return *x.FeedId + } + return "" +} + +func (x *FileInfo) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type FileInfoTmem struct { + GroupCode *uint64 `protobuf:"varint,1,opt"` + Files []*FileInfo `protobuf:"bytes,2,rep"` +} + +func (x *FileInfoTmem) GetGroupCode() uint64 { + if x != nil && x.GroupCode != nil { + return *x.GroupCode + } + return 0 +} + +func (x *FileInfoTmem) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type FileItem struct { + Type *uint32 `protobuf:"varint,1,opt"` + FolderInfo *FolderInfo `protobuf:"bytes,2,opt"` + FileInfo *FileInfo `protobuf:"bytes,3,opt"` +} + +func (x *FileItem) GetType() uint32 { + if x != nil && x.Type != nil { + return *x.Type + } + return 0 +} + +func (x *FileItem) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type FolderInfo struct { + FolderId *string `protobuf:"bytes,1,opt"` + ParentFolderId *string `protobuf:"bytes,2,opt"` + FolderName *string `protobuf:"bytes,3,opt"` + CreateTime *uint32 `protobuf:"varint,4,opt"` + ModifyTime *uint32 `protobuf:"varint,5,opt"` + CreateUin *uint64 `protobuf:"varint,6,opt"` + CreatorName *string `protobuf:"bytes,7,opt"` + TotalFileCount *uint32 `protobuf:"varint,8,opt"` + ModifyUin *uint64 `protobuf:"varint,9,opt"` + ModifyName *string `protobuf:"bytes,10,opt"` + UsedSpace *uint64 `protobuf:"varint,11,opt"` +} + +func (x *FolderInfo) GetFolderId() string { + if x != nil && x.FolderId != nil { + return *x.FolderId + } + return "" +} + +func (x *FolderInfo) GetParentFolderId() string { + if x != nil && x.ParentFolderId != nil { + return *x.ParentFolderId + } + return "" +} + +func (x *FolderInfo) GetFolderName() string { + if x != nil && x.FolderName != nil { + return *x.FolderName + } + return "" +} + +func (x *FolderInfo) GetCreateTime() uint32 { + if x != nil && x.CreateTime != nil { + return *x.CreateTime + } + return 0 +} + +func (x *FolderInfo) GetModifyTime() uint32 { + if x != nil && x.ModifyTime != nil { + return *x.ModifyTime + } + return 0 +} + +func (x *FolderInfo) GetCreateUin() uint64 { + if x != nil && x.CreateUin != nil { + return *x.CreateUin + } + return 0 +} + +func (x *FolderInfo) GetCreatorName() string { + if x != nil && x.CreatorName != nil { + return *x.CreatorName + } + return "" +} + +func (x *FolderInfo) GetTotalFileCount() uint32 { + if x != nil && x.TotalFileCount != nil { + return *x.TotalFileCount + } + return 0 +} + +func (x *FolderInfo) GetModifyUin() uint64 { + if x != nil && x.ModifyUin != nil { + return *x.ModifyUin + } + return 0 +} + +func (x *FolderInfo) GetModifyName() string { + if x != nil && x.ModifyName != nil { + return *x.ModifyName + } + return "" +} + +func (x *FolderInfo) GetUsedSpace() uint64 { + if x != nil && x.UsedSpace != nil { + return *x.UsedSpace + } + return 0 +} + +func (x *FolderInfo) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type FolderInfoTmem struct { + GroupCode *uint64 `protobuf:"varint,1,opt"` + Folders []*FolderInfo `protobuf:"bytes,2,rep"` +} + +func (x *FolderInfoTmem) GetGroupCode() uint64 { + if x != nil && x.GroupCode != nil { + return *x.GroupCode + } + return 0 +} + +func (x *FolderInfoTmem) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type OverwriteInfo struct { + FileId *string `protobuf:"bytes,1,opt"` + DownloadTimes *uint32 `protobuf:"varint,2,opt"` +} + +func (x *OverwriteInfo) GetFileId() string { + if x != nil && x.FileId != nil { + return *x.FileId + } + return "" +} + +func (x *OverwriteInfo) GetDownloadTimes() uint32 { + if x != nil && x.DownloadTimes != nil { + return *x.DownloadTimes + } + return 0 +} + +func (x *OverwriteInfo) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} diff --git a/internal/protobuf/data/oidb/oidb0x6d6/oidb0x6d6.go b/internal/protobuf/data/oidb/oidb0x6d6/0x6d6.pb.go similarity index 60% rename from internal/protobuf/data/oidb/oidb0x6d6/oidb0x6d6.go rename to internal/protobuf/data/oidb/oidb0x6d6/0x6d6.pb.go index 6d2f52a7..3ddaced7 100644 --- a/internal/protobuf/data/oidb/oidb0x6d6/oidb0x6d6.go +++ b/internal/protobuf/data/oidb/oidb0x6d6/0x6d6.pb.go @@ -1,155 +1,22 @@ -// Code generated by Proto2Go.Net. Only used for MiraiGo. DO NOT EDIT. -// Source: oidb0x6d6.proto +// Code generated by yaprotoc. DO NOT EDIT. +// source: oidb\0x6d6.proto package oidb0x6d6 import ( "github.com/pkg/errors" - "go.dedis.ch/protobuf" + "github.com/segmentio/encoding/proto" ) -type ( - DeleteFileReqBody struct { - GroupCode *uint64 `protobuf:"1,opt"` - AppId *uint32 `protobuf:"2,opt"` - BusId *uint32 `protobuf:"3,opt"` - ParentFolderId *string `protobuf:"4,opt"` - FileId *string `protobuf:"5,opt"` - MsgdbSeq *uint32 `protobuf:"6,opt"` - MsgRand *uint32 `protobuf:"7,opt"` - } - - DeleteFileRspBody struct { - RetCode *int32 `protobuf:"1,opt"` - RetMsg *string `protobuf:"2,opt"` - ClientWording *string `protobuf:"3,opt"` - } - - DownloadFileReqBody struct { - GroupCode *uint64 `protobuf:"1,opt"` - AppId *uint32 `protobuf:"2,opt"` - BusId *uint32 `protobuf:"3,opt"` - FileId *string `protobuf:"4,opt"` - ThumbnailReq *bool `protobuf:"5,opt"` - UrlType *uint32 `protobuf:"6,opt"` - PreviewReq *bool `protobuf:"7,opt"` - Src *uint32 `protobuf:"8,opt"` - } - - DownloadFileRspBody struct { - RetCode *int32 `protobuf:"1,opt"` - RetMsg *string `protobuf:"2,opt"` - ClientWording *string `protobuf:"3,opt"` - DownloadIp *string `protobuf:"4,opt"` - DownloadDns []byte `protobuf:"5,opt"` - DownloadUrl []byte `protobuf:"6,opt"` - Sha []byte `protobuf:"7,opt"` - Sha3 []byte `protobuf:"8,opt"` - Md5 []byte `protobuf:"9,opt"` - CookieVal []byte `protobuf:"10,opt"` - SaveFileName *string `protobuf:"11,opt"` - PreviewPort *uint32 `protobuf:"12,opt"` - DownloadDnsHttps *string `protobuf:"13,opt"` - PreviewPortHttps *uint32 `protobuf:"14,opt"` - } - - MoveFileReqBody struct { - GroupCode *uint64 `protobuf:"1,opt"` - AppId *uint32 `protobuf:"2,opt"` - BusId *uint32 `protobuf:"3,opt"` - FileId *string `protobuf:"4,opt"` - ParentFolderId *string `protobuf:"5,opt"` - DestFolderId *string `protobuf:"6,opt"` - } - - MoveFileRspBody struct { - RetCode *int32 `protobuf:"1,opt"` - RetMsg *string `protobuf:"2,opt"` - ClientWording *string `protobuf:"3,opt"` - ParentFolderId *string `protobuf:"4,opt"` - } - - RenameFileReqBody struct { - GroupCode *uint64 `protobuf:"1,opt"` - AppId *uint32 `protobuf:"2,opt"` - BusId *uint32 `protobuf:"3,opt"` - FileId *string `protobuf:"4,opt"` - ParentFolderId *string `protobuf:"5,opt"` - NewFileName *string `protobuf:"6,opt"` - } - - RenameFileRspBody struct { - RetCode *int32 `protobuf:"1,opt"` - RetMsg *string `protobuf:"2,opt"` - ClientWording *string `protobuf:"3,opt"` - } - - ReqBody struct { - UploadFileReq *UploadFileReqBody `protobuf:"1,opt"` - ResendFileReq *ResendReqBody `protobuf:"2,opt"` - DownloadFileReq *DownloadFileReqBody `protobuf:"3,opt"` - DeleteFileReq *DeleteFileReqBody `protobuf:"4,opt"` - RenameFileReq *RenameFileReqBody `protobuf:"5,opt"` - MoveFileReq *MoveFileReqBody `protobuf:"6,opt"` - } - - ResendReqBody struct { - GroupCode *uint64 `protobuf:"1,opt"` - AppId *uint32 `protobuf:"2,opt"` - BusId *uint32 `protobuf:"3,opt"` - FileId *string `protobuf:"4,opt"` - Sha []byte `protobuf:"5,opt"` - } - - ResendRspBody struct { - RetCode *int32 `protobuf:"1,opt"` - RetMsg *string `protobuf:"2,opt"` - ClientWording *string `protobuf:"3,opt"` - UploadIp *string `protobuf:"4,opt"` - FileKey []byte `protobuf:"5,opt"` - CheckKey []byte `protobuf:"6,opt"` - } - - RspBody struct { - UploadFileRsp *UploadFileRspBody `protobuf:"1,opt"` - ResendFileRsp *ResendRspBody `protobuf:"2,opt"` - DownloadFileRsp *DownloadFileRspBody `protobuf:"3,opt"` - DeleteFileRsp *DeleteFileRspBody `protobuf:"4,opt"` - RenameFileRsp *RenameFileRspBody `protobuf:"5,opt"` - MoveFileRsp *MoveFileRspBody `protobuf:"6,opt"` - } - - UploadFileReqBody struct { - GroupCode *uint64 `protobuf:"1,opt"` - AppId *uint32 `protobuf:"2,opt"` - BusId *uint32 `protobuf:"3,opt"` - Entrance *uint32 `protobuf:"4,opt"` - ParentFolderId *string `protobuf:"5,opt"` - FileName *string `protobuf:"6,opt"` - LocalPath *string `protobuf:"7,opt"` - FileSize *uint64 `protobuf:"8,opt"` - Sha []byte `protobuf:"9,opt"` - Sha3 []byte `protobuf:"10,opt"` - Md5 []byte `protobuf:"11,opt"` - SupportMultiUpload *bool `protobuf:"15,opt"` - } - - UploadFileRspBody struct { - RetCode *int32 `protobuf:"1,opt"` - RetMsg *string `protobuf:"2,opt"` - ClientWording *string `protobuf:"3,opt"` - UploadIp *string `protobuf:"4,opt"` - ServerDns *string `protobuf:"5,opt"` - BusId *uint32 `protobuf:"6,opt"` - FileId *string `protobuf:"7,opt"` - FileKey []byte `protobuf:"8,opt"` - CheckKey []byte `protobuf:"9,opt"` - FileExist *bool `protobuf:"10,opt"` - UploadIpLanV4 []string `protobuf:"12"` - UploadIpLanV6 []string `protobuf:"13"` - UploadPort *uint32 `protobuf:"14,opt"` - } -) +type DeleteFileReqBody struct { + GroupCode *uint64 `protobuf:"varint,1,opt"` + AppId *uint32 `protobuf:"varint,2,opt"` + BusId *uint32 `protobuf:"varint,3,opt"` + ParentFolderId *string `protobuf:"bytes,4,opt"` + FileId *string `protobuf:"bytes,5,opt"` + MsgdbSeq *uint32 `protobuf:"varint,6,opt"` + MsgRand *uint32 `protobuf:"varint,7,opt"` +} func (x *DeleteFileReqBody) GetGroupCode() uint64 { if x != nil && x.GroupCode != nil { @@ -202,9 +69,15 @@ func (x *DeleteFileReqBody) GetMsgRand() uint32 { func (x *DeleteFileReqBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type DeleteFileRspBody struct { + RetCode *int32 `protobuf:"varint,1,opt"` + RetMsg *string `protobuf:"bytes,2,opt"` + ClientWording *string `protobuf:"bytes,3,opt"` } func (x *DeleteFileRspBody) GetRetCode() int32 { @@ -230,9 +103,20 @@ func (x *DeleteFileRspBody) GetClientWording() string { func (x *DeleteFileRspBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type DownloadFileReqBody struct { + GroupCode *uint64 `protobuf:"varint,1,opt"` + AppId *uint32 `protobuf:"varint,2,opt"` + BusId *uint32 `protobuf:"varint,3,opt"` + FileId *string `protobuf:"bytes,4,opt"` + ThumbnailReq *bool `protobuf:"varint,5,opt"` + UrlType *uint32 `protobuf:"varint,6,opt"` + PreviewReq *bool `protobuf:"varint,7,opt"` + Src *uint32 `protobuf:"varint,8,opt"` } func (x *DownloadFileReqBody) GetGroupCode() uint64 { @@ -293,9 +177,26 @@ func (x *DownloadFileReqBody) GetSrc() uint32 { func (x *DownloadFileReqBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type DownloadFileRspBody struct { + RetCode *int32 `protobuf:"varint,1,opt"` + RetMsg *string `protobuf:"bytes,2,opt"` + ClientWording *string `protobuf:"bytes,3,opt"` + DownloadIp *string `protobuf:"bytes,4,opt"` + DownloadDns []byte `protobuf:"bytes,5,opt"` + DownloadUrl []byte `protobuf:"bytes,6,opt"` + Sha []byte `protobuf:"bytes,7,opt"` + Sha3 []byte `protobuf:"bytes,8,opt"` + Md5 []byte `protobuf:"bytes,9,opt"` + CookieVal []byte `protobuf:"bytes,10,opt"` + SaveFileName *string `protobuf:"bytes,11,opt"` + PreviewPort *uint32 `protobuf:"varint,12,opt"` + DownloadDnsHttps *string `protobuf:"bytes,13,opt"` + PreviewPortHttps *uint32 `protobuf:"varint,14,opt"` } func (x *DownloadFileRspBody) GetRetCode() int32 { @@ -356,9 +257,18 @@ func (x *DownloadFileRspBody) GetPreviewPortHttps() uint32 { func (x *DownloadFileRspBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type MoveFileReqBody struct { + GroupCode *uint64 `protobuf:"varint,1,opt"` + AppId *uint32 `protobuf:"varint,2,opt"` + BusId *uint32 `protobuf:"varint,3,opt"` + FileId *string `protobuf:"bytes,4,opt"` + ParentFolderId *string `protobuf:"bytes,5,opt"` + DestFolderId *string `protobuf:"bytes,6,opt"` } func (x *MoveFileReqBody) GetGroupCode() uint64 { @@ -405,9 +315,16 @@ func (x *MoveFileReqBody) GetDestFolderId() string { func (x *MoveFileReqBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type MoveFileRspBody struct { + RetCode *int32 `protobuf:"varint,1,opt"` + RetMsg *string `protobuf:"bytes,2,opt"` + ClientWording *string `protobuf:"bytes,3,opt"` + ParentFolderId *string `protobuf:"bytes,4,opt"` } func (x *MoveFileRspBody) GetRetCode() int32 { @@ -440,9 +357,18 @@ func (x *MoveFileRspBody) GetParentFolderId() string { func (x *MoveFileRspBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type RenameFileReqBody struct { + GroupCode *uint64 `protobuf:"varint,1,opt"` + AppId *uint32 `protobuf:"varint,2,opt"` + BusId *uint32 `protobuf:"varint,3,opt"` + FileId *string `protobuf:"bytes,4,opt"` + ParentFolderId *string `protobuf:"bytes,5,opt"` + NewFileName *string `protobuf:"bytes,6,opt"` } func (x *RenameFileReqBody) GetGroupCode() uint64 { @@ -489,9 +415,15 @@ func (x *RenameFileReqBody) GetNewFileName() string { func (x *RenameFileReqBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type RenameFileRspBody struct { + RetCode *int32 `protobuf:"varint,1,opt"` + RetMsg *string `protobuf:"bytes,2,opt"` + ClientWording *string `protobuf:"bytes,3,opt"` } func (x *RenameFileRspBody) GetRetCode() int32 { @@ -517,16 +449,33 @@ func (x *RenameFileRspBody) GetClientWording() string { func (x *RenameFileRspBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type ReqBody struct { + UploadFileReq *UploadFileReqBody `protobuf:"bytes,1,opt"` + ResendFileReq *ResendReqBody `protobuf:"bytes,2,opt"` + DownloadFileReq *DownloadFileReqBody `protobuf:"bytes,3,opt"` + DeleteFileReq *DeleteFileReqBody `protobuf:"bytes,4,opt"` + RenameFileReq *RenameFileReqBody `protobuf:"bytes,5,opt"` + MoveFileReq *MoveFileReqBody `protobuf:"bytes,6,opt"` } func (x *ReqBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type ResendReqBody struct { + GroupCode *uint64 `protobuf:"varint,1,opt"` + AppId *uint32 `protobuf:"varint,2,opt"` + BusId *uint32 `protobuf:"varint,3,opt"` + FileId *string `protobuf:"bytes,4,opt"` + Sha []byte `protobuf:"bytes,5,opt"` } func (x *ResendReqBody) GetGroupCode() uint64 { @@ -559,9 +508,18 @@ func (x *ResendReqBody) GetFileId() string { func (x *ResendReqBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type ResendRspBody struct { + RetCode *int32 `protobuf:"varint,1,opt"` + RetMsg *string `protobuf:"bytes,2,opt"` + ClientWording *string `protobuf:"bytes,3,opt"` + UploadIp *string `protobuf:"bytes,4,opt"` + FileKey []byte `protobuf:"bytes,5,opt"` + CheckKey []byte `protobuf:"bytes,6,opt"` } func (x *ResendRspBody) GetRetCode() int32 { @@ -594,16 +552,40 @@ func (x *ResendRspBody) GetUploadIp() string { func (x *ResendRspBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type RspBody struct { + UploadFileRsp *UploadFileRspBody `protobuf:"bytes,1,opt"` + ResendFileRsp *ResendRspBody `protobuf:"bytes,2,opt"` + DownloadFileRsp *DownloadFileRspBody `protobuf:"bytes,3,opt"` + DeleteFileRsp *DeleteFileRspBody `protobuf:"bytes,4,opt"` + RenameFileRsp *RenameFileRspBody `protobuf:"bytes,5,opt"` + MoveFileRsp *MoveFileRspBody `protobuf:"bytes,6,opt"` } func (x *RspBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type UploadFileReqBody struct { + GroupCode *uint64 `protobuf:"varint,1,opt"` + AppId *uint32 `protobuf:"varint,2,opt"` + BusId *uint32 `protobuf:"varint,3,opt"` + Entrance *uint32 `protobuf:"varint,4,opt"` + ParentFolderId *string `protobuf:"bytes,5,opt"` + FileName *string `protobuf:"bytes,6,opt"` + LocalPath *string `protobuf:"bytes,7,opt"` + FileSize *uint64 `protobuf:"varint,8,opt"` + Sha []byte `protobuf:"bytes,9,opt"` + Sha3 []byte `protobuf:"bytes,10,opt"` + Md5 []byte `protobuf:"bytes,11,opt"` + SupportMultiUpload *bool `protobuf:"varint,15,opt"` } func (x *UploadFileReqBody) GetGroupCode() uint64 { @@ -671,9 +653,25 @@ func (x *UploadFileReqBody) GetSupportMultiUpload() bool { func (x *UploadFileReqBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type UploadFileRspBody struct { + RetCode *int32 `protobuf:"varint,1,opt"` + RetMsg *string `protobuf:"bytes,2,opt"` + ClientWording *string `protobuf:"bytes,3,opt"` + UploadIp *string `protobuf:"bytes,4,opt"` + ServerDns *string `protobuf:"bytes,5,opt"` + BusId *uint32 `protobuf:"varint,6,opt"` + FileId *string `protobuf:"bytes,7,opt"` + FileKey []byte `protobuf:"bytes,8,opt"` + CheckKey []byte `protobuf:"bytes,9,opt"` + FileExist *bool `protobuf:"varint,10,opt"` + UploadIpLanV4 []string `protobuf:"bytes,12,rep"` + UploadIpLanV6 []string `protobuf:"bytes,13,rep"` + UploadPort *uint32 `protobuf:"varint,14,opt"` } func (x *UploadFileRspBody) GetRetCode() int32 { @@ -741,7 +739,7 @@ func (x *UploadFileRspBody) GetUploadPort() uint32 { func (x *UploadFileRspBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) } diff --git a/internal/protobuf/data/oidb/oidb0x6d7/oidb0x6d7.go b/internal/protobuf/data/oidb/oidb0x6d7/0x6d7.pb.go similarity index 56% rename from internal/protobuf/data/oidb/oidb0x6d7/oidb0x6d7.go rename to internal/protobuf/data/oidb/oidb0x6d7/0x6d7.pb.go index 4d58d008..4aed7e72 100644 --- a/internal/protobuf/data/oidb/oidb0x6d7/oidb0x6d7.go +++ b/internal/protobuf/data/oidb/oidb0x6d7/0x6d7.pb.go @@ -1,80 +1,20 @@ -// Code generated by Proto2Go.Net. Only used for MiraiGo. DO NOT EDIT. -// Source: oidb0x6d7.proto +// Code generated by yaprotoc. DO NOT EDIT. +// source: oidb\0x6d7.proto package oidb0x6d7 import ( + group_file_common "github.com/Mrs4s/MiraiGo/internal/protobuf/data/group_file_common" "github.com/pkg/errors" - "go.dedis.ch/protobuf" + "github.com/segmentio/encoding/proto" ) -type ( - CreateFolderReqBody struct { - GroupCode *uint64 `protobuf:"1,opt"` - AppId *uint32 `protobuf:"2,opt"` - ParentFolderId *string `protobuf:"3,opt"` - FolderName *string `protobuf:"4,opt"` - } - - CreateFolderRspBody struct { - RetCode *int32 `protobuf:"1,opt"` - RetMsg *string `protobuf:"2,opt"` - ClientWording *string `protobuf:"3,opt"` - } - - DeleteFolderReqBody struct { - GroupCode *uint64 `protobuf:"1,opt"` - AppId *uint32 `protobuf:"2,opt"` - FolderId *string `protobuf:"3,opt"` - } - - DeleteFolderRspBody struct { - RetCode *int32 `protobuf:"1,opt"` - RetMsg *string `protobuf:"2,opt"` - ClientWording *string `protobuf:"3,opt"` - } - - MoveFolderReqBody struct { - GroupCode *uint64 `protobuf:"1,opt"` - AppId *uint32 `protobuf:"2,opt"` - FolderId *string `protobuf:"3,opt"` - ParentFolderId *string `protobuf:"4,opt"` - DestFolderId *string `protobuf:"5,opt"` - } - - MoveFolderRspBody struct { - RetCode *int32 `protobuf:"1,opt"` - RetMsg *string `protobuf:"2,opt"` - ClientWording *string `protobuf:"3,opt"` - } - - RenameFolderReqBody struct { - GroupCode *uint64 `protobuf:"1,opt"` - AppId *uint32 `protobuf:"2,opt"` - FolderId *string `protobuf:"3,opt"` - NewFolderName *string `protobuf:"4,opt"` - } - - RenameFolderRspBody struct { - RetCode *int32 `protobuf:"1,opt"` - RetMsg *string `protobuf:"2,opt"` - ClientWording *string `protobuf:"3,opt"` - } - - ReqBody struct { - CreateFolderReq *CreateFolderReqBody `protobuf:"1,opt"` - DeleteFolderReq *DeleteFolderReqBody `protobuf:"2,opt"` - RenameFolderReq *RenameFolderReqBody `protobuf:"3,opt"` - MoveFolderReq *MoveFolderReqBody `protobuf:"4,opt"` - } - - RspBody struct { - CreateFolderRsp *CreateFolderRspBody `protobuf:"1,opt"` - DeleteFolderRsp *DeleteFolderRspBody `protobuf:"2,opt"` - RenameFolderRsp *RenameFolderRspBody `protobuf:"3,opt"` - MoveFolderRsp *MoveFolderRspBody `protobuf:"4,opt"` - } -) +type CreateFolderReqBody struct { + GroupCode *uint64 `protobuf:"varint,1,opt"` + AppId *uint32 `protobuf:"varint,2,opt"` + ParentFolderId *string `protobuf:"bytes,3,opt"` + FolderName *string `protobuf:"bytes,4,opt"` +} func (x *CreateFolderReqBody) GetGroupCode() uint64 { if x != nil && x.GroupCode != nil { @@ -106,9 +46,16 @@ func (x *CreateFolderReqBody) GetFolderName() string { func (x *CreateFolderReqBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type CreateFolderRspBody struct { + RetCode *int32 `protobuf:"varint,1,opt"` + RetMsg *string `protobuf:"bytes,2,opt"` + ClientWording *string `protobuf:"bytes,3,opt"` + FolderInfo *group_file_common.FolderInfo `protobuf:"bytes,4,opt"` } func (x *CreateFolderRspBody) GetRetCode() int32 { @@ -134,9 +81,15 @@ func (x *CreateFolderRspBody) GetClientWording() string { func (x *CreateFolderRspBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type DeleteFolderReqBody struct { + GroupCode *uint64 `protobuf:"varint,1,opt"` + AppId *uint32 `protobuf:"varint,2,opt"` + FolderId *string `protobuf:"bytes,3,opt"` } func (x *DeleteFolderReqBody) GetGroupCode() uint64 { @@ -162,9 +115,15 @@ func (x *DeleteFolderReqBody) GetFolderId() string { func (x *DeleteFolderReqBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type DeleteFolderRspBody struct { + RetCode *int32 `protobuf:"varint,1,opt"` + RetMsg *string `protobuf:"bytes,2,opt"` + ClientWording *string `protobuf:"bytes,3,opt"` } func (x *DeleteFolderRspBody) GetRetCode() int32 { @@ -190,9 +149,17 @@ func (x *DeleteFolderRspBody) GetClientWording() string { func (x *DeleteFolderRspBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type MoveFolderReqBody struct { + GroupCode *uint64 `protobuf:"varint,1,opt"` + AppId *uint32 `protobuf:"varint,2,opt"` + FolderId *string `protobuf:"bytes,3,opt"` + ParentFolderId *string `protobuf:"bytes,4,opt"` + DestFolderId *string `protobuf:"bytes,5,opt"` } func (x *MoveFolderReqBody) GetGroupCode() uint64 { @@ -232,9 +199,16 @@ func (x *MoveFolderReqBody) GetDestFolderId() string { func (x *MoveFolderReqBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type MoveFolderRspBody struct { + RetCode *int32 `protobuf:"varint,1,opt"` + RetMsg *string `protobuf:"bytes,2,opt"` + ClientWording *string `protobuf:"bytes,3,opt"` + FolderInfo *group_file_common.FolderInfo `protobuf:"bytes,4,opt"` } func (x *MoveFolderRspBody) GetRetCode() int32 { @@ -260,9 +234,16 @@ func (x *MoveFolderRspBody) GetClientWording() string { func (x *MoveFolderRspBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type RenameFolderReqBody struct { + GroupCode *uint64 `protobuf:"varint,1,opt"` + AppId *uint32 `protobuf:"varint,2,opt"` + FolderId *string `protobuf:"bytes,3,opt"` + NewFolderName *string `protobuf:"bytes,4,opt"` } func (x *RenameFolderReqBody) GetGroupCode() uint64 { @@ -295,9 +276,16 @@ func (x *RenameFolderReqBody) GetNewFolderName() string { func (x *RenameFolderReqBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type RenameFolderRspBody struct { + RetCode *int32 `protobuf:"varint,1,opt"` + RetMsg *string `protobuf:"bytes,2,opt"` + ClientWording *string `protobuf:"bytes,3,opt"` + FolderInfo *group_file_common.FolderInfo `protobuf:"bytes,4,opt"` } func (x *RenameFolderRspBody) GetRetCode() int32 { @@ -323,21 +311,35 @@ func (x *RenameFolderRspBody) GetClientWording() string { func (x *RenameFolderRspBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type ReqBody struct { + CreateFolderReq *CreateFolderReqBody `protobuf:"bytes,1,opt"` + DeleteFolderReq *DeleteFolderReqBody `protobuf:"bytes,2,opt"` + RenameFolderReq *RenameFolderReqBody `protobuf:"bytes,3,opt"` + MoveFolderReq *MoveFolderReqBody `protobuf:"bytes,4,opt"` } func (x *ReqBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type RspBody struct { + CreateFolderRsp *CreateFolderRspBody `protobuf:"bytes,1,opt"` + DeleteFolderRsp *DeleteFolderRspBody `protobuf:"bytes,2,opt"` + RenameFolderRsp *RenameFolderRspBody `protobuf:"bytes,3,opt"` + MoveFolderRsp *MoveFolderRspBody `protobuf:"bytes,4,opt"` } func (x *RspBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) } diff --git a/internal/protobuf/data/oidb/oidb0x6d8/0x6d8.pb.go b/internal/protobuf/data/oidb/oidb0x6d8/0x6d8.pb.go new file mode 100644 index 00000000..1d58fa5d --- /dev/null +++ b/internal/protobuf/data/oidb/oidb0x6d8/0x6d8.pb.go @@ -0,0 +1,708 @@ +// Code generated by yaprotoc. DO NOT EDIT. +// source: oidb\0x6d8.proto + +package oidb0x6d8 + +import ( + group_file_common "github.com/Mrs4s/MiraiGo/internal/protobuf/data/group_file_common" + "github.com/pkg/errors" + "github.com/segmentio/encoding/proto" +) + +type FileTimeStamp struct { + UploadTime *uint32 `protobuf:"varint,1,opt"` + FileId *string `protobuf:"bytes,2,opt"` +} + +func (x *FileTimeStamp) GetUploadTime() uint32 { + if x != nil && x.UploadTime != nil { + return *x.UploadTime + } + return 0 +} + +func (x *FileTimeStamp) GetFileId() string { + if x != nil && x.FileId != nil { + return *x.FileId + } + return "" +} + +func (x *FileTimeStamp) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type GetFileCountReqBody struct { + GroupCode *uint64 `protobuf:"varint,1,opt"` + AppId *uint32 `protobuf:"varint,2,opt"` + BusId *uint32 `protobuf:"varint,3,opt"` +} + +func (x *GetFileCountReqBody) GetGroupCode() uint64 { + if x != nil && x.GroupCode != nil { + return *x.GroupCode + } + return 0 +} + +func (x *GetFileCountReqBody) GetAppId() uint32 { + if x != nil && x.AppId != nil { + return *x.AppId + } + return 0 +} + +func (x *GetFileCountReqBody) GetBusId() uint32 { + if x != nil && x.BusId != nil { + return *x.BusId + } + return 0 +} + +func (x *GetFileCountReqBody) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type GetFileCountRspBody struct { + RetCode *int32 `protobuf:"varint,1,opt"` + RetMsg *string `protobuf:"bytes,2,opt"` + ClientWording *string `protobuf:"bytes,3,opt"` + AllFileCount *uint32 `protobuf:"varint,4,opt"` + FileTooMany *bool `protobuf:"varint,5,opt"` + LimitCount *uint32 `protobuf:"varint,6,opt"` + IsFull *bool `protobuf:"varint,7,opt"` +} + +func (x *GetFileCountRspBody) GetRetCode() int32 { + if x != nil && x.RetCode != nil { + return *x.RetCode + } + return 0 +} + +func (x *GetFileCountRspBody) GetRetMsg() string { + if x != nil && x.RetMsg != nil { + return *x.RetMsg + } + return "" +} + +func (x *GetFileCountRspBody) GetClientWording() string { + if x != nil && x.ClientWording != nil { + return *x.ClientWording + } + return "" +} + +func (x *GetFileCountRspBody) GetAllFileCount() uint32 { + if x != nil && x.AllFileCount != nil { + return *x.AllFileCount + } + return 0 +} + +func (x *GetFileCountRspBody) GetFileTooMany() bool { + if x != nil && x.FileTooMany != nil { + return *x.FileTooMany + } + return false +} + +func (x *GetFileCountRspBody) GetLimitCount() uint32 { + if x != nil && x.LimitCount != nil { + return *x.LimitCount + } + return 0 +} + +func (x *GetFileCountRspBody) GetIsFull() bool { + if x != nil && x.IsFull != nil { + return *x.IsFull + } + return false +} + +func (x *GetFileCountRspBody) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type GetFileInfoReqBody struct { + GroupCode *uint64 `protobuf:"varint,1,opt"` + AppId *uint32 `protobuf:"varint,2,opt"` + BusId *uint32 `protobuf:"varint,3,opt"` + FileId *string `protobuf:"bytes,4,opt"` + FieldFlag *uint32 `protobuf:"varint,5,opt"` +} + +func (x *GetFileInfoReqBody) GetGroupCode() uint64 { + if x != nil && x.GroupCode != nil { + return *x.GroupCode + } + return 0 +} + +func (x *GetFileInfoReqBody) GetAppId() uint32 { + if x != nil && x.AppId != nil { + return *x.AppId + } + return 0 +} + +func (x *GetFileInfoReqBody) GetBusId() uint32 { + if x != nil && x.BusId != nil { + return *x.BusId + } + return 0 +} + +func (x *GetFileInfoReqBody) GetFileId() string { + if x != nil && x.FileId != nil { + return *x.FileId + } + return "" +} + +func (x *GetFileInfoReqBody) GetFieldFlag() uint32 { + if x != nil && x.FieldFlag != nil { + return *x.FieldFlag + } + return 0 +} + +func (x *GetFileInfoReqBody) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type GetFileInfoRspBody struct { + RetCode *int32 `protobuf:"varint,1,opt"` + RetMsg *string `protobuf:"bytes,2,opt"` + ClientWording *string `protobuf:"bytes,3,opt"` + FileInfo *group_file_common.FileInfo `protobuf:"bytes,4,opt"` +} + +func (x *GetFileInfoRspBody) GetRetCode() int32 { + if x != nil && x.RetCode != nil { + return *x.RetCode + } + return 0 +} + +func (x *GetFileInfoRspBody) GetRetMsg() string { + if x != nil && x.RetMsg != nil { + return *x.RetMsg + } + return "" +} + +func (x *GetFileInfoRspBody) GetClientWording() string { + if x != nil && x.ClientWording != nil { + return *x.ClientWording + } + return "" +} + +func (x *GetFileInfoRspBody) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type GetFileListReqBody struct { + GroupCode *uint64 `protobuf:"varint,1,opt"` + AppId *uint32 `protobuf:"varint,2,opt"` + FolderId *string `protobuf:"bytes,3,opt"` + StartTimestamp *FileTimeStamp `protobuf:"bytes,4,opt"` + FileCount *uint32 `protobuf:"varint,5,opt"` + MaxTimestamp *FileTimeStamp `protobuf:"bytes,6,opt"` + AllFileCount *uint32 `protobuf:"varint,7,opt"` + ReqFrom *uint32 `protobuf:"varint,8,opt"` + SortBy *uint32 `protobuf:"varint,9,opt"` + FilterCode *uint32 `protobuf:"varint,10,opt"` + Uin *uint64 `protobuf:"varint,11,opt"` + FieldFlag *uint32 `protobuf:"varint,12,opt"` + StartIndex *uint32 `protobuf:"varint,13,opt"` + Context []byte `protobuf:"bytes,14,opt"` + ClientVersion *uint32 `protobuf:"varint,15,opt"` + WhiteList *uint32 `protobuf:"varint,16,opt"` + SortOrder *uint32 `protobuf:"varint,17,opt"` + ShowOnlinedocFolder *uint32 `protobuf:"varint,18,opt"` +} + +func (x *GetFileListReqBody) GetGroupCode() uint64 { + if x != nil && x.GroupCode != nil { + return *x.GroupCode + } + return 0 +} + +func (x *GetFileListReqBody) GetAppId() uint32 { + if x != nil && x.AppId != nil { + return *x.AppId + } + return 0 +} + +func (x *GetFileListReqBody) GetFolderId() string { + if x != nil && x.FolderId != nil { + return *x.FolderId + } + return "" +} + +func (x *GetFileListReqBody) GetFileCount() uint32 { + if x != nil && x.FileCount != nil { + return *x.FileCount + } + return 0 +} + +func (x *GetFileListReqBody) GetAllFileCount() uint32 { + if x != nil && x.AllFileCount != nil { + return *x.AllFileCount + } + return 0 +} + +func (x *GetFileListReqBody) GetReqFrom() uint32 { + if x != nil && x.ReqFrom != nil { + return *x.ReqFrom + } + return 0 +} + +func (x *GetFileListReqBody) GetSortBy() uint32 { + if x != nil && x.SortBy != nil { + return *x.SortBy + } + return 0 +} + +func (x *GetFileListReqBody) GetFilterCode() uint32 { + if x != nil && x.FilterCode != nil { + return *x.FilterCode + } + return 0 +} + +func (x *GetFileListReqBody) GetUin() uint64 { + if x != nil && x.Uin != nil { + return *x.Uin + } + return 0 +} + +func (x *GetFileListReqBody) GetFieldFlag() uint32 { + if x != nil && x.FieldFlag != nil { + return *x.FieldFlag + } + return 0 +} + +func (x *GetFileListReqBody) GetStartIndex() uint32 { + if x != nil && x.StartIndex != nil { + return *x.StartIndex + } + return 0 +} + +func (x *GetFileListReqBody) GetClientVersion() uint32 { + if x != nil && x.ClientVersion != nil { + return *x.ClientVersion + } + return 0 +} + +func (x *GetFileListReqBody) GetWhiteList() uint32 { + if x != nil && x.WhiteList != nil { + return *x.WhiteList + } + return 0 +} + +func (x *GetFileListReqBody) GetSortOrder() uint32 { + if x != nil && x.SortOrder != nil { + return *x.SortOrder + } + return 0 +} + +func (x *GetFileListReqBody) GetShowOnlinedocFolder() uint32 { + if x != nil && x.ShowOnlinedocFolder != nil { + return *x.ShowOnlinedocFolder + } + return 0 +} + +func (x *GetFileListReqBody) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type GetFileListRspBody struct { + RetCode *int32 `protobuf:"varint,1,opt"` + RetMsg *string `protobuf:"bytes,2,opt"` + ClientWording *string `protobuf:"bytes,3,opt"` + IsEnd *bool `protobuf:"varint,4,opt"` + ItemList []*GetFileListRspBody_Item `protobuf:"bytes,5,rep"` + MaxTimestamp *FileTimeStamp `protobuf:"bytes,6,opt"` + AllFileCount *uint32 `protobuf:"varint,7,opt"` + FilterCode *uint32 `protobuf:"varint,8,opt"` + SafeCheckFlag *bool `protobuf:"varint,11,opt"` + SafeCheckRes *uint32 `protobuf:"varint,12,opt"` + NextIndex *uint32 `protobuf:"varint,13,opt"` + Context []byte `protobuf:"bytes,14,opt"` + Role *uint32 `protobuf:"varint,15,opt"` + OpenFlag *uint32 `protobuf:"varint,16,opt"` +} + +func (x *GetFileListRspBody) GetRetCode() int32 { + if x != nil && x.RetCode != nil { + return *x.RetCode + } + return 0 +} + +func (x *GetFileListRspBody) GetRetMsg() string { + if x != nil && x.RetMsg != nil { + return *x.RetMsg + } + return "" +} + +func (x *GetFileListRspBody) GetClientWording() string { + if x != nil && x.ClientWording != nil { + return *x.ClientWording + } + return "" +} + +func (x *GetFileListRspBody) GetIsEnd() bool { + if x != nil && x.IsEnd != nil { + return *x.IsEnd + } + return false +} + +func (x *GetFileListRspBody) GetAllFileCount() uint32 { + if x != nil && x.AllFileCount != nil { + return *x.AllFileCount + } + return 0 +} + +func (x *GetFileListRspBody) GetFilterCode() uint32 { + if x != nil && x.FilterCode != nil { + return *x.FilterCode + } + return 0 +} + +func (x *GetFileListRspBody) GetSafeCheckFlag() bool { + if x != nil && x.SafeCheckFlag != nil { + return *x.SafeCheckFlag + } + return false +} + +func (x *GetFileListRspBody) GetSafeCheckRes() uint32 { + if x != nil && x.SafeCheckRes != nil { + return *x.SafeCheckRes + } + return 0 +} + +func (x *GetFileListRspBody) GetNextIndex() uint32 { + if x != nil && x.NextIndex != nil { + return *x.NextIndex + } + return 0 +} + +func (x *GetFileListRspBody) GetRole() uint32 { + if x != nil && x.Role != nil { + return *x.Role + } + return 0 +} + +func (x *GetFileListRspBody) GetOpenFlag() uint32 { + if x != nil && x.OpenFlag != nil { + return *x.OpenFlag + } + return 0 +} + +func (x *GetFileListRspBody) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type GetFilePreviewReqBody struct { + GroupCode *uint64 `protobuf:"varint,1,opt"` + AppId *uint32 `protobuf:"varint,2,opt"` + BusId *uint32 `protobuf:"varint,3,opt"` + FileId *string `protobuf:"bytes,4,opt"` +} + +func (x *GetFilePreviewReqBody) GetGroupCode() uint64 { + if x != nil && x.GroupCode != nil { + return *x.GroupCode + } + return 0 +} + +func (x *GetFilePreviewReqBody) GetAppId() uint32 { + if x != nil && x.AppId != nil { + return *x.AppId + } + return 0 +} + +func (x *GetFilePreviewReqBody) GetBusId() uint32 { + if x != nil && x.BusId != nil { + return *x.BusId + } + return 0 +} + +func (x *GetFilePreviewReqBody) GetFileId() string { + if x != nil && x.FileId != nil { + return *x.FileId + } + return "" +} + +func (x *GetFilePreviewReqBody) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type GetFilePreviewRspBody struct { + RetCode *int32 `protobuf:"varint,1,opt"` + RetMsg *string `protobuf:"bytes,2,opt"` + ClientWording *string `protobuf:"bytes,3,opt"` + ServerIp *uint32 `protobuf:"varint,4,opt"` + ServerPort *uint32 `protobuf:"varint,5,opt"` + DownloadDns *string `protobuf:"bytes,6,opt"` + DownloadUrl []byte `protobuf:"bytes,7,opt"` + CookieVal *string `protobuf:"bytes,8,opt"` + ReservedField []byte `protobuf:"bytes,9,opt"` + DownloadDnsHttps []byte `protobuf:"bytes,10,opt"` + PreviewPortHttps *uint32 `protobuf:"varint,11,opt"` +} + +func (x *GetFilePreviewRspBody) GetRetCode() int32 { + if x != nil && x.RetCode != nil { + return *x.RetCode + } + return 0 +} + +func (x *GetFilePreviewRspBody) GetRetMsg() string { + if x != nil && x.RetMsg != nil { + return *x.RetMsg + } + return "" +} + +func (x *GetFilePreviewRspBody) GetClientWording() string { + if x != nil && x.ClientWording != nil { + return *x.ClientWording + } + return "" +} + +func (x *GetFilePreviewRspBody) GetServerIp() uint32 { + if x != nil && x.ServerIp != nil { + return *x.ServerIp + } + return 0 +} + +func (x *GetFilePreviewRspBody) GetServerPort() uint32 { + if x != nil && x.ServerPort != nil { + return *x.ServerPort + } + return 0 +} + +func (x *GetFilePreviewRspBody) GetDownloadDns() string { + if x != nil && x.DownloadDns != nil { + return *x.DownloadDns + } + return "" +} + +func (x *GetFilePreviewRspBody) GetCookieVal() string { + if x != nil && x.CookieVal != nil { + return *x.CookieVal + } + return "" +} + +func (x *GetFilePreviewRspBody) GetPreviewPortHttps() uint32 { + if x != nil && x.PreviewPortHttps != nil { + return *x.PreviewPortHttps + } + return 0 +} + +func (x *GetFilePreviewRspBody) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type GetSpaceReqBody struct { + GroupCode *uint64 `protobuf:"varint,1,opt"` + AppId *uint32 `protobuf:"varint,2,opt"` +} + +func (x *GetSpaceReqBody) GetGroupCode() uint64 { + if x != nil && x.GroupCode != nil { + return *x.GroupCode + } + return 0 +} + +func (x *GetSpaceReqBody) GetAppId() uint32 { + if x != nil && x.AppId != nil { + return *x.AppId + } + return 0 +} + +func (x *GetSpaceReqBody) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type GetSpaceRspBody struct { + RetCode *int32 `protobuf:"varint,1,opt"` + RetMsg *string `protobuf:"bytes,2,opt"` + ClientWording *string `protobuf:"bytes,3,opt"` + TotalSpace *uint64 `protobuf:"varint,4,opt"` + UsedSpace *uint64 `protobuf:"varint,5,opt"` + AllUpload *bool `protobuf:"varint,6,opt"` +} + +func (x *GetSpaceRspBody) GetRetCode() int32 { + if x != nil && x.RetCode != nil { + return *x.RetCode + } + return 0 +} + +func (x *GetSpaceRspBody) GetRetMsg() string { + if x != nil && x.RetMsg != nil { + return *x.RetMsg + } + return "" +} + +func (x *GetSpaceRspBody) GetClientWording() string { + if x != nil && x.ClientWording != nil { + return *x.ClientWording + } + return "" +} + +func (x *GetSpaceRspBody) GetTotalSpace() uint64 { + if x != nil && x.TotalSpace != nil { + return *x.TotalSpace + } + return 0 +} + +func (x *GetSpaceRspBody) GetUsedSpace() uint64 { + if x != nil && x.UsedSpace != nil { + return *x.UsedSpace + } + return 0 +} + +func (x *GetSpaceRspBody) GetAllUpload() bool { + if x != nil && x.AllUpload != nil { + return *x.AllUpload + } + return false +} + +func (x *GetSpaceRspBody) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type GetFileListRspBody_Item struct { + Type *uint32 `protobuf:"varint,1,opt"` + FolderInfo *group_file_common.FolderInfo `protobuf:"bytes,2,opt"` + FileInfo *group_file_common.FileInfo `protobuf:"bytes,3,opt"` +} + +func (x *GetFileListRspBody_Item) GetType() uint32 { + if x != nil && x.Type != nil { + return *x.Type + } + return 0 +} + +func (x *GetFileListRspBody_Item) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type ReqBody struct { + FileInfoReq *GetFileInfoReqBody `protobuf:"bytes,1,opt"` + FileListInfoReq *GetFileListReqBody `protobuf:"bytes,2,opt"` + GroupFileCntReq *GetFileCountReqBody `protobuf:"bytes,3,opt"` + GroupSpaceReq *GetSpaceReqBody `protobuf:"bytes,4,opt"` + FilePreviewReq *GetFilePreviewReqBody `protobuf:"bytes,5,opt"` +} + +func (x *ReqBody) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type RspBody struct { + FileInfoRsp *GetFileInfoRspBody `protobuf:"bytes,1,opt"` + FileListInfoRsp *GetFileListRspBody `protobuf:"bytes,2,opt"` + GroupFileCntRsp *GetFileCountRspBody `protobuf:"bytes,3,opt"` + GroupSpaceRsp *GetSpaceRspBody `protobuf:"bytes,4,opt"` + FilePreviewRsp *GetFilePreviewRspBody `protobuf:"bytes,5,opt"` +} + +func (x *RspBody) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} diff --git a/internal/protobuf/data/oidb/oidb0x6d8/oidb0x6d8.go b/internal/protobuf/data/oidb/oidb0x6d8/oidb0x6d8.go deleted file mode 100644 index 3406bcde..00000000 --- a/internal/protobuf/data/oidb/oidb0x6d8/oidb0x6d8.go +++ /dev/null @@ -1,1127 +0,0 @@ -// Code generated by Proto2Go.Net. Only used for MiraiGo. DO NOT EDIT. -// Source: oidb0x6d8.proto - -package oidb0x6d8 - -import ( - "github.com/pkg/errors" - "go.dedis.ch/protobuf" -) - -type ( - FileTimeStamp struct { - UploadTime *uint32 `protobuf:"1,opt"` - FileId *string `protobuf:"2,opt"` - } - - GetFileCountReqBody struct { - GroupCode *uint64 `protobuf:"1,opt"` - AppId *uint32 `protobuf:"2,opt"` - BusId *uint32 `protobuf:"3,opt"` - } - - GetFileCountRspBody struct { - RetCode *int32 `protobuf:"1,opt"` - RetMsg *string `protobuf:"2,opt"` - ClientWording *string `protobuf:"3,opt"` - AllFileCount *uint32 `protobuf:"4,opt"` - FileTooMany *bool `protobuf:"5,opt"` - LimitCount *uint32 `protobuf:"6,opt"` - IsFull *bool `protobuf:"7,opt"` - } - - GetFileInfoReqBody struct { - GroupCode *uint64 `protobuf:"1,opt"` - AppId *uint32 `protobuf:"2,opt"` - BusId *uint32 `protobuf:"3,opt"` - FileId *string `protobuf:"4,opt"` - FieldFlag *uint32 `protobuf:"5,opt"` - } - - GetFileInfoRspBody struct { - RetCode *int32 `protobuf:"1,opt"` - RetMsg *string `protobuf:"2,opt"` - ClientWording *string `protobuf:"3,opt"` - FileInfo *FileInfo `protobuf:"4,opt"` - } - - GetFileListReqBody struct { - GroupCode *uint64 `protobuf:"1,opt"` - AppId *uint32 `protobuf:"2,opt"` - FolderId *string `protobuf:"3,opt"` - StartTimestamp *FileTimeStamp `protobuf:"4,opt"` - FileCount *uint32 `protobuf:"5,opt"` - MaxTimestamp *FileTimeStamp `protobuf:"6,opt"` - AllFileCount *uint32 `protobuf:"7,opt"` - ReqFrom *uint32 `protobuf:"8,opt"` - SortBy *uint32 `protobuf:"9,opt"` - FilterCode *uint32 `protobuf:"10,opt"` - Uin *uint64 `protobuf:"11,opt"` - FieldFlag *uint32 `protobuf:"12,opt"` - StartIndex *uint32 `protobuf:"13,opt"` - Context []byte `protobuf:"14,opt"` - ClientVersion *uint32 `protobuf:"15,opt"` - WhiteList *uint32 `protobuf:"16,opt"` - SortOrder *uint32 `protobuf:"17,opt"` - ShowOnlinedocFolder *uint32 `protobuf:"18,opt"` - } - - GetFileListRspBody struct { - RetCode *int32 `protobuf:"1,opt"` - RetMsg *string `protobuf:"2,opt"` - ClientWording *string `protobuf:"3,opt"` - IsEnd *bool `protobuf:"4,opt"` - ItemList []*GetFileListRspBody_Item `protobuf:"5"` - MaxTimestamp *FileTimeStamp `protobuf:"6,opt"` - AllFileCount *uint32 `protobuf:"7,opt"` - FilterCode *uint32 `protobuf:"8,opt"` - SafeCheckFlag *bool `protobuf:"11,opt"` - SafeCheckRes *uint32 `protobuf:"12,opt"` - NextIndex *uint32 `protobuf:"13,opt"` - Context []byte `protobuf:"14,opt"` - Role *uint32 `protobuf:"15,opt"` - OpenFlag *uint32 `protobuf:"16,opt"` - } - - GetFilePreviewReqBody struct { - GroupCode *uint64 `protobuf:"1,opt"` - AppId *uint32 `protobuf:"2,opt"` - BusId *uint32 `protobuf:"3,opt"` - FileId *string `protobuf:"4,opt"` - } - - GetFilePreviewRspBody struct { - RetCode *int32 `protobuf:"1,opt"` - RetMsg *string `protobuf:"2,opt"` - ClientWording *string `protobuf:"3,opt"` - ServerIp *uint32 `protobuf:"4,opt"` - ServerPort *uint32 `protobuf:"5,opt"` - DownloadDns *string `protobuf:"6,opt"` - DownloadUrl []byte `protobuf:"7,opt"` - CookieVal *string `protobuf:"8,opt"` - ReservedField []byte `protobuf:"9,opt"` - DownloadDnsHttps []byte `protobuf:"10,opt"` - PreviewPortHttps *uint32 `protobuf:"11,opt"` - } - - GetSpaceReqBody struct { - GroupCode *uint64 `protobuf:"1,opt"` - AppId *uint32 `protobuf:"2,opt"` - } - - GetSpaceRspBody struct { - RetCode *int32 `protobuf:"1,opt"` - RetMsg *string `protobuf:"2,opt"` - ClientWording *string `protobuf:"3,opt"` - TotalSpace *uint64 `protobuf:"4,opt"` - UsedSpace *uint64 `protobuf:"5,opt"` - AllUpload *bool `protobuf:"6,opt"` - } - - ReqBody struct { - FileInfoReq *GetFileInfoReqBody `protobuf:"1,opt"` - FileListInfoReq *GetFileListReqBody `protobuf:"2,opt"` - GroupFileCntReq *GetFileCountReqBody `protobuf:"3,opt"` - GroupSpaceReq *GetSpaceReqBody `protobuf:"4,opt"` - FilePreviewReq *GetFilePreviewReqBody `protobuf:"5,opt"` - } - - RspBody struct { - FileInfoRsp *GetFileInfoRspBody `protobuf:"1,opt"` - FileListInfoRsp *GetFileListRspBody `protobuf:"2,opt"` - GroupFileCntRsp *GetFileCountRspBody `protobuf:"3,opt"` - GroupSpaceRsp *GetSpaceRspBody `protobuf:"4,opt"` - FilePreviewRsp *GetFilePreviewRspBody `protobuf:"5,opt"` - } - - FeedsInfo struct { - BusId *uint32 `protobuf:"1,opt"` - FileId *string `protobuf:"2,opt"` - MsgRandom *uint32 `protobuf:"3,opt"` - Ext []byte `protobuf:"4,opt"` - FeedFlag *uint32 `protobuf:"5,opt"` - } - - FeedsResult struct { - RetCode *int32 `protobuf:"1,opt"` - Detail *string `protobuf:"2,opt"` - FileId *string `protobuf:"3,opt"` - BusId *uint32 `protobuf:"4,opt"` - DeadTime *uint32 `protobuf:"5,opt"` - } - - FileInfo struct { - FileId *string `protobuf:"1,opt"` - FileName *string `protobuf:"2,opt"` - FileSize *uint64 `protobuf:"3,opt"` - BusId *uint32 `protobuf:"4,opt"` - UploadedSize *uint64 `protobuf:"5,opt"` - UploadTime *uint32 `protobuf:"6,opt"` - DeadTime *uint32 `protobuf:"7,opt"` - ModifyTime *uint32 `protobuf:"8,opt"` - DownloadTimes *uint32 `protobuf:"9,opt"` - Sha []byte `protobuf:"10,opt"` - Sha3 []byte `protobuf:"11,opt"` - Md5 []byte `protobuf:"12,opt"` - LocalPath *string `protobuf:"13,opt"` - UploaderName *string `protobuf:"14,opt"` - UploaderUin *uint64 `protobuf:"15,opt"` - ParentFolderId *string `protobuf:"16,opt"` - SafeType *uint32 `protobuf:"17,opt"` - FileBlobExt []byte `protobuf:"20,opt"` - OwnerUin *uint64 `protobuf:"21,opt"` - FeedId *string `protobuf:"22,opt"` - ReservedField []byte `protobuf:"23,opt"` - } - - FileInfoTmem struct { - GroupCode *uint64 `protobuf:"1,opt"` - Files []*FileInfo `protobuf:"2"` - } - - FileItem struct { - Type *uint32 `protobuf:"1,opt"` - FolderInfo *FolderInfo `protobuf:"2,opt"` - FileInfo *FileInfo `protobuf:"3,opt"` - } - - FolderInfo struct { - FolderId *string `protobuf:"1,opt"` - ParentFolderId *string `protobuf:"2,opt"` - FolderName *string `protobuf:"3,opt"` - CreateTime *uint32 `protobuf:"4,opt"` - ModifyTime *uint32 `protobuf:"5,opt"` - CreateUin *uint64 `protobuf:"6,opt"` - CreatorName *string `protobuf:"7,opt"` - TotalFileCount *uint32 `protobuf:"8,opt"` - ModifyUin *uint64 `protobuf:"9,opt"` - ModifyName *string `protobuf:"10,opt"` - UsedSpace *uint64 `protobuf:"11,opt"` - } - - FolderInfoTmem struct { - GroupCode *uint64 `protobuf:"1,opt"` - Folders []*FolderInfo `protobuf:"2"` - } - - OverwriteInfo struct { - FileId *string `protobuf:"1,opt"` - DownloadTimes *uint32 `protobuf:"2,opt"` - } - - GetFileListRspBody_Item struct { - Type *uint32 `protobuf:"1,opt"` - FolderInfo *FolderInfo `protobuf:"2,opt"` - FileInfo *FileInfo `protobuf:"3,opt"` - } -) - -func (x *FileTimeStamp) GetUploadTime() uint32 { - if x != nil && x.UploadTime != nil { - return *x.UploadTime - } - return 0 -} - -func (x *FileTimeStamp) GetFileId() string { - if x != nil && x.FileId != nil { - return *x.FileId - } - return "" -} - -func (x *FileTimeStamp) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *GetFileCountReqBody) GetGroupCode() uint64 { - if x != nil && x.GroupCode != nil { - return *x.GroupCode - } - return 0 -} - -func (x *GetFileCountReqBody) GetAppId() uint32 { - if x != nil && x.AppId != nil { - return *x.AppId - } - return 0 -} - -func (x *GetFileCountReqBody) GetBusId() uint32 { - if x != nil && x.BusId != nil { - return *x.BusId - } - return 0 -} - -func (x *GetFileCountReqBody) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *GetFileCountRspBody) GetRetCode() int32 { - if x != nil && x.RetCode != nil { - return *x.RetCode - } - return 0 -} - -func (x *GetFileCountRspBody) GetRetMsg() string { - if x != nil && x.RetMsg != nil { - return *x.RetMsg - } - return "" -} - -func (x *GetFileCountRspBody) GetClientWording() string { - if x != nil && x.ClientWording != nil { - return *x.ClientWording - } - return "" -} - -func (x *GetFileCountRspBody) GetAllFileCount() uint32 { - if x != nil && x.AllFileCount != nil { - return *x.AllFileCount - } - return 0 -} - -func (x *GetFileCountRspBody) GetFileTooMany() bool { - if x != nil && x.FileTooMany != nil { - return *x.FileTooMany - } - return false -} - -func (x *GetFileCountRspBody) GetLimitCount() uint32 { - if x != nil && x.LimitCount != nil { - return *x.LimitCount - } - return 0 -} - -func (x *GetFileCountRspBody) GetIsFull() bool { - if x != nil && x.IsFull != nil { - return *x.IsFull - } - return false -} - -func (x *GetFileCountRspBody) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *GetFileInfoReqBody) GetGroupCode() uint64 { - if x != nil && x.GroupCode != nil { - return *x.GroupCode - } - return 0 -} - -func (x *GetFileInfoReqBody) GetAppId() uint32 { - if x != nil && x.AppId != nil { - return *x.AppId - } - return 0 -} - -func (x *GetFileInfoReqBody) GetBusId() uint32 { - if x != nil && x.BusId != nil { - return *x.BusId - } - return 0 -} - -func (x *GetFileInfoReqBody) GetFileId() string { - if x != nil && x.FileId != nil { - return *x.FileId - } - return "" -} - -func (x *GetFileInfoReqBody) GetFieldFlag() uint32 { - if x != nil && x.FieldFlag != nil { - return *x.FieldFlag - } - return 0 -} - -func (x *GetFileInfoReqBody) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *GetFileInfoRspBody) GetRetCode() int32 { - if x != nil && x.RetCode != nil { - return *x.RetCode - } - return 0 -} - -func (x *GetFileInfoRspBody) GetRetMsg() string { - if x != nil && x.RetMsg != nil { - return *x.RetMsg - } - return "" -} - -func (x *GetFileInfoRspBody) GetClientWording() string { - if x != nil && x.ClientWording != nil { - return *x.ClientWording - } - return "" -} - -func (x *GetFileInfoRspBody) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *GetFileListReqBody) GetGroupCode() uint64 { - if x != nil && x.GroupCode != nil { - return *x.GroupCode - } - return 0 -} - -func (x *GetFileListReqBody) GetAppId() uint32 { - if x != nil && x.AppId != nil { - return *x.AppId - } - return 0 -} - -func (x *GetFileListReqBody) GetFolderId() string { - if x != nil && x.FolderId != nil { - return *x.FolderId - } - return "" -} - -func (x *GetFileListReqBody) GetFileCount() uint32 { - if x != nil && x.FileCount != nil { - return *x.FileCount - } - return 0 -} - -func (x *GetFileListReqBody) GetAllFileCount() uint32 { - if x != nil && x.AllFileCount != nil { - return *x.AllFileCount - } - return 0 -} - -func (x *GetFileListReqBody) GetReqFrom() uint32 { - if x != nil && x.ReqFrom != nil { - return *x.ReqFrom - } - return 0 -} - -func (x *GetFileListReqBody) GetSortBy() uint32 { - if x != nil && x.SortBy != nil { - return *x.SortBy - } - return 0 -} - -func (x *GetFileListReqBody) GetFilterCode() uint32 { - if x != nil && x.FilterCode != nil { - return *x.FilterCode - } - return 0 -} - -func (x *GetFileListReqBody) GetUin() uint64 { - if x != nil && x.Uin != nil { - return *x.Uin - } - return 0 -} - -func (x *GetFileListReqBody) GetFieldFlag() uint32 { - if x != nil && x.FieldFlag != nil { - return *x.FieldFlag - } - return 0 -} - -func (x *GetFileListReqBody) GetStartIndex() uint32 { - if x != nil && x.StartIndex != nil { - return *x.StartIndex - } - return 0 -} - -func (x *GetFileListReqBody) GetClientVersion() uint32 { - if x != nil && x.ClientVersion != nil { - return *x.ClientVersion - } - return 0 -} - -func (x *GetFileListReqBody) GetWhiteList() uint32 { - if x != nil && x.WhiteList != nil { - return *x.WhiteList - } - return 0 -} - -func (x *GetFileListReqBody) GetSortOrder() uint32 { - if x != nil && x.SortOrder != nil { - return *x.SortOrder - } - return 0 -} - -func (x *GetFileListReqBody) GetShowOnlinedocFolder() uint32 { - if x != nil && x.ShowOnlinedocFolder != nil { - return *x.ShowOnlinedocFolder - } - return 0 -} - -func (x *GetFileListReqBody) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *GetFileListRspBody) GetRetCode() int32 { - if x != nil && x.RetCode != nil { - return *x.RetCode - } - return 0 -} - -func (x *GetFileListRspBody) GetRetMsg() string { - if x != nil && x.RetMsg != nil { - return *x.RetMsg - } - return "" -} - -func (x *GetFileListRspBody) GetClientWording() string { - if x != nil && x.ClientWording != nil { - return *x.ClientWording - } - return "" -} - -func (x *GetFileListRspBody) GetIsEnd() bool { - if x != nil && x.IsEnd != nil { - return *x.IsEnd - } - return false -} - -func (x *GetFileListRspBody) GetAllFileCount() uint32 { - if x != nil && x.AllFileCount != nil { - return *x.AllFileCount - } - return 0 -} - -func (x *GetFileListRspBody) GetFilterCode() uint32 { - if x != nil && x.FilterCode != nil { - return *x.FilterCode - } - return 0 -} - -func (x *GetFileListRspBody) GetSafeCheckFlag() bool { - if x != nil && x.SafeCheckFlag != nil { - return *x.SafeCheckFlag - } - return false -} - -func (x *GetFileListRspBody) GetSafeCheckRes() uint32 { - if x != nil && x.SafeCheckRes != nil { - return *x.SafeCheckRes - } - return 0 -} - -func (x *GetFileListRspBody) GetNextIndex() uint32 { - if x != nil && x.NextIndex != nil { - return *x.NextIndex - } - return 0 -} - -func (x *GetFileListRspBody) GetRole() uint32 { - if x != nil && x.Role != nil { - return *x.Role - } - return 0 -} - -func (x *GetFileListRspBody) GetOpenFlag() uint32 { - if x != nil && x.OpenFlag != nil { - return *x.OpenFlag - } - return 0 -} - -func (x *GetFileListRspBody) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *GetFilePreviewReqBody) GetGroupCode() uint64 { - if x != nil && x.GroupCode != nil { - return *x.GroupCode - } - return 0 -} - -func (x *GetFilePreviewReqBody) GetAppId() uint32 { - if x != nil && x.AppId != nil { - return *x.AppId - } - return 0 -} - -func (x *GetFilePreviewReqBody) GetBusId() uint32 { - if x != nil && x.BusId != nil { - return *x.BusId - } - return 0 -} - -func (x *GetFilePreviewReqBody) GetFileId() string { - if x != nil && x.FileId != nil { - return *x.FileId - } - return "" -} - -func (x *GetFilePreviewReqBody) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *GetFilePreviewRspBody) GetRetCode() int32 { - if x != nil && x.RetCode != nil { - return *x.RetCode - } - return 0 -} - -func (x *GetFilePreviewRspBody) GetRetMsg() string { - if x != nil && x.RetMsg != nil { - return *x.RetMsg - } - return "" -} - -func (x *GetFilePreviewRspBody) GetClientWording() string { - if x != nil && x.ClientWording != nil { - return *x.ClientWording - } - return "" -} - -func (x *GetFilePreviewRspBody) GetServerIp() uint32 { - if x != nil && x.ServerIp != nil { - return *x.ServerIp - } - return 0 -} - -func (x *GetFilePreviewRspBody) GetServerPort() uint32 { - if x != nil && x.ServerPort != nil { - return *x.ServerPort - } - return 0 -} - -func (x *GetFilePreviewRspBody) GetDownloadDns() string { - if x != nil && x.DownloadDns != nil { - return *x.DownloadDns - } - return "" -} - -func (x *GetFilePreviewRspBody) GetCookieVal() string { - if x != nil && x.CookieVal != nil { - return *x.CookieVal - } - return "" -} - -func (x *GetFilePreviewRspBody) GetPreviewPortHttps() uint32 { - if x != nil && x.PreviewPortHttps != nil { - return *x.PreviewPortHttps - } - return 0 -} - -func (x *GetFilePreviewRspBody) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *GetSpaceReqBody) GetGroupCode() uint64 { - if x != nil && x.GroupCode != nil { - return *x.GroupCode - } - return 0 -} - -func (x *GetSpaceReqBody) GetAppId() uint32 { - if x != nil && x.AppId != nil { - return *x.AppId - } - return 0 -} - -func (x *GetSpaceReqBody) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *GetSpaceRspBody) GetRetCode() int32 { - if x != nil && x.RetCode != nil { - return *x.RetCode - } - return 0 -} - -func (x *GetSpaceRspBody) GetRetMsg() string { - if x != nil && x.RetMsg != nil { - return *x.RetMsg - } - return "" -} - -func (x *GetSpaceRspBody) GetClientWording() string { - if x != nil && x.ClientWording != nil { - return *x.ClientWording - } - return "" -} - -func (x *GetSpaceRspBody) GetTotalSpace() uint64 { - if x != nil && x.TotalSpace != nil { - return *x.TotalSpace - } - return 0 -} - -func (x *GetSpaceRspBody) GetUsedSpace() uint64 { - if x != nil && x.UsedSpace != nil { - return *x.UsedSpace - } - return 0 -} - -func (x *GetSpaceRspBody) GetAllUpload() bool { - if x != nil && x.AllUpload != nil { - return *x.AllUpload - } - return false -} - -func (x *GetSpaceRspBody) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *ReqBody) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *RspBody) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *FeedsInfo) GetBusId() uint32 { - if x != nil && x.BusId != nil { - return *x.BusId - } - return 0 -} - -func (x *FeedsInfo) GetFileId() string { - if x != nil && x.FileId != nil { - return *x.FileId - } - return "" -} - -func (x *FeedsInfo) GetMsgRandom() uint32 { - if x != nil && x.MsgRandom != nil { - return *x.MsgRandom - } - return 0 -} - -func (x *FeedsInfo) GetFeedFlag() uint32 { - if x != nil && x.FeedFlag != nil { - return *x.FeedFlag - } - return 0 -} - -func (x *FeedsInfo) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *FeedsResult) GetRetCode() int32 { - if x != nil && x.RetCode != nil { - return *x.RetCode - } - return 0 -} - -func (x *FeedsResult) GetDetail() string { - if x != nil && x.Detail != nil { - return *x.Detail - } - return "" -} - -func (x *FeedsResult) GetFileId() string { - if x != nil && x.FileId != nil { - return *x.FileId - } - return "" -} - -func (x *FeedsResult) GetBusId() uint32 { - if x != nil && x.BusId != nil { - return *x.BusId - } - return 0 -} - -func (x *FeedsResult) GetDeadTime() uint32 { - if x != nil && x.DeadTime != nil { - return *x.DeadTime - } - return 0 -} - -func (x *FeedsResult) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *FileInfo) GetFileId() string { - if x != nil && x.FileId != nil { - return *x.FileId - } - return "" -} - -func (x *FileInfo) GetFileName() string { - if x != nil && x.FileName != nil { - return *x.FileName - } - return "" -} - -func (x *FileInfo) GetFileSize() uint64 { - if x != nil && x.FileSize != nil { - return *x.FileSize - } - return 0 -} - -func (x *FileInfo) GetBusId() uint32 { - if x != nil && x.BusId != nil { - return *x.BusId - } - return 0 -} - -func (x *FileInfo) GetUploadedSize() uint64 { - if x != nil && x.UploadedSize != nil { - return *x.UploadedSize - } - return 0 -} - -func (x *FileInfo) GetUploadTime() uint32 { - if x != nil && x.UploadTime != nil { - return *x.UploadTime - } - return 0 -} - -func (x *FileInfo) GetDeadTime() uint32 { - if x != nil && x.DeadTime != nil { - return *x.DeadTime - } - return 0 -} - -func (x *FileInfo) GetModifyTime() uint32 { - if x != nil && x.ModifyTime != nil { - return *x.ModifyTime - } - return 0 -} - -func (x *FileInfo) GetDownloadTimes() uint32 { - if x != nil && x.DownloadTimes != nil { - return *x.DownloadTimes - } - return 0 -} - -func (x *FileInfo) GetLocalPath() string { - if x != nil && x.LocalPath != nil { - return *x.LocalPath - } - return "" -} - -func (x *FileInfo) GetUploaderName() string { - if x != nil && x.UploaderName != nil { - return *x.UploaderName - } - return "" -} - -func (x *FileInfo) GetUploaderUin() uint64 { - if x != nil && x.UploaderUin != nil { - return *x.UploaderUin - } - return 0 -} - -func (x *FileInfo) GetParentFolderId() string { - if x != nil && x.ParentFolderId != nil { - return *x.ParentFolderId - } - return "" -} - -func (x *FileInfo) GetSafeType() uint32 { - if x != nil && x.SafeType != nil { - return *x.SafeType - } - return 0 -} - -func (x *FileInfo) GetOwnerUin() uint64 { - if x != nil && x.OwnerUin != nil { - return *x.OwnerUin - } - return 0 -} - -func (x *FileInfo) GetFeedId() string { - if x != nil && x.FeedId != nil { - return *x.FeedId - } - return "" -} - -func (x *FileInfo) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *FileInfoTmem) GetGroupCode() uint64 { - if x != nil && x.GroupCode != nil { - return *x.GroupCode - } - return 0 -} - -func (x *FileInfoTmem) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *FileItem) GetType() uint32 { - if x != nil && x.Type != nil { - return *x.Type - } - return 0 -} - -func (x *FileItem) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *FolderInfo) GetFolderId() string { - if x != nil && x.FolderId != nil { - return *x.FolderId - } - return "" -} - -func (x *FolderInfo) GetParentFolderId() string { - if x != nil && x.ParentFolderId != nil { - return *x.ParentFolderId - } - return "" -} - -func (x *FolderInfo) GetFolderName() string { - if x != nil && x.FolderName != nil { - return *x.FolderName - } - return "" -} - -func (x *FolderInfo) GetCreateTime() uint32 { - if x != nil && x.CreateTime != nil { - return *x.CreateTime - } - return 0 -} - -func (x *FolderInfo) GetModifyTime() uint32 { - if x != nil && x.ModifyTime != nil { - return *x.ModifyTime - } - return 0 -} - -func (x *FolderInfo) GetCreateUin() uint64 { - if x != nil && x.CreateUin != nil { - return *x.CreateUin - } - return 0 -} - -func (x *FolderInfo) GetCreatorName() string { - if x != nil && x.CreatorName != nil { - return *x.CreatorName - } - return "" -} - -func (x *FolderInfo) GetTotalFileCount() uint32 { - if x != nil && x.TotalFileCount != nil { - return *x.TotalFileCount - } - return 0 -} - -func (x *FolderInfo) GetModifyUin() uint64 { - if x != nil && x.ModifyUin != nil { - return *x.ModifyUin - } - return 0 -} - -func (x *FolderInfo) GetModifyName() string { - if x != nil && x.ModifyName != nil { - return *x.ModifyName - } - return "" -} - -func (x *FolderInfo) GetUsedSpace() uint64 { - if x != nil && x.UsedSpace != nil { - return *x.UsedSpace - } - return 0 -} - -func (x *FolderInfo) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *FolderInfoTmem) GetGroupCode() uint64 { - if x != nil && x.GroupCode != nil { - return *x.GroupCode - } - return 0 -} - -func (x *FolderInfoTmem) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *OverwriteInfo) GetFileId() string { - if x != nil && x.FileId != nil { - return *x.FileId - } - return "" -} - -func (x *OverwriteInfo) GetDownloadTimes() uint32 { - if x != nil && x.DownloadTimes != nil { - return *x.DownloadTimes - } - return 0 -} - -func (x *OverwriteInfo) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *GetFileListRspBody_Item) GetType() uint32 { - if x != nil && x.Type != nil { - return *x.Type - } - return 0 -} - -func (x *GetFileListRspBody_Item) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} diff --git a/internal/protobuf/data/oidb/oidb0x6d9/oidb0x6d9.go b/internal/protobuf/data/oidb/oidb0x6d9/0x6d9.pb.go similarity index 55% rename from internal/protobuf/data/oidb/oidb0x6d9/oidb0x6d9.go rename to internal/protobuf/data/oidb/oidb0x6d9/0x6d9.pb.go index c9dc4d5e..e11a17cd 100644 --- a/internal/protobuf/data/oidb/oidb0x6d9/oidb0x6d9.go +++ b/internal/protobuf/data/oidb/oidb0x6d9/0x6d9.pb.go @@ -1,145 +1,27 @@ -// Code generated by Proto2Go.Net. Only used for MiraiGo. DO NOT EDIT. -// Source: oidb0x6d9.proto +// Code generated by yaprotoc. DO NOT EDIT. +// source: oidb\0x6d9.proto package oidb0x6d9 import ( + group_file_common "github.com/Mrs4s/MiraiGo/internal/protobuf/data/group_file_common" "github.com/pkg/errors" - "go.dedis.ch/protobuf" + "github.com/segmentio/encoding/proto" ) -type ( - GroupFileFeedsInfo struct { - BusId *uint32 `protobuf:"1,opt"` - FileId *string `protobuf:"2,opt"` - MsgRandom *uint32 `protobuf:"3,opt"` - Ext []byte `protobuf:"4,opt"` - FeedFlag *uint32 `protobuf:"5,opt"` - } - - CopyFromReqBody struct { - GroupCode *uint64 `protobuf:"1,opt"` - AppId *uint32 `protobuf:"2,opt"` - SrcBusId *uint32 `protobuf:"3,opt"` - SrcParentFolder []byte `protobuf:"4,opt"` - SrcFilePath []byte `protobuf:"5,opt"` - DstBusId *uint32 `protobuf:"6,opt"` - DstFolderId []byte `protobuf:"7,opt"` - FileSize *uint64 `protobuf:"8,opt"` - LocalPath *string `protobuf:"9,opt"` - FileName *string `protobuf:"10,opt"` - SrcUin *uint64 `protobuf:"11,opt"` - Md5 []byte `protobuf:"12,opt"` - } - - CopyFromRspBody struct { - RetCode *int32 `protobuf:"1,opt"` - RetMsg *string `protobuf:"2,opt"` - ClientWording *string `protobuf:"3,opt"` - SaveFilePath []byte `protobuf:"4,opt"` - BusId *uint32 `protobuf:"5,opt"` - } - - CopyToReqBody struct { - GroupCode *uint64 `protobuf:"1,opt"` - AppId *uint32 `protobuf:"2,opt"` - SrcBusId *uint32 `protobuf:"3,opt"` - SrcFileId *string `protobuf:"4,opt"` - DstBusId *uint32 `protobuf:"5,opt"` - DstUin *uint64 `protobuf:"6,opt"` - NewFileName *string `protobuf:"40,opt"` - TimCloudPdirKey []byte `protobuf:"100,opt"` - TimCloudPpdirKey []byte `protobuf:"101,opt"` - TimCloudExtensionInfo []byte `protobuf:"102,opt"` - TimFileExistOption *uint32 `protobuf:"103,opt"` - } - - CopyToRspBody struct { - RetCode *int32 `protobuf:"1,opt"` - RetMsg *string `protobuf:"2,opt"` - ClientWording *string `protobuf:"3,opt"` - SaveFilePath *string `protobuf:"4,opt"` - BusId *uint32 `protobuf:"5,opt"` - FileName *string `protobuf:"40,opt"` - } - - FeedsReqBody struct { - GroupCode *uint64 `protobuf:"1,opt"` - AppId *uint32 `protobuf:"2,opt"` - FeedsInfoList []*GroupFileFeedsInfo `protobuf:"3"` - MultiSendSeq *uint32 `protobuf:"4,opt"` - } - - FeedsRspBody struct { - RetCode *int32 `protobuf:"1,opt"` - RetMsg *string `protobuf:"2,opt"` - ClientWording *string `protobuf:"3,opt"` - SvrbusyWaitTime *uint32 `protobuf:"5,opt"` - } - - ReqBody struct { - TransFileReq *TransFileReqBody `protobuf:"1,opt"` - CopyFromReq *CopyFromReqBody `protobuf:"2,opt"` - CopyToReq *CopyToReqBody `protobuf:"3,opt"` - FeedsInfoReq *FeedsReqBody `protobuf:"5,opt"` - } - - RspBody struct { - TransFileRsp *TransFileRspBody `protobuf:"1,opt"` - CopyFromRsp *CopyFromRspBody `protobuf:"2,opt"` - CopyToRsp *CopyToRspBody `protobuf:"3,opt"` - FeedsInfoRsp *FeedsRspBody `protobuf:"5,opt"` - } - - TransFileReqBody struct { - GroupCode *uint64 `protobuf:"1,opt"` - AppId *uint32 `protobuf:"2,opt"` - BusId *uint32 `protobuf:"3,opt"` - FileId *string `protobuf:"4,opt"` - } - - TransFileRspBody struct { - RetCode *int32 `protobuf:"1,opt"` - RetMsg *string `protobuf:"2,opt"` - ClientWording *string `protobuf:"3,opt"` - SaveBusId *uint32 `protobuf:"4,opt"` - SaveFilePath *string `protobuf:"5,opt"` - } -) - -func (x *GroupFileFeedsInfo) GetBusId() uint32 { - if x != nil && x.BusId != nil { - return *x.BusId - } - return 0 -} - -func (x *GroupFileFeedsInfo) GetFileId() string { - if x != nil && x.FileId != nil { - return *x.FileId - } - return "" -} - -func (x *GroupFileFeedsInfo) GetMsgRandom() uint32 { - if x != nil && x.MsgRandom != nil { - return *x.MsgRandom - } - return 0 -} - -func (x *GroupFileFeedsInfo) GetFeedFlag() uint32 { - if x != nil && x.FeedFlag != nil { - return *x.FeedFlag - } - return 0 -} - -func (x *GroupFileFeedsInfo) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) +type CopyFromReqBody struct { + GroupCode *uint64 `protobuf:"varint,1,opt"` + AppId *uint32 `protobuf:"varint,2,opt"` + SrcBusId *uint32 `protobuf:"varint,3,opt"` + SrcParentFolder []byte `protobuf:"bytes,4,opt"` + SrcFilePath []byte `protobuf:"bytes,5,opt"` + DstBusId *uint32 `protobuf:"varint,6,opt"` + DstFolderId []byte `protobuf:"bytes,7,opt"` + FileSize *uint64 `protobuf:"varint,8,opt"` + LocalPath *string `protobuf:"bytes,9,opt"` + FileName *string `protobuf:"bytes,10,opt"` + SrcUin *uint64 `protobuf:"varint,11,opt"` + Md5 []byte `protobuf:"bytes,12,opt"` } func (x *CopyFromReqBody) GetGroupCode() uint64 { @@ -200,9 +82,17 @@ func (x *CopyFromReqBody) GetSrcUin() uint64 { func (x *CopyFromReqBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type CopyFromRspBody struct { + RetCode *int32 `protobuf:"varint,1,opt"` + RetMsg *string `protobuf:"bytes,2,opt"` + ClientWording *string `protobuf:"bytes,3,opt"` + SaveFilePath []byte `protobuf:"bytes,4,opt"` + BusId *uint32 `protobuf:"varint,5,opt"` } func (x *CopyFromRspBody) GetRetCode() int32 { @@ -235,9 +125,23 @@ func (x *CopyFromRspBody) GetBusId() uint32 { func (x *CopyFromRspBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type CopyToReqBody struct { + GroupCode *uint64 `protobuf:"varint,1,opt"` + AppId *uint32 `protobuf:"varint,2,opt"` + SrcBusId *uint32 `protobuf:"varint,3,opt"` + SrcFileId *string `protobuf:"bytes,4,opt"` + DstBusId *uint32 `protobuf:"varint,5,opt"` + DstUin *uint64 `protobuf:"varint,6,opt"` + NewFileName *string `protobuf:"bytes,40,opt"` + TimCloudPdirKey []byte `protobuf:"bytes,100,opt"` + TimCloudPpdirKey []byte `protobuf:"bytes,101,opt"` + TimCloudExtensionInfo []byte `protobuf:"bytes,102,opt"` + TimFileExistOption *uint32 `protobuf:"varint,103,opt"` } func (x *CopyToReqBody) GetGroupCode() uint64 { @@ -298,9 +202,18 @@ func (x *CopyToReqBody) GetTimFileExistOption() uint32 { func (x *CopyToReqBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type CopyToRspBody struct { + RetCode *int32 `protobuf:"varint,1,opt"` + RetMsg *string `protobuf:"bytes,2,opt"` + ClientWording *string `protobuf:"bytes,3,opt"` + SaveFilePath *string `protobuf:"bytes,4,opt"` + BusId *uint32 `protobuf:"varint,5,opt"` + FileName *string `protobuf:"bytes,40,opt"` } func (x *CopyToRspBody) GetRetCode() int32 { @@ -347,9 +260,16 @@ func (x *CopyToRspBody) GetFileName() string { func (x *CopyToRspBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type FeedsReqBody struct { + GroupCode *uint64 `protobuf:"varint,1,opt"` + AppId *uint32 `protobuf:"varint,2,opt"` + FeedsInfoList []*group_file_common.FeedsInfo `protobuf:"bytes,3,rep"` + MultiSendSeq *uint32 `protobuf:"varint,4,opt"` } func (x *FeedsReqBody) GetGroupCode() uint64 { @@ -375,9 +295,17 @@ func (x *FeedsReqBody) GetMultiSendSeq() uint32 { func (x *FeedsReqBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type FeedsRspBody struct { + RetCode *int32 `protobuf:"varint,1,opt"` + RetMsg *string `protobuf:"bytes,2,opt"` + ClientWording *string `protobuf:"bytes,3,opt"` + FeedsResultList []*group_file_common.FeedsResult `protobuf:"bytes,4,rep"` + SvrbusyWaitTime *uint32 `protobuf:"varint,5,opt"` } func (x *FeedsRspBody) GetRetCode() int32 { @@ -410,23 +338,44 @@ func (x *FeedsRspBody) GetSvrbusyWaitTime() uint32 { func (x *FeedsRspBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type ReqBody struct { + TransFileReq *TransFileReqBody `protobuf:"bytes,1,opt"` + CopyFromReq *CopyFromReqBody `protobuf:"bytes,2,opt"` + CopyToReq *CopyToReqBody `protobuf:"bytes,3,opt"` + FeedsInfoReq *FeedsReqBody `protobuf:"bytes,5,opt"` } func (x *ReqBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type RspBody struct { + TransFileRsp *TransFileRspBody `protobuf:"bytes,1,opt"` + CopyFromRsp *CopyFromRspBody `protobuf:"bytes,2,opt"` + CopyToRsp *CopyToRspBody `protobuf:"bytes,3,opt"` + FeedsInfoRsp *FeedsRspBody `protobuf:"bytes,5,opt"` } func (x *RspBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type TransFileReqBody struct { + GroupCode *uint64 `protobuf:"varint,1,opt"` + AppId *uint32 `protobuf:"varint,2,opt"` + BusId *uint32 `protobuf:"varint,3,opt"` + FileId *string `protobuf:"bytes,4,opt"` } func (x *TransFileReqBody) GetGroupCode() uint64 { @@ -459,9 +408,17 @@ func (x *TransFileReqBody) GetFileId() string { func (x *TransFileReqBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type TransFileRspBody struct { + RetCode *int32 `protobuf:"varint,1,opt"` + RetMsg *string `protobuf:"bytes,2,opt"` + ClientWording *string `protobuf:"bytes,3,opt"` + SaveBusId *uint32 `protobuf:"varint,4,opt"` + SaveFilePath *string `protobuf:"bytes,5,opt"` } func (x *TransFileRspBody) GetRetCode() int32 { @@ -501,7 +458,7 @@ func (x *TransFileRspBody) GetSaveFilePath() string { func (x *TransFileRspBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) } diff --git a/internal/protobuf/data/oidb/oidb0x769/oidb0x769.go b/internal/protobuf/data/oidb/oidb0x769/0x769.pb.go similarity index 57% rename from internal/protobuf/data/oidb/oidb0x769/oidb0x769.go rename to internal/protobuf/data/oidb/oidb0x769/0x769.pb.go index 1f0f3e84..17b272aa 100644 --- a/internal/protobuf/data/oidb/oidb0x769/oidb0x769.go +++ b/internal/protobuf/data/oidb/oidb0x769/0x769.pb.go @@ -1,110 +1,18 @@ -// Code generated by Proto2Go.Net. Only used for MiraiGo. DO NOT EDIT. -// Source: oidb0x769.proto +// Code generated by yaprotoc. DO NOT EDIT. +// source: oidb\0x769.proto package oidb0x769 import ( "github.com/pkg/errors" - "go.dedis.ch/protobuf" + "github.com/segmentio/encoding/proto" ) -type ( - CPU struct { - Model *string `protobuf:"1,opt"` - Cores *uint32 `protobuf:"2,opt"` - Frequency *uint32 `protobuf:"3,opt"` - } - - Camera struct { - Primary *uint64 `protobuf:"1,opt"` - Secondary *uint64 `protobuf:"2,opt"` - Flash *bool `protobuf:"3,opt"` - } - - ConfigSeq struct { - Type *uint32 `protobuf:"1,opt"` - Version *uint32 `protobuf:"2,opt"` - } - - Content struct { - TaskId *uint32 `protobuf:"1,opt"` - Compress *uint32 `protobuf:"2,opt"` - Content []byte `protobuf:"10,opt"` - } - - DeviceInfo struct { - Brand *string `protobuf:"1,opt"` - Model *string `protobuf:"2,opt"` - Os *OS `protobuf:"3,opt"` - Cpu *CPU `protobuf:"4,opt"` - Memory *Memory `protobuf:"5,opt"` - Storage *Storage `protobuf:"6,opt"` - Screen *Screen `protobuf:"7,opt"` - Camera *Camera `protobuf:"8,opt"` - } - - Memory struct { - Total *uint64 `protobuf:"1,opt"` - Process *uint64 `protobuf:"2,opt"` - } - - OS struct { - Type *uint32 `protobuf:"1,opt"` - Version *string `protobuf:"2,opt"` - Sdk *string `protobuf:"3,opt"` - Kernel *string `protobuf:"4,opt"` - Rom *string `protobuf:"5,opt"` - } - - QueryUinPackageUsageReq struct { - Type *uint32 `protobuf:"1,opt"` - UinFileSize *uint64 `protobuf:"2,opt"` - } - - QueryUinPackageUsageRsp struct { - Status *uint32 `protobuf:"1,opt"` - LeftUinNum *uint64 `protobuf:"2,opt"` - MaxUinNum *uint64 `protobuf:"3,opt"` - Proportion *uint32 `protobuf:"4,opt"` - UinPackageUsedList []*UinPackageUsedInfo `protobuf:"10"` - } - - ReqBody struct { - ConfigList []*ConfigSeq `protobuf:"1"` - DeviceInfo *DeviceInfo `protobuf:"2,opt"` - Info *string `protobuf:"3,opt"` - Province *string `protobuf:"4,opt"` - City *string `protobuf:"5,opt"` - ReqDebugMsg *int32 `protobuf:"6,opt"` - QueryUinPackageUsageReq *QueryUinPackageUsageReq `protobuf:"101,opt"` - } - - RspBody struct { - Result *uint32 `protobuf:"1,opt"` - ConfigList []*ConfigSeq `protobuf:"2"` - QueryUinPackageUsageRsp *QueryUinPackageUsageRsp `protobuf:"101,opt"` - } - - Screen struct { - Model *string `protobuf:"1,opt"` - Width *uint32 `protobuf:"2,opt"` - Height *uint32 `protobuf:"3,opt"` - Dpi *uint32 `protobuf:"4,opt"` - MultiTouch *bool `protobuf:"5,opt"` - } - - Storage struct { - Builtin *uint64 `protobuf:"1,opt"` - External *uint64 `protobuf:"2,opt"` - } - - UinPackageUsedInfo struct { - RuleId *uint32 `protobuf:"1,opt"` - Author *string `protobuf:"2,opt"` - Url *string `protobuf:"3,opt"` - UinNum *uint64 `protobuf:"4,opt"` - } -) +type CPU struct { + Model *string `protobuf:"bytes,1,opt"` + Cores *uint32 `protobuf:"varint,2,opt"` + Frequency *uint32 `protobuf:"varint,3,opt"` +} func (x *CPU) GetModel() string { if x != nil && x.Model != nil { @@ -129,9 +37,15 @@ func (x *CPU) GetFrequency() uint32 { func (x *CPU) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type Camera struct { + Primary *uint64 `protobuf:"varint,1,opt"` + Secondary *uint64 `protobuf:"varint,2,opt"` + Flash *bool `protobuf:"varint,3,opt"` } func (x *Camera) GetPrimary() uint64 { @@ -157,9 +71,14 @@ func (x *Camera) GetFlash() bool { func (x *Camera) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type ConfigSeq struct { + Type *uint32 `protobuf:"varint,1,opt"` + Version *uint32 `protobuf:"varint,2,opt"` } func (x *ConfigSeq) GetType() uint32 { @@ -178,9 +97,15 @@ func (x *ConfigSeq) GetVersion() uint32 { func (x *ConfigSeq) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type Content struct { + TaskId *uint32 `protobuf:"varint,1,opt"` + Compress *uint32 `protobuf:"varint,2,opt"` + Content []byte `protobuf:"bytes,10,opt"` } func (x *Content) GetTaskId() uint32 { @@ -199,9 +124,20 @@ func (x *Content) GetCompress() uint32 { func (x *Content) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type DeviceInfo struct { + Brand *string `protobuf:"bytes,1,opt"` + Model *string `protobuf:"bytes,2,opt"` + Os *OS `protobuf:"bytes,3,opt"` + Cpu *CPU `protobuf:"bytes,4,opt"` + Memory *Memory `protobuf:"bytes,5,opt"` + Storage *Storage `protobuf:"bytes,6,opt"` + Screen *Screen `protobuf:"bytes,7,opt"` + Camera *Camera `protobuf:"bytes,8,opt"` } func (x *DeviceInfo) GetBrand() string { @@ -220,9 +156,14 @@ func (x *DeviceInfo) GetModel() string { func (x *DeviceInfo) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type Memory struct { + Total *uint64 `protobuf:"varint,1,opt"` + Process *uint64 `protobuf:"varint,2,opt"` } func (x *Memory) GetTotal() uint64 { @@ -241,9 +182,17 @@ func (x *Memory) GetProcess() uint64 { func (x *Memory) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type OS struct { + Type *uint32 `protobuf:"varint,1,opt"` + Version *string `protobuf:"bytes,2,opt"` + Sdk *string `protobuf:"bytes,3,opt"` + Kernel *string `protobuf:"bytes,4,opt"` + Rom *string `protobuf:"bytes,5,opt"` } func (x *OS) GetType() uint32 { @@ -283,9 +232,14 @@ func (x *OS) GetRom() string { func (x *OS) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type QueryUinPackageUsageReq struct { + Type *uint32 `protobuf:"varint,1,opt"` + UinFileSize *uint64 `protobuf:"varint,2,opt"` } func (x *QueryUinPackageUsageReq) GetType() uint32 { @@ -304,9 +258,17 @@ func (x *QueryUinPackageUsageReq) GetUinFileSize() uint64 { func (x *QueryUinPackageUsageReq) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type QueryUinPackageUsageRsp struct { + Status *uint32 `protobuf:"varint,1,opt"` + LeftUinNum *uint64 `protobuf:"varint,2,opt"` + MaxUinNum *uint64 `protobuf:"varint,3,opt"` + Proportion *uint32 `protobuf:"varint,4,opt"` + UinPackageUsedList []*UinPackageUsedInfo `protobuf:"bytes,10,rep"` } func (x *QueryUinPackageUsageRsp) GetStatus() uint32 { @@ -339,9 +301,19 @@ func (x *QueryUinPackageUsageRsp) GetProportion() uint32 { func (x *QueryUinPackageUsageRsp) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type ReqBody struct { + ConfigList []*ConfigSeq `protobuf:"bytes,1,rep"` + DeviceInfo *DeviceInfo `protobuf:"bytes,2,opt"` + Info *string `protobuf:"bytes,3,opt"` + Province *string `protobuf:"bytes,4,opt"` + City *string `protobuf:"bytes,5,opt"` + ReqDebugMsg *int32 `protobuf:"varint,6,opt"` + QueryUinPackageUsageReq *QueryUinPackageUsageReq `protobuf:"bytes,101,opt"` } func (x *ReqBody) GetInfo() string { @@ -374,9 +346,15 @@ func (x *ReqBody) GetReqDebugMsg() int32 { func (x *ReqBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type RspBody struct { + Result *uint32 `protobuf:"varint,1,opt"` + ConfigList []*ConfigSeq `protobuf:"bytes,2,rep"` + QueryUinPackageUsageRsp *QueryUinPackageUsageRsp `protobuf:"bytes,101,opt"` } func (x *RspBody) GetResult() uint32 { @@ -388,9 +366,17 @@ func (x *RspBody) GetResult() uint32 { func (x *RspBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type Screen struct { + Model *string `protobuf:"bytes,1,opt"` + Width *uint32 `protobuf:"varint,2,opt"` + Height *uint32 `protobuf:"varint,3,opt"` + Dpi *uint32 `protobuf:"varint,4,opt"` + MultiTouch *bool `protobuf:"varint,5,opt"` } func (x *Screen) GetModel() string { @@ -430,9 +416,14 @@ func (x *Screen) GetMultiTouch() bool { func (x *Screen) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type Storage struct { + Builtin *uint64 `protobuf:"varint,1,opt"` + External *uint64 `protobuf:"varint,2,opt"` } func (x *Storage) GetBuiltin() uint64 { @@ -451,9 +442,16 @@ func (x *Storage) GetExternal() uint64 { func (x *Storage) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type UinPackageUsedInfo struct { + RuleId *uint32 `protobuf:"varint,1,opt"` + Author *string `protobuf:"bytes,2,opt"` + Url *string `protobuf:"bytes,3,opt"` + UinNum *uint64 `protobuf:"varint,4,opt"` } func (x *UinPackageUsedInfo) GetRuleId() uint32 { @@ -486,7 +484,7 @@ func (x *UinPackageUsedInfo) GetUinNum() uint64 { func (x *UinPackageUsedInfo) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) } diff --git a/internal/protobuf/data/oidb/oidb0x88d/oidb0x88d.go b/internal/protobuf/data/oidb/oidb0x88d/0x88d.pb.go similarity index 55% rename from internal/protobuf/data/oidb/oidb0x88d/oidb0x88d.go rename to internal/protobuf/data/oidb/oidb0x88d/0x88d.pb.go index 99ba0915..529a9756 100644 --- a/internal/protobuf/data/oidb/oidb0x88d/oidb0x88d.go +++ b/internal/protobuf/data/oidb/oidb0x88d/0x88d.pb.go @@ -1,214 +1,29 @@ -// Code generated by Proto2Go.Net. Only used for MiraiGo. DO NOT EDIT. -// Source: oidb0x88d.proto +// Code generated by yaprotoc. DO NOT EDIT. +// source: oidb\0x88d.proto package oidb0x88d import ( + oidb0xef0 "github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0xef0" "github.com/pkg/errors" - "go.dedis.ch/protobuf" + "github.com/segmentio/encoding/proto" ) -type ( - GroupCardPrefix struct { - Introduction []byte `protobuf:"1,opt"` - Prefix [][]byte `protobuf:"2"` - } - - GroupExInfoOnly struct { - TribeId *uint32 `protobuf:"1,opt"` - MoneyForAddGroup *uint32 `protobuf:"2,opt"` - } - - GroupGeoInfo struct { - Owneruin *uint64 `protobuf:"1,opt"` - Settime *uint32 `protobuf:"2,opt"` - Cityid *uint32 `protobuf:"3,opt"` - Longitude *int64 `protobuf:"4,opt"` - Latitude *int64 `protobuf:"5,opt"` - Geocontent []byte `protobuf:"6,opt"` - PoiId *uint64 `protobuf:"7,opt"` - } - - GroupHeadPortrait struct { - PicCnt *uint32 `protobuf:"1,opt"` - Info []*GroupHeadPortraitInfo `protobuf:"2"` - DefaultId *uint32 `protobuf:"3,opt"` - VerifyingPicCnt *uint32 `protobuf:"4,opt"` - VerifyingpicInfo []*GroupHeadPortraitInfo `protobuf:"5"` - } - - GroupHeadPortraitInfo struct { - PicId *uint32 `protobuf:"1,opt"` - LeftX *uint32 `protobuf:"2,opt"` - LeftY *uint32 `protobuf:"3,opt"` - RightX *uint32 `protobuf:"4,opt"` - RightY *uint32 `protobuf:"5,opt"` - } - - GroupInfo struct { - GroupOwner *uint64 `protobuf:"1,opt"` - GroupCreateTime *uint32 `protobuf:"2,opt"` - GroupFlag *uint32 `protobuf:"3,opt"` - GroupFlagExt *uint32 `protobuf:"4,opt"` - GroupMemberMaxNum *uint32 `protobuf:"5,opt"` - GroupMemberNum *uint32 `protobuf:"6,opt"` - GroupOption *uint32 `protobuf:"7,opt"` - GroupClassExt *uint32 `protobuf:"8,opt"` - GroupSpecialClass *uint32 `protobuf:"9,opt"` - GroupLevel *uint32 `protobuf:"10,opt"` - GroupFace *uint32 `protobuf:"11,opt"` - GroupDefaultPage *uint32 `protobuf:"12,opt"` - GroupInfoSeq *uint32 `protobuf:"13,opt"` - GroupRoamingTime *uint32 `protobuf:"14,opt"` - GroupName []byte `protobuf:"15,opt"` - GroupMemo []byte `protobuf:"16,opt"` - GroupFingerMemo []byte `protobuf:"17,opt"` - GroupClassText []byte `protobuf:"18,opt"` - GroupAllianceCode []*uint32 `protobuf:"19"` - GroupExtraAdmNum *uint32 `protobuf:"20,opt"` - GroupUin *uint64 `protobuf:"21,opt"` - GroupCurMsgSeq *uint32 `protobuf:"22,opt"` - GroupLastMsgTime *uint32 `protobuf:"23,opt"` - GroupQuestion []byte `protobuf:"24,opt"` - GroupAnswer []byte `protobuf:"25,opt"` - GroupVisitorMaxNum *uint32 `protobuf:"26,opt"` - GroupVisitorCurNum *uint32 `protobuf:"27,opt"` - LevelNameSeq *uint32 `protobuf:"28,opt"` - GroupAdminMaxNum *uint32 `protobuf:"29,opt"` - GroupAioSkinTimestamp *uint32 `protobuf:"30,opt"` - GroupBoardSkinTimestamp *uint32 `protobuf:"31,opt"` - GroupAioSkinUrl []byte `protobuf:"32,opt"` - GroupBoardSkinUrl []byte `protobuf:"33,opt"` - GroupCoverSkinTimestamp *uint32 `protobuf:"34,opt"` - GroupCoverSkinUrl []byte `protobuf:"35,opt"` - GroupGrade *uint32 `protobuf:"36,opt"` - ActiveMemberNum *uint32 `protobuf:"37,opt"` - CertificationType *uint32 `protobuf:"38,opt"` - CertificationText []byte `protobuf:"39,opt"` - GroupRichFingerMemo []byte `protobuf:"40,opt"` - TagRecord []*TagRecord `protobuf:"41"` - GroupGeoInfo *GroupGeoInfo `protobuf:"42,opt"` - HeadPortraitSeq *uint32 `protobuf:"43,opt"` - HeadPortrait *GroupHeadPortrait `protobuf:"44,opt"` - ShutupTimestamp *uint32 `protobuf:"45,opt"` - ShutupTimestampMe *uint32 `protobuf:"46,opt"` - CreateSourceFlag *uint32 `protobuf:"47,opt"` - CmduinMsgSeq *uint32 `protobuf:"48,opt"` - CmduinJoinTime *uint32 `protobuf:"49,opt"` - CmduinUinFlag *uint32 `protobuf:"50,opt"` - CmduinFlagEx *uint32 `protobuf:"51,opt"` - CmduinNewMobileFlag *uint32 `protobuf:"52,opt"` - CmduinReadMsgSeq *uint32 `protobuf:"53,opt"` - CmduinLastMsgTime *uint32 `protobuf:"54,opt"` - GroupTypeFlag *uint32 `protobuf:"55,opt"` - AppPrivilegeFlag *uint32 `protobuf:"56,opt"` - StGroupExInfo *GroupExInfoOnly `protobuf:"57,opt"` - GroupSecLevel *uint32 `protobuf:"58,opt"` - GroupSecLevelInfo *uint32 `protobuf:"59,opt"` - CmduinPrivilege *uint32 `protobuf:"60,opt"` - PoidInfo []byte `protobuf:"61,opt"` - CmduinFlagEx2 *uint32 `protobuf:"62,opt"` - ConfUin *uint64 `protobuf:"63,opt"` - ConfMaxMsgSeq *uint32 `protobuf:"64,opt"` - ConfToGroupTime *uint32 `protobuf:"65,opt"` - PasswordRedbagTime *uint32 `protobuf:"66,opt"` - SubscriptionUin *uint64 `protobuf:"67,opt"` - MemberListChangeSeq *uint32 `protobuf:"68,opt"` - MembercardSeq *uint32 `protobuf:"69,opt"` - RootId *uint64 `protobuf:"70,opt"` - ParentId *uint64 `protobuf:"71,opt"` - TeamSeq *uint32 `protobuf:"72,opt"` - HistoryMsgBeginTime *uint64 `protobuf:"73,opt"` - InviteNoAuthNumLimit *uint64 `protobuf:"74,opt"` - CmduinHistoryMsgSeq *uint32 `protobuf:"75,opt"` - CmduinJoinMsgSeq *uint32 `protobuf:"76,opt"` - GroupFlagext3 *uint32 `protobuf:"77,opt"` - GroupOpenAppid *uint32 `protobuf:"78,opt"` - IsConfGroup *uint32 `protobuf:"79,opt"` - IsModifyConfGroupFace *uint32 `protobuf:"80,opt"` - IsModifyConfGroupName *uint32 `protobuf:"81,opt"` - NoFingerOpenFlag *uint32 `protobuf:"82,opt"` - NoCodeFingerOpenFlag *uint32 `protobuf:"83,opt"` - AutoAgreeJoinGroupUserNumForNormalGroup *uint32 `protobuf:"84,opt"` - AutoAgreeJoinGroupUserNumForConfGroup *uint32 `protobuf:"85,opt"` - IsAllowConfGroupMemberNick *uint32 `protobuf:"86,opt"` - IsAllowConfGroupMemberAtAll *uint32 `protobuf:"87,opt"` - IsAllowConfGroupMemberModifyGroupName *uint32 `protobuf:"88,opt"` - LongGroupName []byte `protobuf:"89,opt"` - CmduinJoinRealMsgSeq *uint32 `protobuf:"90,opt"` - IsGroupFreeze *uint32 `protobuf:"91,opt"` - MsgLimitFrequency *uint32 `protobuf:"92,opt"` - JoinGroupAuth []byte `protobuf:"93,opt"` - HlGuildAppid *uint32 `protobuf:"94,opt"` - HlGuildSubType *uint32 `protobuf:"95,opt"` - HlGuildOrgid *uint32 `protobuf:"96,opt"` - IsAllowHlGuildBinary *uint32 `protobuf:"97,opt"` - CmduinRingtoneId *uint32 `protobuf:"98,opt"` - GroupFlagext4 *uint32 `protobuf:"99,opt"` - GroupFreezeReason *uint32 `protobuf:"100,opt"` - IsAllowRecallMsg *uint32 `protobuf:"101,opt"` - ImportantMsgLatestSeq *uint32 `protobuf:"102,opt"` - GroupSchoolInfo []byte `protobuf:"103,opt"` - AppealDeadline *uint32 `protobuf:"104,opt"` - StGroupCardPrefix *GroupCardPrefix `protobuf:"105,opt"` - AllianceId *uint64 `protobuf:"106,opt"` - CmduinFlagEx3Grocery *uint32 `protobuf:"107,opt"` - GroupInfoExtSeq *uint32 `protobuf:"108,opt"` - StGroupInfoExt *GroupInfoExt `protobuf:"109,opt"` - CmduinGroupRemarkName []byte `protobuf:"110,opt"` - } - - ReqBody struct { - Appid *uint32 `protobuf:"1,opt"` - Stzreqgroupinfo []*ReqGroupInfo `protobuf:"2"` - PcClientVersion *uint32 `protobuf:"3,opt"` - } - - ReqGroupInfo struct { - GroupCode *uint64 `protobuf:"1,opt"` - Stgroupinfo *GroupInfo `protobuf:"2,opt"` - LastGetGroupNameTime *uint32 `protobuf:"3,opt"` - } - - RspBody struct { - Stzrspgroupinfo []*RspGroupInfo `protobuf:"1"` - Errorinfo []byte `protobuf:"2,opt"` - } - - RspGroupInfo struct { - GroupCode *uint64 `protobuf:"1,opt"` - Result *uint32 `protobuf:"2,opt"` - Stgroupinfo *GroupInfo `protobuf:"3,opt"` - } - - TagRecord struct { - FromUin *uint64 `protobuf:"1,opt"` - GroupCode *uint64 `protobuf:"2,opt"` - TagId []byte `protobuf:"3,opt"` - SetTime *uint64 `protobuf:"4,opt"` - GoodNum *uint32 `protobuf:"5,opt"` - BadNum *uint32 `protobuf:"6,opt"` - TagLen *uint32 `protobuf:"7,opt"` - TagValue []byte `protobuf:"8,opt"` - } - - GroupInfoExt struct { - GroupInfoExtSeq *uint32 `protobuf:"1,opt"` - LuckyWordId *uint64 `protobuf:"2,opt"` - LightCharNum *uint32 `protobuf:"3,opt"` - LuckyWord []byte `protobuf:"4,opt"` - StarId *uint32 `protobuf:"5,opt"` - EssentialMsgSwitch *uint32 `protobuf:"6,opt"` - TodoSeq *uint32 `protobuf:"7,opt"` - BlacklistExpireTime *uint32 `protobuf:"8,opt"` - } -) +type GroupCardPrefix struct { + Introduction []byte `protobuf:"bytes,1,opt"` + Prefix [][]byte `protobuf:"bytes,2,rep"` +} func (x *GroupCardPrefix) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type GroupExInfoOnly struct { + TribeId *uint32 `protobuf:"varint,1,opt"` + MoneyForAddGroup *uint32 `protobuf:"varint,2,opt"` } func (x *GroupExInfoOnly) GetTribeId() uint32 { @@ -227,9 +42,19 @@ func (x *GroupExInfoOnly) GetMoneyForAddGroup() uint32 { func (x *GroupExInfoOnly) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type GroupGeoInfo struct { + Owneruin *uint64 `protobuf:"varint,1,opt"` + Settime *uint32 `protobuf:"varint,2,opt"` + Cityid *uint32 `protobuf:"varint,3,opt"` + Longitude *int64 `protobuf:"varint,4,opt"` + Latitude *int64 `protobuf:"varint,5,opt"` + Geocontent []byte `protobuf:"bytes,6,opt"` + PoiId *uint64 `protobuf:"varint,7,opt"` } func (x *GroupGeoInfo) GetOwneruin() uint64 { @@ -276,9 +101,17 @@ func (x *GroupGeoInfo) GetPoiId() uint64 { func (x *GroupGeoInfo) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type GroupHeadPortrait struct { + PicCnt *uint32 `protobuf:"varint,1,opt"` + Info []*GroupHeadPortraitInfo `protobuf:"bytes,2,rep"` + DefaultId *uint32 `protobuf:"varint,3,opt"` + VerifyingPicCnt *uint32 `protobuf:"varint,4,opt"` + VerifyingpicInfo []*GroupHeadPortraitInfo `protobuf:"bytes,5,rep"` } func (x *GroupHeadPortrait) GetPicCnt() uint32 { @@ -304,9 +137,17 @@ func (x *GroupHeadPortrait) GetVerifyingPicCnt() uint32 { func (x *GroupHeadPortrait) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type GroupHeadPortraitInfo struct { + PicId *uint32 `protobuf:"varint,1,opt"` + LeftX *uint32 `protobuf:"varint,2,opt"` + LeftY *uint32 `protobuf:"varint,3,opt"` + RightX *uint32 `protobuf:"varint,4,opt"` + RightY *uint32 `protobuf:"varint,5,opt"` } func (x *GroupHeadPortraitInfo) GetPicId() uint32 { @@ -346,9 +187,122 @@ func (x *GroupHeadPortraitInfo) GetRightY() uint32 { func (x *GroupHeadPortraitInfo) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type GroupInfo struct { + GroupOwner *uint64 `protobuf:"varint,1,opt"` + GroupCreateTime *uint32 `protobuf:"varint,2,opt"` + GroupFlag *uint32 `protobuf:"varint,3,opt"` + GroupFlagExt *uint32 `protobuf:"varint,4,opt"` + GroupMemberMaxNum *uint32 `protobuf:"varint,5,opt"` + GroupMemberNum *uint32 `protobuf:"varint,6,opt"` + GroupOption *uint32 `protobuf:"varint,7,opt"` + GroupClassExt *uint32 `protobuf:"varint,8,opt"` + GroupSpecialClass *uint32 `protobuf:"varint,9,opt"` + GroupLevel *uint32 `protobuf:"varint,10,opt"` + GroupFace *uint32 `protobuf:"varint,11,opt"` + GroupDefaultPage *uint32 `protobuf:"varint,12,opt"` + GroupInfoSeq *uint32 `protobuf:"varint,13,opt"` + GroupRoamingTime *uint32 `protobuf:"varint,14,opt"` + GroupName []byte `protobuf:"bytes,15,opt"` + GroupMemo []byte `protobuf:"bytes,16,opt"` + GroupFingerMemo []byte `protobuf:"bytes,17,opt"` + GroupClassText []byte `protobuf:"bytes,18,opt"` + GroupAllianceCode []uint32 `protobuf:"varint,19,rep"` + GroupExtraAdmNum *uint32 `protobuf:"varint,20,opt"` + GroupUin *uint64 `protobuf:"varint,21,opt"` + GroupCurMsgSeq *uint32 `protobuf:"varint,22,opt"` + GroupLastMsgTime *uint32 `protobuf:"varint,23,opt"` + GroupQuestion []byte `protobuf:"bytes,24,opt"` + GroupAnswer []byte `protobuf:"bytes,25,opt"` + GroupVisitorMaxNum *uint32 `protobuf:"varint,26,opt"` + GroupVisitorCurNum *uint32 `protobuf:"varint,27,opt"` + LevelNameSeq *uint32 `protobuf:"varint,28,opt"` + GroupAdminMaxNum *uint32 `protobuf:"varint,29,opt"` + GroupAioSkinTimestamp *uint32 `protobuf:"varint,30,opt"` + GroupBoardSkinTimestamp *uint32 `protobuf:"varint,31,opt"` + GroupAioSkinUrl []byte `protobuf:"bytes,32,opt"` + GroupBoardSkinUrl []byte `protobuf:"bytes,33,opt"` + GroupCoverSkinTimestamp *uint32 `protobuf:"varint,34,opt"` + GroupCoverSkinUrl []byte `protobuf:"bytes,35,opt"` + GroupGrade *uint32 `protobuf:"varint,36,opt"` + ActiveMemberNum *uint32 `protobuf:"varint,37,opt"` + CertificationType *uint32 `protobuf:"varint,38,opt"` + CertificationText []byte `protobuf:"bytes,39,opt"` + GroupRichFingerMemo []byte `protobuf:"bytes,40,opt"` + TagRecord []*TagRecord `protobuf:"bytes,41,rep"` + GroupGeoInfo *GroupGeoInfo `protobuf:"bytes,42,opt"` + HeadPortraitSeq *uint32 `protobuf:"varint,43,opt"` + HeadPortrait *GroupHeadPortrait `protobuf:"bytes,44,opt"` + ShutupTimestamp *uint32 `protobuf:"varint,45,opt"` + ShutupTimestampMe *uint32 `protobuf:"varint,46,opt"` + CreateSourceFlag *uint32 `protobuf:"varint,47,opt"` + CmduinMsgSeq *uint32 `protobuf:"varint,48,opt"` + CmduinJoinTime *uint32 `protobuf:"varint,49,opt"` + CmduinUinFlag *uint32 `protobuf:"varint,50,opt"` + CmduinFlagEx *uint32 `protobuf:"varint,51,opt"` + CmduinNewMobileFlag *uint32 `protobuf:"varint,52,opt"` + CmduinReadMsgSeq *uint32 `protobuf:"varint,53,opt"` + CmduinLastMsgTime *uint32 `protobuf:"varint,54,opt"` + GroupTypeFlag *uint32 `protobuf:"varint,55,opt"` + AppPrivilegeFlag *uint32 `protobuf:"varint,56,opt"` + StGroupExInfo *GroupExInfoOnly `protobuf:"bytes,57,opt"` + GroupSecLevel *uint32 `protobuf:"varint,58,opt"` + GroupSecLevelInfo *uint32 `protobuf:"varint,59,opt"` + CmduinPrivilege *uint32 `protobuf:"varint,60,opt"` + PoidInfo []byte `protobuf:"bytes,61,opt"` + CmduinFlagEx2 *uint32 `protobuf:"varint,62,opt"` + ConfUin *uint64 `protobuf:"varint,63,opt"` + ConfMaxMsgSeq *uint32 `protobuf:"varint,64,opt"` + ConfToGroupTime *uint32 `protobuf:"varint,65,opt"` + PasswordRedbagTime *uint32 `protobuf:"varint,66,opt"` + SubscriptionUin *uint64 `protobuf:"varint,67,opt"` + MemberListChangeSeq *uint32 `protobuf:"varint,68,opt"` + MembercardSeq *uint32 `protobuf:"varint,69,opt"` + RootId *uint64 `protobuf:"varint,70,opt"` + ParentId *uint64 `protobuf:"varint,71,opt"` + TeamSeq *uint32 `protobuf:"varint,72,opt"` + HistoryMsgBeginTime *uint64 `protobuf:"varint,73,opt"` + InviteNoAuthNumLimit *uint64 `protobuf:"varint,74,opt"` + CmduinHistoryMsgSeq *uint32 `protobuf:"varint,75,opt"` + CmduinJoinMsgSeq *uint32 `protobuf:"varint,76,opt"` + GroupFlagext3 *uint32 `protobuf:"varint,77,opt"` + GroupOpenAppid *uint32 `protobuf:"varint,78,opt"` + IsConfGroup *uint32 `protobuf:"varint,79,opt"` + IsModifyConfGroupFace *uint32 `protobuf:"varint,80,opt"` + IsModifyConfGroupName *uint32 `protobuf:"varint,81,opt"` + NoFingerOpenFlag *uint32 `protobuf:"varint,82,opt"` + NoCodeFingerOpenFlag *uint32 `protobuf:"varint,83,opt"` + AutoAgreeJoinGroupUserNumForNormalGroup *uint32 `protobuf:"varint,84,opt"` + AutoAgreeJoinGroupUserNumForConfGroup *uint32 `protobuf:"varint,85,opt"` + IsAllowConfGroupMemberNick *uint32 `protobuf:"varint,86,opt"` + IsAllowConfGroupMemberAtAll *uint32 `protobuf:"varint,87,opt"` + IsAllowConfGroupMemberModifyGroupName *uint32 `protobuf:"varint,88,opt"` + LongGroupName []byte `protobuf:"bytes,89,opt"` + CmduinJoinRealMsgSeq *uint32 `protobuf:"varint,90,opt"` + IsGroupFreeze *uint32 `protobuf:"varint,91,opt"` + MsgLimitFrequency *uint32 `protobuf:"varint,92,opt"` + JoinGroupAuth []byte `protobuf:"bytes,93,opt"` + HlGuildAppid *uint32 `protobuf:"varint,94,opt"` + HlGuildSubType *uint32 `protobuf:"varint,95,opt"` + HlGuildOrgid *uint32 `protobuf:"varint,96,opt"` + IsAllowHlGuildBinary *uint32 `protobuf:"varint,97,opt"` + CmduinRingtoneId *uint32 `protobuf:"varint,98,opt"` + GroupFlagext4 *uint32 `protobuf:"varint,99,opt"` + GroupFreezeReason *uint32 `protobuf:"varint,100,opt"` + IsAllowRecallMsg *uint32 `protobuf:"varint,101,opt"` + ImportantMsgLatestSeq *uint32 `protobuf:"varint,102,opt"` + GroupSchoolInfo []byte `protobuf:"bytes,103,opt"` + AppealDeadline *uint32 `protobuf:"varint,104,opt"` + StGroupCardPrefix *GroupCardPrefix `protobuf:"bytes,105,opt"` + AllianceId *uint64 `protobuf:"varint,106,opt"` + CmduinFlagEx3Grocery *uint32 `protobuf:"varint,107,opt"` + GroupInfoExtSeq *uint32 `protobuf:"varint,108,opt"` + StGroupInfoExt *oidb0xef0.GroupInfoExt `protobuf:"bytes,109,opt"` + CmduinGroupRemarkName []byte `protobuf:"bytes,110,opt"` } func (x *GroupInfo) GetGroupOwner() uint64 { @@ -962,9 +916,15 @@ func (x *GroupInfo) GetGroupInfoExtSeq() uint32 { func (x *GroupInfo) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type ReqBody struct { + Appid *uint32 `protobuf:"varint,1,opt"` + Stzreqgroupinfo []*ReqGroupInfo `protobuf:"bytes,2,rep"` + PcClientVersion *uint32 `protobuf:"varint,3,opt"` } func (x *ReqBody) GetAppid() uint32 { @@ -983,9 +943,15 @@ func (x *ReqBody) GetPcClientVersion() uint32 { func (x *ReqBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type ReqGroupInfo struct { + GroupCode *uint64 `protobuf:"varint,1,opt"` + Stgroupinfo *GroupInfo `protobuf:"bytes,2,opt"` + LastGetGroupNameTime *uint32 `protobuf:"varint,3,opt"` } func (x *ReqGroupInfo) GetGroupCode() uint64 { @@ -1004,16 +970,27 @@ func (x *ReqGroupInfo) GetLastGetGroupNameTime() uint32 { func (x *ReqGroupInfo) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type RspBody struct { + Stzrspgroupinfo []*RspGroupInfo `protobuf:"bytes,1,rep"` + Errorinfo []byte `protobuf:"bytes,2,opt"` } func (x *RspBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type RspGroupInfo struct { + GroupCode *uint64 `protobuf:"varint,1,opt"` + Result *uint32 `protobuf:"varint,2,opt"` + Stgroupinfo *GroupInfo `protobuf:"bytes,3,opt"` } func (x *RspGroupInfo) GetGroupCode() uint64 { @@ -1032,9 +1009,20 @@ func (x *RspGroupInfo) GetResult() uint32 { func (x *RspGroupInfo) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type TagRecord struct { + FromUin *uint64 `protobuf:"varint,1,opt"` + GroupCode *uint64 `protobuf:"varint,2,opt"` + TagId []byte `protobuf:"bytes,3,opt"` + SetTime *uint64 `protobuf:"varint,4,opt"` + GoodNum *uint32 `protobuf:"varint,5,opt"` + BadNum *uint32 `protobuf:"varint,6,opt"` + TagLen *uint32 `protobuf:"varint,7,opt"` + TagValue []byte `protobuf:"bytes,8,opt"` } func (x *TagRecord) GetFromUin() uint64 { @@ -1081,63 +1069,7 @@ func (x *TagRecord) GetTagLen() uint32 { func (x *TagRecord) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) -} - -func (x *GroupInfoExt) GetGroupInfoExtSeq() uint32 { - if x != nil && x.GroupInfoExtSeq != nil { - return *x.GroupInfoExtSeq - } - return 0 -} - -func (x *GroupInfoExt) GetLuckyWordId() uint64 { - if x != nil && x.LuckyWordId != nil { - return *x.LuckyWordId - } - return 0 -} - -func (x *GroupInfoExt) GetLightCharNum() uint32 { - if x != nil && x.LightCharNum != nil { - return *x.LightCharNum - } - return 0 -} - -func (x *GroupInfoExt) GetStarId() uint32 { - if x != nil && x.StarId != nil { - return *x.StarId - } - return 0 -} - -func (x *GroupInfoExt) GetEssentialMsgSwitch() uint32 { - if x != nil && x.EssentialMsgSwitch != nil { - return *x.EssentialMsgSwitch - } - return 0 -} - -func (x *GroupInfoExt) GetTodoSeq() uint32 { - if x != nil && x.TodoSeq != nil { - return *x.TodoSeq - } - return 0 -} - -func (x *GroupInfoExt) GetBlacklistExpireTime() uint32 { - if x != nil && x.BlacklistExpireTime != nil { - return *x.BlacklistExpireTime - } - return 0 -} - -func (x *GroupInfoExt) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) + return proto.Marshal(x) } diff --git a/internal/protobuf/data/oidb/oidb0x89a/0x89a.pb.go b/internal/protobuf/data/oidb/oidb0x89a/0x89a.pb.go new file mode 100644 index 00000000..ad64d43b --- /dev/null +++ b/internal/protobuf/data/oidb/oidb0x89a/0x89a.pb.go @@ -0,0 +1,434 @@ +// Code generated by yaprotoc. DO NOT EDIT. +// source: oidb\0x89a.proto + +package oidb0x89a + +import ( + "github.com/pkg/errors" + "github.com/segmentio/encoding/proto" +) + +type GroupCardPrefix struct { + Introduction []byte `protobuf:"bytes,1,opt"` + Prefix [][]byte `protobuf:"bytes,2,rep"` +} + +func (x *GroupCardPrefix) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type GroupExInfoOnly struct { + TribeId *uint32 `protobuf:"varint,1,opt"` + MoneyForAddGroup *uint32 `protobuf:"varint,2,opt"` +} + +func (x *GroupExInfoOnly) GetTribeId() uint32 { + if x != nil && x.TribeId != nil { + return *x.TribeId + } + return 0 +} + +func (x *GroupExInfoOnly) GetMoneyForAddGroup() uint32 { + if x != nil && x.MoneyForAddGroup != nil { + return *x.MoneyForAddGroup + } + return 0 +} + +func (x *GroupExInfoOnly) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type GroupGeoInfo struct { + CityId *uint32 `protobuf:"varint,1,opt"` + Longtitude *uint64 `protobuf:"varint,2,opt"` + Latitude *uint64 `protobuf:"varint,3,opt"` + GeoContent []byte `protobuf:"bytes,4,opt"` + PoiId *uint64 `protobuf:"varint,5,opt"` +} + +func (x *GroupGeoInfo) GetCityId() uint32 { + if x != nil && x.CityId != nil { + return *x.CityId + } + return 0 +} + +func (x *GroupGeoInfo) GetLongtitude() uint64 { + if x != nil && x.Longtitude != nil { + return *x.Longtitude + } + return 0 +} + +func (x *GroupGeoInfo) GetLatitude() uint64 { + if x != nil && x.Latitude != nil { + return *x.Latitude + } + return 0 +} + +func (x *GroupGeoInfo) GetPoiId() uint64 { + if x != nil && x.PoiId != nil { + return *x.PoiId + } + return 0 +} + +func (x *GroupGeoInfo) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type GroupInfo struct { + GroupExtAdmNum *uint32 `protobuf:"varint,1,opt"` + Flag *uint32 `protobuf:"varint,2,opt"` + GroupName []byte `protobuf:"bytes,3,opt"` + GroupMemo []byte `protobuf:"bytes,4,opt"` + GroupFingerMemo []byte `protobuf:"bytes,5,opt"` + GroupAioSkinUrl []byte `protobuf:"bytes,6,opt"` + GroupBoardSkinUrl []byte `protobuf:"bytes,7,opt"` + GroupCoverSkinUrl []byte `protobuf:"bytes,8,opt"` + GroupGrade *uint32 `protobuf:"varint,9,opt"` + ActiveMemberNum *uint32 `protobuf:"varint,10,opt"` + CertificationType *uint32 `protobuf:"varint,11,opt"` + CertificationText []byte `protobuf:"bytes,12,opt"` + GroupRichFingerMemo []byte `protobuf:"bytes,13,opt"` + StGroupNewguidelines *GroupNewGuidelinesInfo `protobuf:"bytes,14,opt"` + GroupFace *uint32 `protobuf:"varint,15,opt"` + AddOption *uint32 `protobuf:"varint,16,opt"` + ShutupTime *uint32 `protobuf:"varint,17,opt"` + GroupTypeFlag *uint32 `protobuf:"varint,18,opt"` + GroupTag [][]byte `protobuf:"bytes,19,rep"` + GroupGeoInfo *GroupGeoInfo `protobuf:"bytes,20,opt"` + GroupClassExt *uint32 `protobuf:"varint,21,opt"` + GroupClassText []byte `protobuf:"bytes,22,opt"` + AppPrivilegeFlag *uint32 `protobuf:"varint,23,opt"` + AppPrivilegeMask *uint32 `protobuf:"varint,24,opt"` + StGroupExInfo *GroupExInfoOnly `protobuf:"bytes,25,opt"` + GroupSecLevel *uint32 `protobuf:"varint,26,opt"` + GroupSecLevelInfo *uint32 `protobuf:"varint,27,opt"` + SubscriptionUin *uint64 `protobuf:"varint,28,opt"` + AllowMemberInvite *uint32 `protobuf:"varint,29,opt"` + GroupQuestion []byte `protobuf:"bytes,30,opt"` + GroupAnswer []byte `protobuf:"bytes,31,opt"` + GroupFlagext3 *uint32 `protobuf:"varint,32,opt"` + GroupFlagext3Mask *uint32 `protobuf:"varint,33,opt"` + GroupOpenAppid *uint32 `protobuf:"varint,34,opt"` + NoFingerOpenFlag *uint32 `protobuf:"varint,35,opt"` + NoCodeFingerOpenFlag *uint32 `protobuf:"varint,36,opt"` + RootId *uint64 `protobuf:"varint,37,opt"` + MsgLimitFrequency *uint32 `protobuf:"varint,38,opt"` + HlGuildAppid *uint32 `protobuf:"varint,39,opt"` + HlGuildSubType *uint32 `protobuf:"varint,40,opt"` + HlGuildOrgid *uint32 `protobuf:"varint,41,opt"` + GroupFlagext4 *uint32 `protobuf:"varint,42,opt"` + GroupFlagext4Mask *uint32 `protobuf:"varint,43,opt"` + GroupSchoolInfo []byte `protobuf:"bytes,44,opt"` + StGroupCardPrefix *GroupCardPrefix `protobuf:"bytes,45,opt"` +} + +func (x *GroupInfo) GetGroupExtAdmNum() uint32 { + if x != nil && x.GroupExtAdmNum != nil { + return *x.GroupExtAdmNum + } + return 0 +} + +func (x *GroupInfo) GetFlag() uint32 { + if x != nil && x.Flag != nil { + return *x.Flag + } + return 0 +} + +func (x *GroupInfo) GetGroupGrade() uint32 { + if x != nil && x.GroupGrade != nil { + return *x.GroupGrade + } + return 0 +} + +func (x *GroupInfo) GetActiveMemberNum() uint32 { + if x != nil && x.ActiveMemberNum != nil { + return *x.ActiveMemberNum + } + return 0 +} + +func (x *GroupInfo) GetCertificationType() uint32 { + if x != nil && x.CertificationType != nil { + return *x.CertificationType + } + return 0 +} + +func (x *GroupInfo) GetGroupFace() uint32 { + if x != nil && x.GroupFace != nil { + return *x.GroupFace + } + return 0 +} + +func (x *GroupInfo) GetAddOption() uint32 { + if x != nil && x.AddOption != nil { + return *x.AddOption + } + return 0 +} + +func (x *GroupInfo) GetShutupTime() uint32 { + if x != nil && x.ShutupTime != nil { + return *x.ShutupTime + } + return 0 +} + +func (x *GroupInfo) GetGroupTypeFlag() uint32 { + if x != nil && x.GroupTypeFlag != nil { + return *x.GroupTypeFlag + } + return 0 +} + +func (x *GroupInfo) GetGroupClassExt() uint32 { + if x != nil && x.GroupClassExt != nil { + return *x.GroupClassExt + } + return 0 +} + +func (x *GroupInfo) GetAppPrivilegeFlag() uint32 { + if x != nil && x.AppPrivilegeFlag != nil { + return *x.AppPrivilegeFlag + } + return 0 +} + +func (x *GroupInfo) GetAppPrivilegeMask() uint32 { + if x != nil && x.AppPrivilegeMask != nil { + return *x.AppPrivilegeMask + } + return 0 +} + +func (x *GroupInfo) GetGroupSecLevel() uint32 { + if x != nil && x.GroupSecLevel != nil { + return *x.GroupSecLevel + } + return 0 +} + +func (x *GroupInfo) GetGroupSecLevelInfo() uint32 { + if x != nil && x.GroupSecLevelInfo != nil { + return *x.GroupSecLevelInfo + } + return 0 +} + +func (x *GroupInfo) GetSubscriptionUin() uint64 { + if x != nil && x.SubscriptionUin != nil { + return *x.SubscriptionUin + } + return 0 +} + +func (x *GroupInfo) GetAllowMemberInvite() uint32 { + if x != nil && x.AllowMemberInvite != nil { + return *x.AllowMemberInvite + } + return 0 +} + +func (x *GroupInfo) GetGroupFlagext3() uint32 { + if x != nil && x.GroupFlagext3 != nil { + return *x.GroupFlagext3 + } + return 0 +} + +func (x *GroupInfo) GetGroupFlagext3Mask() uint32 { + if x != nil && x.GroupFlagext3Mask != nil { + return *x.GroupFlagext3Mask + } + return 0 +} + +func (x *GroupInfo) GetGroupOpenAppid() uint32 { + if x != nil && x.GroupOpenAppid != nil { + return *x.GroupOpenAppid + } + return 0 +} + +func (x *GroupInfo) GetNoFingerOpenFlag() uint32 { + if x != nil && x.NoFingerOpenFlag != nil { + return *x.NoFingerOpenFlag + } + return 0 +} + +func (x *GroupInfo) GetNoCodeFingerOpenFlag() uint32 { + if x != nil && x.NoCodeFingerOpenFlag != nil { + return *x.NoCodeFingerOpenFlag + } + return 0 +} + +func (x *GroupInfo) GetRootId() uint64 { + if x != nil && x.RootId != nil { + return *x.RootId + } + return 0 +} + +func (x *GroupInfo) GetMsgLimitFrequency() uint32 { + if x != nil && x.MsgLimitFrequency != nil { + return *x.MsgLimitFrequency + } + return 0 +} + +func (x *GroupInfo) GetHlGuildAppid() uint32 { + if x != nil && x.HlGuildAppid != nil { + return *x.HlGuildAppid + } + return 0 +} + +func (x *GroupInfo) GetHlGuildSubType() uint32 { + if x != nil && x.HlGuildSubType != nil { + return *x.HlGuildSubType + } + return 0 +} + +func (x *GroupInfo) GetHlGuildOrgid() uint32 { + if x != nil && x.HlGuildOrgid != nil { + return *x.HlGuildOrgid + } + return 0 +} + +func (x *GroupInfo) GetGroupFlagext4() uint32 { + if x != nil && x.GroupFlagext4 != nil { + return *x.GroupFlagext4 + } + return 0 +} + +func (x *GroupInfo) GetGroupFlagext4Mask() uint32 { + if x != nil && x.GroupFlagext4Mask != nil { + return *x.GroupFlagext4Mask + } + return 0 +} + +func (x *GroupInfo) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type GroupNewGuidelinesInfo struct { + Enabled *bool `protobuf:"varint,1,opt"` + Content []byte `protobuf:"bytes,2,opt"` +} + +func (x *GroupNewGuidelinesInfo) GetEnabled() bool { + if x != nil && x.Enabled != nil { + return *x.Enabled + } + return false +} + +func (x *GroupNewGuidelinesInfo) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type GroupSchoolInfo struct { + Location []byte `protobuf:"bytes,1,opt"` + Grade *uint32 `protobuf:"varint,2,opt"` + School []byte `protobuf:"bytes,3,opt"` +} + +func (x *GroupSchoolInfo) GetGrade() uint32 { + if x != nil && x.Grade != nil { + return *x.Grade + } + return 0 +} + +func (x *GroupSchoolInfo) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type ReqBody struct { + GroupCode *uint64 `protobuf:"varint,1,opt"` + StGroupInfo *GroupInfo `protobuf:"bytes,2,opt"` + OriginalOperatorUin *uint64 `protobuf:"varint,3,opt"` + ReqGroupOpenAppid *uint32 `protobuf:"varint,4,opt"` +} + +func (x *ReqBody) GetGroupCode() uint64 { + if x != nil && x.GroupCode != nil { + return *x.GroupCode + } + return 0 +} + +func (x *ReqBody) GetOriginalOperatorUin() uint64 { + if x != nil && x.OriginalOperatorUin != nil { + return *x.OriginalOperatorUin + } + return 0 +} + +func (x *ReqBody) GetReqGroupOpenAppid() uint32 { + if x != nil && x.ReqGroupOpenAppid != nil { + return *x.ReqGroupOpenAppid + } + return 0 +} + +func (x *ReqBody) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type RspBody struct { + GroupCode *uint64 `protobuf:"varint,1,opt"` + Errorinfo []byte `protobuf:"bytes,2,opt"` +} + +func (x *RspBody) GetGroupCode() uint64 { + if x != nil && x.GroupCode != nil { + return *x.GroupCode + } + return 0 +} + +func (x *RspBody) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} diff --git a/internal/protobuf/data/oidb/oidb0x89a/oidb0x89a.go b/internal/protobuf/data/oidb/oidb0x89a/oidb0x89a.go deleted file mode 100644 index ba089f6f..00000000 --- a/internal/protobuf/data/oidb/oidb0x89a/oidb0x89a.go +++ /dev/null @@ -1,343 +0,0 @@ -// Code generated by Proto2Go.Net. Only used for MiraiGo. DO NOT EDIT. -// Source: oidb0x89a.proto - -package oidb0x89a - -import ( - "github.com/pkg/errors" - "go.dedis.ch/protobuf" -) - -type ( - ReqBody struct { - GroupCode *int64 `protobuf:"1,opt"` - StGroupInfo *GroupInfo `protobuf:"2,opt"` - OriginalOperatorUin *int64 `protobuf:"3,opt"` - ReqGroupOpenAppid *int32 `protobuf:"4,opt"` - } - - GroupInfo struct { - GroupExtAdmNum *int32 `protobuf:"1,opt"` - Flag *int32 `protobuf:"2,opt"` - IngGroupName []byte `protobuf:"3,opt"` - IngGroupMemo []byte `protobuf:"4,opt"` - IngGroupFingerMemo []byte `protobuf:"5,opt"` - IngGroupAioSkinUrl []byte `protobuf:"6,opt"` - IngGroupBoardSkinUrl []byte `protobuf:"7,opt"` - IngGroupCoverSkinUrl []byte `protobuf:"8,opt"` - GroupGrade *int32 `protobuf:"9,opt"` - ActiveMemberNum *int32 `protobuf:"10,opt"` - CertificationType *int32 `protobuf:"11,opt"` - IngCertificationText []byte `protobuf:"12,opt"` - IngGroupRichFingerMemo []byte `protobuf:"13,opt"` - StGroupNewguidelines *GroupNewGuidelinesInfo `protobuf:"14,opt"` - GroupFace *int32 `protobuf:"15,opt"` - AddOption *int32 `protobuf:"16,opt"` - ShutupTime *int32 `protobuf:"17,opt"` - GroupTypeFlag *int32 `protobuf:"18,opt"` - StringGroupTag []byte `protobuf:"19,opt"` - MsgGroupGeoInfo *GroupGeoInfo `protobuf:"20,opt"` - GroupClassExt *int32 `protobuf:"21,opt"` - IngGroupClassText []byte `protobuf:"22,opt"` - AppPrivilegeFlag *int32 `protobuf:"23,opt"` - AppPrivilegeMask *int32 `protobuf:"24,opt"` - StGroupExInfo *GroupExInfoOnly `protobuf:"25,opt"` - GroupSecLevel *int32 `protobuf:"26,opt"` - GroupSecLevelInfo *int32 `protobuf:"27,opt"` - SubscriptionUin *int64 `protobuf:"28,opt"` - AllowMemberInvite *int32 `protobuf:"29,opt"` - IngGroupQuestion []byte `protobuf:"30,opt"` - IngGroupAnswer []byte `protobuf:"31,opt"` - GroupFlagext3 *int32 `protobuf:"32,opt"` - GroupFlagext3Mask *int32 `protobuf:"33,opt"` - GroupOpenAppid *int32 `protobuf:"34,opt"` - NoFingerOpenFlag *int32 `protobuf:"35,opt"` - NoCodeFingerOpenFlag *int32 `protobuf:"36,opt"` - RootId *int64 `protobuf:"37,opt"` - MsgLimitFrequency *int32 `protobuf:"38,opt"` - } - - GroupNewGuidelinesInfo struct { - BoolEnabled *bool `protobuf:"1,opt"` - IngContent []byte `protobuf:"2,opt"` - } - - GroupExInfoOnly struct { - TribeId *int32 `protobuf:"1,opt"` - MoneyForAddGroup *int32 `protobuf:"2,opt"` - } - - GroupGeoInfo struct { - CityId *int32 `protobuf:"1,opt"` - Longtitude *int64 `protobuf:"2,opt"` - Latitude *int64 `protobuf:"3,opt"` - IngGeoContent []byte `protobuf:"4,opt"` - PoiId *int64 `protobuf:"5,opt"` - } -) - -func (x *ReqBody) GetGroupCode() int64 { - if x != nil && x.GroupCode != nil { - return *x.GroupCode - } - return 0 -} - -func (x *ReqBody) GetOriginalOperatorUin() int64 { - if x != nil && x.OriginalOperatorUin != nil { - return *x.OriginalOperatorUin - } - return 0 -} - -func (x *ReqBody) GetReqGroupOpenAppid() int32 { - if x != nil && x.ReqGroupOpenAppid != nil { - return *x.ReqGroupOpenAppid - } - return 0 -} - -func (x *ReqBody) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *GroupInfo) GetGroupExtAdmNum() int32 { - if x != nil && x.GroupExtAdmNum != nil { - return *x.GroupExtAdmNum - } - return 0 -} - -func (x *GroupInfo) GetFlag() int32 { - if x != nil && x.Flag != nil { - return *x.Flag - } - return 0 -} - -func (x *GroupInfo) GetGroupGrade() int32 { - if x != nil && x.GroupGrade != nil { - return *x.GroupGrade - } - return 0 -} - -func (x *GroupInfo) GetActiveMemberNum() int32 { - if x != nil && x.ActiveMemberNum != nil { - return *x.ActiveMemberNum - } - return 0 -} - -func (x *GroupInfo) GetCertificationType() int32 { - if x != nil && x.CertificationType != nil { - return *x.CertificationType - } - return 0 -} - -func (x *GroupInfo) GetGroupFace() int32 { - if x != nil && x.GroupFace != nil { - return *x.GroupFace - } - return 0 -} - -func (x *GroupInfo) GetAddOption() int32 { - if x != nil && x.AddOption != nil { - return *x.AddOption - } - return 0 -} - -func (x *GroupInfo) GetShutupTime() int32 { - if x != nil && x.ShutupTime != nil { - return *x.ShutupTime - } - return 0 -} - -func (x *GroupInfo) GetGroupTypeFlag() int32 { - if x != nil && x.GroupTypeFlag != nil { - return *x.GroupTypeFlag - } - return 0 -} - -func (x *GroupInfo) GetGroupClassExt() int32 { - if x != nil && x.GroupClassExt != nil { - return *x.GroupClassExt - } - return 0 -} - -func (x *GroupInfo) GetAppPrivilegeFlag() int32 { - if x != nil && x.AppPrivilegeFlag != nil { - return *x.AppPrivilegeFlag - } - return 0 -} - -func (x *GroupInfo) GetAppPrivilegeMask() int32 { - if x != nil && x.AppPrivilegeMask != nil { - return *x.AppPrivilegeMask - } - return 0 -} - -func (x *GroupInfo) GetGroupSecLevel() int32 { - if x != nil && x.GroupSecLevel != nil { - return *x.GroupSecLevel - } - return 0 -} - -func (x *GroupInfo) GetGroupSecLevelInfo() int32 { - if x != nil && x.GroupSecLevelInfo != nil { - return *x.GroupSecLevelInfo - } - return 0 -} - -func (x *GroupInfo) GetSubscriptionUin() int64 { - if x != nil && x.SubscriptionUin != nil { - return *x.SubscriptionUin - } - return 0 -} - -func (x *GroupInfo) GetAllowMemberInvite() int32 { - if x != nil && x.AllowMemberInvite != nil { - return *x.AllowMemberInvite - } - return 0 -} - -func (x *GroupInfo) GetGroupFlagext3() int32 { - if x != nil && x.GroupFlagext3 != nil { - return *x.GroupFlagext3 - } - return 0 -} - -func (x *GroupInfo) GetGroupFlagext3Mask() int32 { - if x != nil && x.GroupFlagext3Mask != nil { - return *x.GroupFlagext3Mask - } - return 0 -} - -func (x *GroupInfo) GetGroupOpenAppid() int32 { - if x != nil && x.GroupOpenAppid != nil { - return *x.GroupOpenAppid - } - return 0 -} - -func (x *GroupInfo) GetNoFingerOpenFlag() int32 { - if x != nil && x.NoFingerOpenFlag != nil { - return *x.NoFingerOpenFlag - } - return 0 -} - -func (x *GroupInfo) GetNoCodeFingerOpenFlag() int32 { - if x != nil && x.NoCodeFingerOpenFlag != nil { - return *x.NoCodeFingerOpenFlag - } - return 0 -} - -func (x *GroupInfo) GetRootId() int64 { - if x != nil && x.RootId != nil { - return *x.RootId - } - return 0 -} - -func (x *GroupInfo) GetMsgLimitFrequency() int32 { - if x != nil && x.MsgLimitFrequency != nil { - return *x.MsgLimitFrequency - } - return 0 -} - -func (x *GroupInfo) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *GroupNewGuidelinesInfo) GetBoolEnabled() bool { - if x != nil && x.BoolEnabled != nil { - return *x.BoolEnabled - } - return false -} - -func (x *GroupNewGuidelinesInfo) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *GroupExInfoOnly) GetTribeId() int32 { - if x != nil && x.TribeId != nil { - return *x.TribeId - } - return 0 -} - -func (x *GroupExInfoOnly) GetMoneyForAddGroup() int32 { - if x != nil && x.MoneyForAddGroup != nil { - return *x.MoneyForAddGroup - } - return 0 -} - -func (x *GroupExInfoOnly) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *GroupGeoInfo) GetCityId() int32 { - if x != nil && x.CityId != nil { - return *x.CityId - } - return 0 -} - -func (x *GroupGeoInfo) GetLongtitude() int64 { - if x != nil && x.Longtitude != nil { - return *x.Longtitude - } - return 0 -} - -func (x *GroupGeoInfo) GetLatitude() int64 { - if x != nil && x.Latitude != nil { - return *x.Latitude - } - return 0 -} - -func (x *GroupGeoInfo) GetPoiId() int64 { - if x != nil && x.PoiId != nil { - return *x.PoiId - } - return 0 -} - -func (x *GroupGeoInfo) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} diff --git a/internal/protobuf/data/oidb/oidb0x8a0/0x8a0.pb.go b/internal/protobuf/data/oidb/oidb0x8a0/0x8a0.pb.go new file mode 100644 index 00000000..229957c9 --- /dev/null +++ b/internal/protobuf/data/oidb/oidb0x8a0/0x8a0.pb.go @@ -0,0 +1,118 @@ +// Code generated by yaprotoc. DO NOT EDIT. +// source: oidb\0x8a0.proto + +package oidb0x8a0 + +import ( + "github.com/pkg/errors" + "github.com/segmentio/encoding/proto" +) + +type KickMemberInfo struct { + Operate *uint32 `protobuf:"varint,1,opt"` + MemberUin *uint64 `protobuf:"varint,2,opt"` + Flag *uint32 `protobuf:"varint,3,opt"` + Msg []byte `protobuf:"bytes,4,opt"` +} + +func (x *KickMemberInfo) GetOperate() uint32 { + if x != nil && x.Operate != nil { + return *x.Operate + } + return 0 +} + +func (x *KickMemberInfo) GetMemberUin() uint64 { + if x != nil && x.MemberUin != nil { + return *x.MemberUin + } + return 0 +} + +func (x *KickMemberInfo) GetFlag() uint32 { + if x != nil && x.Flag != nil { + return *x.Flag + } + return 0 +} + +func (x *KickMemberInfo) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type KickResult struct { + Result *uint32 `protobuf:"varint,1,opt"` + MemberUin *uint64 `protobuf:"varint,2,opt"` +} + +func (x *KickResult) GetResult() uint32 { + if x != nil && x.Result != nil { + return *x.Result + } + return 0 +} + +func (x *KickResult) GetMemberUin() uint64 { + if x != nil && x.MemberUin != nil { + return *x.MemberUin + } + return 0 +} + +func (x *KickResult) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type ReqBody struct { + GroupCode *uint64 `protobuf:"varint,1,opt"` + MsgKickList []*KickMemberInfo `protobuf:"bytes,2,rep"` + KickList []uint64 `protobuf:"varint,3,rep"` + KickFlag *uint32 `protobuf:"varint,4,opt"` + KickMsg []byte `protobuf:"bytes,5,opt"` +} + +func (x *ReqBody) GetGroupCode() uint64 { + if x != nil && x.GroupCode != nil { + return *x.GroupCode + } + return 0 +} + +func (x *ReqBody) GetKickFlag() uint32 { + if x != nil && x.KickFlag != nil { + return *x.KickFlag + } + return 0 +} + +func (x *ReqBody) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type RspBody struct { + GroupCode *uint64 `protobuf:"varint,1,opt"` + KickResult []*KickResult `protobuf:"bytes,2,rep"` +} + +func (x *RspBody) GetGroupCode() uint64 { + if x != nil && x.GroupCode != nil { + return *x.GroupCode + } + return 0 +} + +func (x *RspBody) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} diff --git a/internal/protobuf/data/oidb/oidb0x8a0/oidb0x8a0.go b/internal/protobuf/data/oidb/oidb0x8a0/oidb0x8a0.go deleted file mode 100644 index 910947de..00000000 --- a/internal/protobuf/data/oidb/oidb0x8a0/oidb0x8a0.go +++ /dev/null @@ -1,120 +0,0 @@ -// Code generated by Proto2Go.Net. Only used for MiraiGo. DO NOT EDIT. -// Source: oidb0x8a0.proto - -package oidb0x8a0 - -import ( - "github.com/pkg/errors" - "go.dedis.ch/protobuf" -) - -type ( - RspBody struct { - OptUint64GroupCode *int64 `protobuf:"1,opt"` - MsgKickResult []*KickResult `protobuf:"2"` - } - - KickResult struct { - OptUint32Result *int32 `protobuf:"1,opt"` - OptUint64MemberUin *int64 `protobuf:"2,opt"` - } - - KickMemberInfo struct { - OptUint32Operate *int32 `protobuf:"1,opt"` - OptUint64MemberUin *int64 `protobuf:"2,opt"` - OptUint32Flag *int32 `protobuf:"3,opt"` - OptBytesMsg []byte `protobuf:"4,opt"` - } - - ReqBody struct { - OptUint64GroupCode *int64 `protobuf:"1,opt"` - MsgKickList []*KickMemberInfo `protobuf:"2"` - KickList []int64 `protobuf:"3"` - KickFlag *int32 `protobuf:"4,opt"` - KickMsg []byte `protobuf:"5,opt"` - } -) - -func (x *RspBody) GetOptUint64GroupCode() int64 { - if x != nil && x.OptUint64GroupCode != nil { - return *x.OptUint64GroupCode - } - return 0 -} - -func (x *RspBody) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *KickResult) GetOptUint32Result() int32 { - if x != nil && x.OptUint32Result != nil { - return *x.OptUint32Result - } - return 0 -} - -func (x *KickResult) GetOptUint64MemberUin() int64 { - if x != nil && x.OptUint64MemberUin != nil { - return *x.OptUint64MemberUin - } - return 0 -} - -func (x *KickResult) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *KickMemberInfo) GetOptUint32Operate() int32 { - if x != nil && x.OptUint32Operate != nil { - return *x.OptUint32Operate - } - return 0 -} - -func (x *KickMemberInfo) GetOptUint64MemberUin() int64 { - if x != nil && x.OptUint64MemberUin != nil { - return *x.OptUint64MemberUin - } - return 0 -} - -func (x *KickMemberInfo) GetOptUint32Flag() int32 { - if x != nil && x.OptUint32Flag != nil { - return *x.OptUint32Flag - } - return 0 -} - -func (x *KickMemberInfo) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *ReqBody) GetOptUint64GroupCode() int64 { - if x != nil && x.OptUint64GroupCode != nil { - return *x.OptUint64GroupCode - } - return 0 -} - -func (x *ReqBody) GetKickFlag() int32 { - if x != nil && x.KickFlag != nil { - return *x.KickFlag - } - return 0 -} - -func (x *ReqBody) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} diff --git a/internal/protobuf/data/oidb/oidb0x8a7/oidb0x8a7.go b/internal/protobuf/data/oidb/oidb0x8a7/0x8a7.pb.go similarity index 54% rename from internal/protobuf/data/oidb/oidb0x8a7/oidb0x8a7.go rename to internal/protobuf/data/oidb/oidb0x8a7/0x8a7.pb.go index 853c57af..8e23b439 100644 --- a/internal/protobuf/data/oidb/oidb0x8a7/oidb0x8a7.go +++ b/internal/protobuf/data/oidb/oidb0x8a7/0x8a7.pb.go @@ -1,30 +1,20 @@ -// Code generated by Proto2Go.Net. Only used for MiraiGo. DO NOT EDIT. -// Source: oidb0x8a7.proto +// Code generated by yaprotoc. DO NOT EDIT. +// source: oidb\0x8a7.proto package oidb0x8a7 import ( "github.com/pkg/errors" - "go.dedis.ch/protobuf" + "github.com/segmentio/encoding/proto" ) -type ( - ReqBody struct { - SubCmd *uint32 `protobuf:"1,opt"` - LimitIntervalTypeForUin *uint32 `protobuf:"2,opt"` - LimitIntervalTypeForGroup *uint32 `protobuf:"3,opt"` - Uin *uint64 `protobuf:"4,opt"` - GroupCode *uint64 `protobuf:"5,opt"` - } - - RspBody struct { - CanAtAll *bool `protobuf:"1,opt"` - RemainAtAllCountForUin *uint32 `protobuf:"2,opt"` - RemainAtAllCountForGroup *uint32 `protobuf:"3,opt"` - PromptMsg1 []byte `protobuf:"4,opt"` - PromptMsg2 []byte `protobuf:"5,opt"` - } -) +type ReqBody struct { + SubCmd *uint32 `protobuf:"varint,1,opt"` + LimitIntervalTypeForUin *uint32 `protobuf:"varint,2,opt"` + LimitIntervalTypeForGroup *uint32 `protobuf:"varint,3,opt"` + Uin *uint64 `protobuf:"varint,4,opt"` + GroupCode *uint64 `protobuf:"varint,5,opt"` +} func (x *ReqBody) GetSubCmd() uint32 { if x != nil && x.SubCmd != nil { @@ -63,9 +53,18 @@ func (x *ReqBody) GetGroupCode() uint64 { func (x *ReqBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type RspBody struct { + CanAtAll *bool `protobuf:"varint,1,opt"` + RemainAtAllCountForUin *uint32 `protobuf:"varint,2,opt"` + RemainAtAllCountForGroup *uint32 `protobuf:"varint,3,opt"` + PromptMsg1 []byte `protobuf:"bytes,4,opt"` + PromptMsg2 []byte `protobuf:"bytes,5,opt"` + ShowAtAllLable *bool `protobuf:"varint,6,opt"` } func (x *RspBody) GetCanAtAll() bool { @@ -89,9 +88,16 @@ func (x *RspBody) GetRemainAtAllCountForGroup() uint32 { return 0 } +func (x *RspBody) GetShowAtAllLable() bool { + if x != nil && x.ShowAtAllLable != nil { + return *x.ShowAtAllLable + } + return false +} + func (x *RspBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) } diff --git a/internal/protobuf/data/oidb/oidb0x8fc/0x8fc.pb.go b/internal/protobuf/data/oidb/oidb0x8fc/0x8fc.pb.go new file mode 100644 index 00000000..affca829 --- /dev/null +++ b/internal/protobuf/data/oidb/oidb0x8fc/0x8fc.pb.go @@ -0,0 +1,301 @@ +// Code generated by yaprotoc. DO NOT EDIT. +// source: oidb\0x8fc.proto + +package oidb0x8fc + +import ( + "github.com/pkg/errors" + "github.com/segmentio/encoding/proto" +) + +type CardNameElem struct { + EnumCardType *uint32 `protobuf:"varint,1,opt"` + Value []byte `protobuf:"bytes,2,opt"` +} + +func (x *CardNameElem) GetEnumCardType() uint32 { + if x != nil && x.EnumCardType != nil { + return *x.EnumCardType + } + return 0 +} + +func (x *CardNameElem) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type ClientInfo struct { + Implat *uint32 `protobuf:"varint,1,opt"` + Clientver *string `protobuf:"bytes,2,opt"` +} + +func (x *ClientInfo) GetImplat() uint32 { + if x != nil && x.Implat != nil { + return *x.Implat + } + return 0 +} + +func (x *ClientInfo) GetClientver() string { + if x != nil && x.Clientver != nil { + return *x.Clientver + } + return "" +} + +func (x *ClientInfo) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type CommCardNameBuf struct { + RichCardName []*RichCardNameElem `protobuf:"bytes,1,rep"` + CoolId *uint32 `protobuf:"varint,2,opt"` +} + +func (x *CommCardNameBuf) GetCoolId() uint32 { + if x != nil && x.CoolId != nil { + return *x.CoolId + } + return 0 +} + +func (x *CommCardNameBuf) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type LevelName struct { + Level *uint32 `protobuf:"varint,1,opt"` + Name *string `protobuf:"bytes,2,opt"` +} + +func (x *LevelName) GetLevel() uint32 { + if x != nil && x.Level != nil { + return *x.Level + } + return 0 +} + +func (x *LevelName) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *LevelName) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type MemberInfo struct { + Uin *uint64 `protobuf:"varint,1,opt"` + Point *uint32 `protobuf:"varint,2,opt"` + ActiveDay *uint32 `protobuf:"varint,3,opt"` + Level *uint32 `protobuf:"varint,4,opt"` + SpecialTitle []byte `protobuf:"bytes,5,opt"` + SpecialTitleExpireTime *int32 `protobuf:"varint,6,opt"` + UinName []byte `protobuf:"bytes,7,opt"` + MemberCardName []byte `protobuf:"bytes,8,opt"` + Phone []byte `protobuf:"bytes,9,opt"` + Email []byte `protobuf:"bytes,10,opt"` + Remark []byte `protobuf:"bytes,11,opt"` + Gender *uint32 `protobuf:"varint,12,opt"` + Job []byte `protobuf:"bytes,13,opt"` + TribeLevel *uint32 `protobuf:"varint,14,opt"` + TribePoint *uint32 `protobuf:"varint,15,opt"` + RichCardName []*CardNameElem `protobuf:"bytes,16,rep"` + CommRichCardName []byte `protobuf:"bytes,17,opt"` + RingtoneId *uint32 `protobuf:"varint,18,opt"` + GroupHonor []byte `protobuf:"bytes,19,opt"` + CmduinFlagEx3Grocery *uint32 `protobuf:"varint,20,opt"` + CmduinFlagEx3Mask *uint32 `protobuf:"varint,21,opt"` +} + +func (x *MemberInfo) GetUin() uint64 { + if x != nil && x.Uin != nil { + return *x.Uin + } + return 0 +} + +func (x *MemberInfo) GetPoint() uint32 { + if x != nil && x.Point != nil { + return *x.Point + } + return 0 +} + +func (x *MemberInfo) GetActiveDay() uint32 { + if x != nil && x.ActiveDay != nil { + return *x.ActiveDay + } + return 0 +} + +func (x *MemberInfo) GetLevel() uint32 { + if x != nil && x.Level != nil { + return *x.Level + } + return 0 +} + +func (x *MemberInfo) GetSpecialTitleExpireTime() int32 { + if x != nil && x.SpecialTitleExpireTime != nil { + return *x.SpecialTitleExpireTime + } + return 0 +} + +func (x *MemberInfo) GetGender() uint32 { + if x != nil && x.Gender != nil { + return *x.Gender + } + return 0 +} + +func (x *MemberInfo) GetTribeLevel() uint32 { + if x != nil && x.TribeLevel != nil { + return *x.TribeLevel + } + return 0 +} + +func (x *MemberInfo) GetTribePoint() uint32 { + if x != nil && x.TribePoint != nil { + return *x.TribePoint + } + return 0 +} + +func (x *MemberInfo) GetRingtoneId() uint32 { + if x != nil && x.RingtoneId != nil { + return *x.RingtoneId + } + return 0 +} + +func (x *MemberInfo) GetCmduinFlagEx3Grocery() uint32 { + if x != nil && x.CmduinFlagEx3Grocery != nil { + return *x.CmduinFlagEx3Grocery + } + return 0 +} + +func (x *MemberInfo) GetCmduinFlagEx3Mask() uint32 { + if x != nil && x.CmduinFlagEx3Mask != nil { + return *x.CmduinFlagEx3Mask + } + return 0 +} + +func (x *MemberInfo) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type ReqBody struct { + GroupCode *uint64 `protobuf:"varint,1,opt"` + ShowFlag *uint32 `protobuf:"varint,2,opt"` + MemLevelInfo []*MemberInfo `protobuf:"bytes,3,rep"` + LevelName []*LevelName `protobuf:"bytes,4,rep"` + UpdateTime *uint32 `protobuf:"varint,5,opt"` + OfficeMode *uint32 `protobuf:"varint,6,opt"` + GroupOpenAppid *uint32 `protobuf:"varint,7,opt"` + ClientInfo *ClientInfo `protobuf:"bytes,8,opt"` + AuthKey []byte `protobuf:"bytes,9,opt"` + LevelNameNew []*LevelName `protobuf:"bytes,10,rep"` +} + +func (x *ReqBody) GetGroupCode() uint64 { + if x != nil && x.GroupCode != nil { + return *x.GroupCode + } + return 0 +} + +func (x *ReqBody) GetShowFlag() uint32 { + if x != nil && x.ShowFlag != nil { + return *x.ShowFlag + } + return 0 +} + +func (x *ReqBody) GetUpdateTime() uint32 { + if x != nil && x.UpdateTime != nil { + return *x.UpdateTime + } + return 0 +} + +func (x *ReqBody) GetOfficeMode() uint32 { + if x != nil && x.OfficeMode != nil { + return *x.OfficeMode + } + return 0 +} + +func (x *ReqBody) GetGroupOpenAppid() uint32 { + if x != nil && x.GroupOpenAppid != nil { + return *x.GroupOpenAppid + } + return 0 +} + +func (x *ReqBody) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type RichCardNameElem struct { + Ctrl []byte `protobuf:"bytes,1,opt"` + Text []byte `protobuf:"bytes,2,opt"` +} + +func (x *RichCardNameElem) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type RspBody struct { + GroupCode *uint64 `protobuf:"varint,1,opt"` + ErrInfo *string `protobuf:"bytes,2,opt"` + CoolGroupCardRsp []byte `protobuf:"bytes,3,opt"` +} + +func (x *RspBody) GetGroupCode() uint64 { + if x != nil && x.GroupCode != nil { + return *x.GroupCode + } + return 0 +} + +func (x *RspBody) GetErrInfo() string { + if x != nil && x.ErrInfo != nil { + return *x.ErrInfo + } + return "" +} + +func (x *RspBody) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} diff --git a/internal/protobuf/data/oidb/oidb0x8fc/oidb0x8fc.go b/internal/protobuf/data/oidb/oidb0x8fc/oidb0x8fc.go deleted file mode 100644 index 2dad3677..00000000 --- a/internal/protobuf/data/oidb/oidb0x8fc/oidb0x8fc.go +++ /dev/null @@ -1,242 +0,0 @@ -// Code generated by Proto2Go.Net. Only used for MiraiGo. DO NOT EDIT. -// Source: oidb0x8fc.proto - -package oidb0x8fc - -import ( - "github.com/pkg/errors" - "go.dedis.ch/protobuf" -) - -type ( - ReqBody struct { - GroupCode *int64 `protobuf:"1,opt"` - ShowFlag *int32 `protobuf:"2,opt"` - MemLevelInfo []*MemberInfo `protobuf:"3"` - LevelName []*LevelName `protobuf:"4"` - UpdateTime *int32 `protobuf:"5,opt"` - OfficeMode *int32 `protobuf:"6,opt"` - GroupOpenAppid *int32 `protobuf:"7,opt"` - MsgClientInfo *ClientInfo `protobuf:"8,opt"` - AuthKey []byte `protobuf:"9,opt"` - } - - MemberInfo struct { - Uin *int64 `protobuf:"1,opt"` - Point *int32 `protobuf:"2,opt"` - ActiveDay *int32 `protobuf:"3,opt"` - Level *int32 `protobuf:"4,opt"` - SpecialTitle []byte `protobuf:"5,opt"` - SpecialTitleExpireTime *int32 `protobuf:"6,opt"` - UinName []byte `protobuf:"7,opt"` - MemberCardName []byte `protobuf:"8,opt"` - Phone []byte `protobuf:"9,opt"` - Email []byte `protobuf:"10,opt"` - Remark []byte `protobuf:"11,opt"` - Gender *int32 `protobuf:"12,opt"` - Job []byte `protobuf:"13,opt"` - TribeLevel *int32 `protobuf:"14,opt"` - TribePoint *int32 `protobuf:"15,opt"` - RichCardName []*CardNameElem `protobuf:"16"` - CommRichCardName []byte `protobuf:"17,opt"` - } - - CardNameElem struct { - EnumCardType *int32 `protobuf:"1,opt"` - Value []byte `protobuf:"2,opt"` - } - - LevelName struct { - Level *int32 `protobuf:"1,opt"` - Name *string `protobuf:"2,opt"` - } - - ClientInfo struct { - Implat *int32 `protobuf:"1,opt"` - IngClientver *string `protobuf:"2,opt"` - } - - CommCardNameBuf struct { - RichCardName []*RichCardNameElem `protobuf:"1"` - } - - RichCardNameElem struct { - Ctrl []byte `protobuf:"1,opt"` - Text []byte `protobuf:"2,opt"` - } -) - -func (x *ReqBody) GetGroupCode() int64 { - if x != nil && x.GroupCode != nil { - return *x.GroupCode - } - return 0 -} - -func (x *ReqBody) GetShowFlag() int32 { - if x != nil && x.ShowFlag != nil { - return *x.ShowFlag - } - return 0 -} - -func (x *ReqBody) GetUpdateTime() int32 { - if x != nil && x.UpdateTime != nil { - return *x.UpdateTime - } - return 0 -} - -func (x *ReqBody) GetOfficeMode() int32 { - if x != nil && x.OfficeMode != nil { - return *x.OfficeMode - } - return 0 -} - -func (x *ReqBody) GetGroupOpenAppid() int32 { - if x != nil && x.GroupOpenAppid != nil { - return *x.GroupOpenAppid - } - return 0 -} - -func (x *ReqBody) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *MemberInfo) GetUin() int64 { - if x != nil && x.Uin != nil { - return *x.Uin - } - return 0 -} - -func (x *MemberInfo) GetPoint() int32 { - if x != nil && x.Point != nil { - return *x.Point - } - return 0 -} - -func (x *MemberInfo) GetActiveDay() int32 { - if x != nil && x.ActiveDay != nil { - return *x.ActiveDay - } - return 0 -} - -func (x *MemberInfo) GetLevel() int32 { - if x != nil && x.Level != nil { - return *x.Level - } - return 0 -} - -func (x *MemberInfo) GetSpecialTitleExpireTime() int32 { - if x != nil && x.SpecialTitleExpireTime != nil { - return *x.SpecialTitleExpireTime - } - return 0 -} - -func (x *MemberInfo) GetGender() int32 { - if x != nil && x.Gender != nil { - return *x.Gender - } - return 0 -} - -func (x *MemberInfo) GetTribeLevel() int32 { - if x != nil && x.TribeLevel != nil { - return *x.TribeLevel - } - return 0 -} - -func (x *MemberInfo) GetTribePoint() int32 { - if x != nil && x.TribePoint != nil { - return *x.TribePoint - } - return 0 -} - -func (x *MemberInfo) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *CardNameElem) GetEnumCardType() int32 { - if x != nil && x.EnumCardType != nil { - return *x.EnumCardType - } - return 0 -} - -func (x *CardNameElem) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *LevelName) GetLevel() int32 { - if x != nil && x.Level != nil { - return *x.Level - } - return 0 -} - -func (x *LevelName) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -func (x *LevelName) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *ClientInfo) GetImplat() int32 { - if x != nil && x.Implat != nil { - return *x.Implat - } - return 0 -} - -func (x *ClientInfo) GetIngClientver() string { - if x != nil && x.IngClientver != nil { - return *x.IngClientver - } - return "" -} - -func (x *ClientInfo) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *CommCardNameBuf) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *RichCardNameElem) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} diff --git a/internal/protobuf/data/oidb/oidb0x990/oidb0x990.go b/internal/protobuf/data/oidb/oidb0x990/0x990.pb.go similarity index 51% rename from internal/protobuf/data/oidb/oidb0x990/oidb0x990.go rename to internal/protobuf/data/oidb/oidb0x990/0x990.pb.go index a2c2cb15..3daf7ad2 100644 --- a/internal/protobuf/data/oidb/oidb0x990/oidb0x990.go +++ b/internal/protobuf/data/oidb/oidb0x990/0x990.pb.go @@ -1,53 +1,18 @@ -// Code generated by Proto2Go.Net. Only used for MiraiGo. DO NOT EDIT. -// Source: oidb0x990.proto +// Code generated by yaprotoc. DO NOT EDIT. +// source: oidb\0x990.proto package oidb0x990 import ( "github.com/pkg/errors" - "go.dedis.ch/protobuf" + "github.com/segmentio/encoding/proto" ) -type ( - BatchTranslateReq struct { - SrcLanguage *string `protobuf:"1,opt"` - DstLanguage *string `protobuf:"2,opt"` - SrcBytesTextList [][]byte `protobuf:"3"` - } - - BatchTranslateRsp struct { - ErrorCode *int32 `protobuf:"1,opt"` - ErrorMsg []byte `protobuf:"2,opt"` - SrcLanguage *string `protobuf:"3,opt"` - DstLanguage *string `protobuf:"4,opt"` - SrcBytesTextList [][]byte `protobuf:"5"` - DstBytesTextList [][]byte `protobuf:"6"` - } - - ReqBody struct { - TranslateReq *TranslateReq `protobuf:"1,opt"` - BatchTranslateReq *BatchTranslateReq `protobuf:"2,opt"` - } - - RspBody struct { - TranslateRsp *TranslateRsp `protobuf:"1,opt"` - BatchTranslateRsp *BatchTranslateRsp `protobuf:"2,opt"` - } - - TranslateReq struct { - Text []byte `protobuf:"1,opt"` - Type *int32 `protobuf:"2,opt"` - SrcLanguage *string `protobuf:"3,opt"` - DstLanguage *string `protobuf:"4,opt"` - } - - TranslateRsp struct { - RetCode *int32 `protobuf:"1,opt"` - Type *int32 `protobuf:"2,opt"` - TransResult []byte `protobuf:"3,opt"` - TextLen *int32 `protobuf:"4,opt"` - } -) +type BatchTranslateReq struct { + SrcLanguage *string `protobuf:"bytes,1,opt"` + DstLanguage *string `protobuf:"bytes,2,opt"` + SrcBytesTextList [][]byte `protobuf:"bytes,3,rep"` +} func (x *BatchTranslateReq) GetSrcLanguage() string { if x != nil && x.SrcLanguage != nil { @@ -65,9 +30,18 @@ func (x *BatchTranslateReq) GetDstLanguage() string { func (x *BatchTranslateReq) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type BatchTranslateRsp struct { + ErrorCode *int32 `protobuf:"varint,1,opt"` + ErrorMsg []byte `protobuf:"bytes,2,opt"` + SrcLanguage *string `protobuf:"bytes,3,opt"` + DstLanguage *string `protobuf:"bytes,4,opt"` + SrcBytesTextList [][]byte `protobuf:"bytes,5,rep"` + DstBytesTextList [][]byte `protobuf:"bytes,6,rep"` } func (x *BatchTranslateRsp) GetErrorCode() int32 { @@ -93,23 +67,40 @@ func (x *BatchTranslateRsp) GetDstLanguage() string { func (x *BatchTranslateRsp) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type ReqBody struct { + TranslateReq *TranslateReq `protobuf:"bytes,1,opt"` + BatchTranslateReq *BatchTranslateReq `protobuf:"bytes,2,opt"` } func (x *ReqBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type RspBody struct { + TranslateRsp *TranslateRsp `protobuf:"bytes,1,opt"` + BatchTranslateRsp *BatchTranslateRsp `protobuf:"bytes,2,opt"` } func (x *RspBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type TranslateReq struct { + Text []byte `protobuf:"bytes,1,opt"` + Type *int32 `protobuf:"varint,2,opt"` + SrcLanguage *string `protobuf:"bytes,3,opt"` + DstLanguage *string `protobuf:"bytes,4,opt"` } func (x *TranslateReq) GetType() int32 { @@ -135,9 +126,16 @@ func (x *TranslateReq) GetDstLanguage() string { func (x *TranslateReq) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type TranslateRsp struct { + RetCode *int32 `protobuf:"varint,1,opt"` + Type *int32 `protobuf:"varint,2,opt"` + TransResult []byte `protobuf:"bytes,3,opt"` + TextLen *int32 `protobuf:"varint,4,opt"` } func (x *TranslateRsp) GetRetCode() int32 { @@ -163,7 +161,7 @@ func (x *TranslateRsp) GetTextLen() int32 { func (x *TranslateRsp) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) } diff --git a/internal/protobuf/data/oidb/oidb0xb77/0xb77.pb.go b/internal/protobuf/data/oidb/oidb0xb77/0xb77.pb.go new file mode 100644 index 00000000..18837cd4 --- /dev/null +++ b/internal/protobuf/data/oidb/oidb0xb77/0xb77.pb.go @@ -0,0 +1,766 @@ +// Code generated by yaprotoc. DO NOT EDIT. +// source: oidb\0xb77.proto + +package oidb0xb77 + +import ( + "github.com/pkg/errors" + "github.com/segmentio/encoding/proto" +) + +type ArkJsonBody struct { + JsonStr *string `protobuf:"bytes,10,opt"` +} + +func (x *ArkJsonBody) GetJsonStr() string { + if x != nil && x.JsonStr != nil { + return *x.JsonStr + } + return "" +} + +func (x *ArkJsonBody) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type ArkMsgBody struct { + App *string `protobuf:"bytes,1,opt"` + View *string `protobuf:"bytes,2,opt"` + Prompt *string `protobuf:"bytes,3,opt"` + Ver *string `protobuf:"bytes,4,opt"` + Desc *string `protobuf:"bytes,5,opt"` + FeatureId *uint32 `protobuf:"varint,6,opt"` + Meta *string `protobuf:"bytes,10,opt"` + MetaUrl1 *string `protobuf:"bytes,11,opt"` + MetaUrl2 *string `protobuf:"bytes,12,opt"` + MetaUrl3 *string `protobuf:"bytes,13,opt"` + MetaText1 *string `protobuf:"bytes,14,opt"` + MetaText2 *string `protobuf:"bytes,15,opt"` + MetaText3 *string `protobuf:"bytes,16,opt"` + Config *string `protobuf:"bytes,20,opt"` +} + +func (x *ArkMsgBody) GetApp() string { + if x != nil && x.App != nil { + return *x.App + } + return "" +} + +func (x *ArkMsgBody) GetView() string { + if x != nil && x.View != nil { + return *x.View + } + return "" +} + +func (x *ArkMsgBody) GetPrompt() string { + if x != nil && x.Prompt != nil { + return *x.Prompt + } + return "" +} + +func (x *ArkMsgBody) GetVer() string { + if x != nil && x.Ver != nil { + return *x.Ver + } + return "" +} + +func (x *ArkMsgBody) GetDesc() string { + if x != nil && x.Desc != nil { + return *x.Desc + } + return "" +} + +func (x *ArkMsgBody) GetFeatureId() uint32 { + if x != nil && x.FeatureId != nil { + return *x.FeatureId + } + return 0 +} + +func (x *ArkMsgBody) GetMeta() string { + if x != nil && x.Meta != nil { + return *x.Meta + } + return "" +} + +func (x *ArkMsgBody) GetMetaUrl1() string { + if x != nil && x.MetaUrl1 != nil { + return *x.MetaUrl1 + } + return "" +} + +func (x *ArkMsgBody) GetMetaUrl2() string { + if x != nil && x.MetaUrl2 != nil { + return *x.MetaUrl2 + } + return "" +} + +func (x *ArkMsgBody) GetMetaUrl3() string { + if x != nil && x.MetaUrl3 != nil { + return *x.MetaUrl3 + } + return "" +} + +func (x *ArkMsgBody) GetMetaText1() string { + if x != nil && x.MetaText1 != nil { + return *x.MetaText1 + } + return "" +} + +func (x *ArkMsgBody) GetMetaText2() string { + if x != nil && x.MetaText2 != nil { + return *x.MetaText2 + } + return "" +} + +func (x *ArkMsgBody) GetMetaText3() string { + if x != nil && x.MetaText3 != nil { + return *x.MetaText3 + } + return "" +} + +func (x *ArkMsgBody) GetConfig() string { + if x != nil && x.Config != nil { + return *x.Config + } + return "" +} + +func (x *ArkMsgBody) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type ArkV1MsgBody struct { + App *string `protobuf:"bytes,1,opt"` + View *string `protobuf:"bytes,2,opt"` + Prompt *string `protobuf:"bytes,3,opt"` + Ver *string `protobuf:"bytes,4,opt"` + Desc *string `protobuf:"bytes,5,opt"` + FeatureId *uint32 `protobuf:"varint,6,opt"` + Meta *string `protobuf:"bytes,10,opt"` + Items []*TemplateItem `protobuf:"bytes,11,rep"` + Config *string `protobuf:"bytes,20,opt"` +} + +func (x *ArkV1MsgBody) GetApp() string { + if x != nil && x.App != nil { + return *x.App + } + return "" +} + +func (x *ArkV1MsgBody) GetView() string { + if x != nil && x.View != nil { + return *x.View + } + return "" +} + +func (x *ArkV1MsgBody) GetPrompt() string { + if x != nil && x.Prompt != nil { + return *x.Prompt + } + return "" +} + +func (x *ArkV1MsgBody) GetVer() string { + if x != nil && x.Ver != nil { + return *x.Ver + } + return "" +} + +func (x *ArkV1MsgBody) GetDesc() string { + if x != nil && x.Desc != nil { + return *x.Desc + } + return "" +} + +func (x *ArkV1MsgBody) GetFeatureId() uint32 { + if x != nil && x.FeatureId != nil { + return *x.FeatureId + } + return 0 +} + +func (x *ArkV1MsgBody) GetMeta() string { + if x != nil && x.Meta != nil { + return *x.Meta + } + return "" +} + +func (x *ArkV1MsgBody) GetConfig() string { + if x != nil && x.Config != nil { + return *x.Config + } + return "" +} + +func (x *ArkV1MsgBody) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type ClientInfo struct { + Platform *uint32 `protobuf:"varint,1,opt"` + SdkVersion *string `protobuf:"bytes,2,opt"` + AndroidPackageName *string `protobuf:"bytes,3,opt"` + AndroidSignature *string `protobuf:"bytes,4,opt"` + IosBundleId *string `protobuf:"bytes,5,opt"` + PcSign *string `protobuf:"bytes,6,opt"` +} + +func (x *ClientInfo) GetPlatform() uint32 { + if x != nil && x.Platform != nil { + return *x.Platform + } + return 0 +} + +func (x *ClientInfo) GetSdkVersion() string { + if x != nil && x.SdkVersion != nil { + return *x.SdkVersion + } + return "" +} + +func (x *ClientInfo) GetAndroidPackageName() string { + if x != nil && x.AndroidPackageName != nil { + return *x.AndroidPackageName + } + return "" +} + +func (x *ClientInfo) GetAndroidSignature() string { + if x != nil && x.AndroidSignature != nil { + return *x.AndroidSignature + } + return "" +} + +func (x *ClientInfo) GetIosBundleId() string { + if x != nil && x.IosBundleId != nil { + return *x.IosBundleId + } + return "" +} + +func (x *ClientInfo) GetPcSign() string { + if x != nil && x.PcSign != nil { + return *x.PcSign + } + return "" +} + +func (x *ClientInfo) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type ExtInfo struct { + CustomFeatureid []uint32 `protobuf:"varint,11,rep"` + ApnsWording *string `protobuf:"bytes,12,opt"` + GroupSavedbFlag *uint32 `protobuf:"varint,13,opt"` + ReceiverAppid *uint32 `protobuf:"varint,14,opt"` + Seq *uint64 `protobuf:"varint,15,opt"` + TagName []byte `protobuf:"bytes,17,opt"` + MessageExt []byte `protobuf:"bytes,18,opt"` +} + +func (x *ExtInfo) GetApnsWording() string { + if x != nil && x.ApnsWording != nil { + return *x.ApnsWording + } + return "" +} + +func (x *ExtInfo) GetGroupSavedbFlag() uint32 { + if x != nil && x.GroupSavedbFlag != nil { + return *x.GroupSavedbFlag + } + return 0 +} + +func (x *ExtInfo) GetReceiverAppid() uint32 { + if x != nil && x.ReceiverAppid != nil { + return *x.ReceiverAppid + } + return 0 +} + +func (x *ExtInfo) GetSeq() uint64 { + if x != nil && x.Seq != nil { + return *x.Seq + } + return 0 +} + +func (x *ExtInfo) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type ImageInfo struct { + Md5 *string `protobuf:"bytes,1,opt"` + Uuid *string `protobuf:"bytes,2,opt"` + ImgType *uint32 `protobuf:"varint,3,opt"` + FileSize *uint32 `protobuf:"varint,4,opt"` + Width *uint32 `protobuf:"varint,5,opt"` + Height *uint32 `protobuf:"varint,6,opt"` + Original *uint32 `protobuf:"varint,7,opt"` + FileId *uint32 `protobuf:"varint,101,opt"` + ServerIp *uint32 `protobuf:"varint,102,opt"` + ServerPort *uint32 `protobuf:"varint,103,opt"` +} + +func (x *ImageInfo) GetMd5() string { + if x != nil && x.Md5 != nil { + return *x.Md5 + } + return "" +} + +func (x *ImageInfo) GetUuid() string { + if x != nil && x.Uuid != nil { + return *x.Uuid + } + return "" +} + +func (x *ImageInfo) GetImgType() uint32 { + if x != nil && x.ImgType != nil { + return *x.ImgType + } + return 0 +} + +func (x *ImageInfo) GetFileSize() uint32 { + if x != nil && x.FileSize != nil { + return *x.FileSize + } + return 0 +} + +func (x *ImageInfo) GetWidth() uint32 { + if x != nil && x.Width != nil { + return *x.Width + } + return 0 +} + +func (x *ImageInfo) GetHeight() uint32 { + if x != nil && x.Height != nil { + return *x.Height + } + return 0 +} + +func (x *ImageInfo) GetOriginal() uint32 { + if x != nil && x.Original != nil { + return *x.Original + } + return 0 +} + +func (x *ImageInfo) GetFileId() uint32 { + if x != nil && x.FileId != nil { + return *x.FileId + } + return 0 +} + +func (x *ImageInfo) GetServerIp() uint32 { + if x != nil && x.ServerIp != nil { + return *x.ServerIp + } + return 0 +} + +func (x *ImageInfo) GetServerPort() uint32 { + if x != nil && x.ServerPort != nil { + return *x.ServerPort + } + return 0 +} + +func (x *ImageInfo) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type MiniAppMsgBody struct { + MiniAppAppid *uint64 `protobuf:"varint,1,opt"` + MiniAppPath *string `protobuf:"bytes,2,opt"` + WebPageUrl *string `protobuf:"bytes,3,opt"` + MiniAppType *uint32 `protobuf:"varint,4,opt"` + Title *string `protobuf:"bytes,5,opt"` + Desc *string `protobuf:"bytes,6,opt"` + JsonStr *string `protobuf:"bytes,10,opt"` +} + +func (x *MiniAppMsgBody) GetMiniAppAppid() uint64 { + if x != nil && x.MiniAppAppid != nil { + return *x.MiniAppAppid + } + return 0 +} + +func (x *MiniAppMsgBody) GetMiniAppPath() string { + if x != nil && x.MiniAppPath != nil { + return *x.MiniAppPath + } + return "" +} + +func (x *MiniAppMsgBody) GetWebPageUrl() string { + if x != nil && x.WebPageUrl != nil { + return *x.WebPageUrl + } + return "" +} + +func (x *MiniAppMsgBody) GetMiniAppType() uint32 { + if x != nil && x.MiniAppType != nil { + return *x.MiniAppType + } + return 0 +} + +func (x *MiniAppMsgBody) GetTitle() string { + if x != nil && x.Title != nil { + return *x.Title + } + return "" +} + +func (x *MiniAppMsgBody) GetDesc() string { + if x != nil && x.Desc != nil { + return *x.Desc + } + return "" +} + +func (x *MiniAppMsgBody) GetJsonStr() string { + if x != nil && x.JsonStr != nil { + return *x.JsonStr + } + return "" +} + +func (x *MiniAppMsgBody) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type ReqBody struct { + AppId *uint64 `protobuf:"varint,1,opt"` + AppType *uint32 `protobuf:"varint,2,opt"` + Style *uint32 `protobuf:"varint,3,opt"` + SenderUin *uint64 `protobuf:"varint,4,opt"` + ClientInfo *ClientInfo `protobuf:"bytes,5,opt"` + TextMsg *string `protobuf:"bytes,6,opt"` + ExtInfo *ExtInfo `protobuf:"bytes,7,opt"` + SendType *uint32 `protobuf:"varint,10,opt"` + RecvUin *uint64 `protobuf:"varint,11,opt"` + RichMsgBody *RichMsgBody `protobuf:"bytes,12,opt"` + ArkMsgBody *ArkMsgBody `protobuf:"bytes,13,opt"` + RecvOpenid *string `protobuf:"bytes,14,opt"` + Arkv1MsgBody *ArkV1MsgBody `protobuf:"bytes,15,opt"` + ArkJsonBody *ArkJsonBody `protobuf:"bytes,16,opt"` + XmlMsgBody *XmlMsgBody `protobuf:"bytes,17,opt"` + MiniAppMsgBody *MiniAppMsgBody `protobuf:"bytes,18,opt"` + RecvGuildId *uint64 `protobuf:"varint,19,opt"` +} + +func (x *ReqBody) GetAppId() uint64 { + if x != nil && x.AppId != nil { + return *x.AppId + } + return 0 +} + +func (x *ReqBody) GetAppType() uint32 { + if x != nil && x.AppType != nil { + return *x.AppType + } + return 0 +} + +func (x *ReqBody) GetStyle() uint32 { + if x != nil && x.Style != nil { + return *x.Style + } + return 0 +} + +func (x *ReqBody) GetSenderUin() uint64 { + if x != nil && x.SenderUin != nil { + return *x.SenderUin + } + return 0 +} + +func (x *ReqBody) GetTextMsg() string { + if x != nil && x.TextMsg != nil { + return *x.TextMsg + } + return "" +} + +func (x *ReqBody) GetSendType() uint32 { + if x != nil && x.SendType != nil { + return *x.SendType + } + return 0 +} + +func (x *ReqBody) GetRecvUin() uint64 { + if x != nil && x.RecvUin != nil { + return *x.RecvUin + } + return 0 +} + +func (x *ReqBody) GetRecvOpenid() string { + if x != nil && x.RecvOpenid != nil { + return *x.RecvOpenid + } + return "" +} + +func (x *ReqBody) GetRecvGuildId() uint64 { + if x != nil && x.RecvGuildId != nil { + return *x.RecvGuildId + } + return 0 +} + +func (x *ReqBody) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type RichMsgBody struct { + UsingArk *bool `protobuf:"varint,1,opt"` + Title *string `protobuf:"bytes,10,opt"` + Summary *string `protobuf:"bytes,11,opt"` + Brief *string `protobuf:"bytes,12,opt"` + Url *string `protobuf:"bytes,13,opt"` + PictureUrl *string `protobuf:"bytes,14,opt"` + Action *string `protobuf:"bytes,15,opt"` + MusicUrl *string `protobuf:"bytes,16,opt"` + ImageInfo *ImageInfo `protobuf:"bytes,21,opt"` +} + +func (x *RichMsgBody) GetUsingArk() bool { + if x != nil && x.UsingArk != nil { + return *x.UsingArk + } + return false +} + +func (x *RichMsgBody) GetTitle() string { + if x != nil && x.Title != nil { + return *x.Title + } + return "" +} + +func (x *RichMsgBody) GetSummary() string { + if x != nil && x.Summary != nil { + return *x.Summary + } + return "" +} + +func (x *RichMsgBody) GetBrief() string { + if x != nil && x.Brief != nil { + return *x.Brief + } + return "" +} + +func (x *RichMsgBody) GetUrl() string { + if x != nil && x.Url != nil { + return *x.Url + } + return "" +} + +func (x *RichMsgBody) GetPictureUrl() string { + if x != nil && x.PictureUrl != nil { + return *x.PictureUrl + } + return "" +} + +func (x *RichMsgBody) GetAction() string { + if x != nil && x.Action != nil { + return *x.Action + } + return "" +} + +func (x *RichMsgBody) GetMusicUrl() string { + if x != nil && x.MusicUrl != nil { + return *x.MusicUrl + } + return "" +} + +func (x *RichMsgBody) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type RspBody struct { + Wording *string `protobuf:"bytes,1,opt"` + JumpResult *uint32 `protobuf:"varint,2,opt"` + JumpUrl *string `protobuf:"bytes,3,opt"` + Level *uint32 `protobuf:"varint,4,opt"` + SubLevel *uint32 `protobuf:"varint,5,opt"` + DevelopMsg *string `protobuf:"bytes,6,opt"` +} + +func (x *RspBody) GetWording() string { + if x != nil && x.Wording != nil { + return *x.Wording + } + return "" +} + +func (x *RspBody) GetJumpResult() uint32 { + if x != nil && x.JumpResult != nil { + return *x.JumpResult + } + return 0 +} + +func (x *RspBody) GetJumpUrl() string { + if x != nil && x.JumpUrl != nil { + return *x.JumpUrl + } + return "" +} + +func (x *RspBody) GetLevel() uint32 { + if x != nil && x.Level != nil { + return *x.Level + } + return 0 +} + +func (x *RspBody) GetSubLevel() uint32 { + if x != nil && x.SubLevel != nil { + return *x.SubLevel + } + return 0 +} + +func (x *RspBody) GetDevelopMsg() string { + if x != nil && x.DevelopMsg != nil { + return *x.DevelopMsg + } + return "" +} + +func (x *RspBody) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type TemplateItem struct { + Key *string `protobuf:"bytes,1,opt"` + Type *uint32 `protobuf:"varint,2,opt"` + Value *string `protobuf:"bytes,3,opt"` +} + +func (x *TemplateItem) GetKey() string { + if x != nil && x.Key != nil { + return *x.Key + } + return "" +} + +func (x *TemplateItem) GetType() uint32 { + if x != nil && x.Type != nil { + return *x.Type + } + return 0 +} + +func (x *TemplateItem) GetValue() string { + if x != nil && x.Value != nil { + return *x.Value + } + return "" +} + +func (x *TemplateItem) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type XmlMsgBody struct { + ServiceId *uint32 `protobuf:"varint,11,opt"` + Xml *string `protobuf:"bytes,12,opt"` +} + +func (x *XmlMsgBody) GetServiceId() uint32 { + if x != nil && x.ServiceId != nil { + return *x.ServiceId + } + return 0 +} + +func (x *XmlMsgBody) GetXml() string { + if x != nil && x.Xml != nil { + return *x.Xml + } + return "" +} + +func (x *XmlMsgBody) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} diff --git a/internal/protobuf/data/oidb/oidb0xb77/oidb0xb77.go b/internal/protobuf/data/oidb/oidb0xb77/oidb0xb77.go deleted file mode 100644 index d6b6f8c0..00000000 --- a/internal/protobuf/data/oidb/oidb0xb77/oidb0xb77.go +++ /dev/null @@ -1,247 +0,0 @@ -// Code generated by Proto2Go.Net. Only used for MiraiGo. DO NOT EDIT. -// Source: oidb0xb77.proto - -package oidb0xb77 - -import ( - "github.com/pkg/errors" - "go.dedis.ch/protobuf" -) - -type ( - ReqBody struct { - AppId *uint64 `protobuf:"1,opt"` - AppType *uint32 `protobuf:"2,opt"` - MsgStyle *uint32 `protobuf:"3,opt"` - SenderUin *uint64 `protobuf:"4,opt"` - ClientInfo *ClientInfo `protobuf:"5,opt"` - TextMsg *string `protobuf:"6,opt"` - ExtInfo *ExtInfo `protobuf:"7,opt"` - SendType *uint32 `protobuf:"10,opt"` - RecvUin *uint64 `protobuf:"11,opt"` - RichMsgBody *RichMsgBody `protobuf:"12,opt"` - } - - ClientInfo struct { - Platform *uint32 `protobuf:"1,opt"` - SdkVersion *string `protobuf:"2,opt"` - AndroidPackageName *string `protobuf:"3,opt"` - AndroidSignature *string `protobuf:"4,opt"` - IosBundleId *string `protobuf:"5,opt"` - PcSign *string `protobuf:"6,opt"` - } - - ExtInfo struct { - CustomFeatureId []uint32 `protobuf:"11"` - ApnsWording *string `protobuf:"12,opt"` - GroupSaveDbFlag *uint32 `protobuf:"13,opt"` - ReceiverAppId *uint32 `protobuf:"14,opt"` - MsgSeq *uint64 `protobuf:"15,opt"` - } - - RichMsgBody struct { - Title *string `protobuf:"10,opt"` - Summary *string `protobuf:"11,opt"` - Brief *string `protobuf:"12,opt"` - Url *string `protobuf:"13,opt"` - PictureUrl *string `protobuf:"14,opt"` - Action *string `protobuf:"15,opt"` - MusicUrl *string `protobuf:"16,opt"` - } -) - -func (x *ReqBody) GetAppId() uint64 { - if x != nil && x.AppId != nil { - return *x.AppId - } - return 0 -} - -func (x *ReqBody) GetAppType() uint32 { - if x != nil && x.AppType != nil { - return *x.AppType - } - return 0 -} - -func (x *ReqBody) GetMsgStyle() uint32 { - if x != nil && x.MsgStyle != nil { - return *x.MsgStyle - } - return 0 -} - -func (x *ReqBody) GetSenderUin() uint64 { - if x != nil && x.SenderUin != nil { - return *x.SenderUin - } - return 0 -} - -func (x *ReqBody) GetTextMsg() string { - if x != nil && x.TextMsg != nil { - return *x.TextMsg - } - return "" -} - -func (x *ReqBody) GetSendType() uint32 { - if x != nil && x.SendType != nil { - return *x.SendType - } - return 0 -} - -func (x *ReqBody) GetRecvUin() uint64 { - if x != nil && x.RecvUin != nil { - return *x.RecvUin - } - return 0 -} - -func (x *ReqBody) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *ClientInfo) GetPlatform() uint32 { - if x != nil && x.Platform != nil { - return *x.Platform - } - return 0 -} - -func (x *ClientInfo) GetSdkVersion() string { - if x != nil && x.SdkVersion != nil { - return *x.SdkVersion - } - return "" -} - -func (x *ClientInfo) GetAndroidPackageName() string { - if x != nil && x.AndroidPackageName != nil { - return *x.AndroidPackageName - } - return "" -} - -func (x *ClientInfo) GetAndroidSignature() string { - if x != nil && x.AndroidSignature != nil { - return *x.AndroidSignature - } - return "" -} - -func (x *ClientInfo) GetIosBundleId() string { - if x != nil && x.IosBundleId != nil { - return *x.IosBundleId - } - return "" -} - -func (x *ClientInfo) GetPcSign() string { - if x != nil && x.PcSign != nil { - return *x.PcSign - } - return "" -} - -func (x *ClientInfo) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *ExtInfo) GetApnsWording() string { - if x != nil && x.ApnsWording != nil { - return *x.ApnsWording - } - return "" -} - -func (x *ExtInfo) GetGroupSaveDbFlag() uint32 { - if x != nil && x.GroupSaveDbFlag != nil { - return *x.GroupSaveDbFlag - } - return 0 -} - -func (x *ExtInfo) GetReceiverAppId() uint32 { - if x != nil && x.ReceiverAppId != nil { - return *x.ReceiverAppId - } - return 0 -} - -func (x *ExtInfo) GetMsgSeq() uint64 { - if x != nil && x.MsgSeq != nil { - return *x.MsgSeq - } - return 0 -} - -func (x *ExtInfo) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *RichMsgBody) GetTitle() string { - if x != nil && x.Title != nil { - return *x.Title - } - return "" -} - -func (x *RichMsgBody) GetSummary() string { - if x != nil && x.Summary != nil { - return *x.Summary - } - return "" -} - -func (x *RichMsgBody) GetBrief() string { - if x != nil && x.Brief != nil { - return *x.Brief - } - return "" -} - -func (x *RichMsgBody) GetUrl() string { - if x != nil && x.Url != nil { - return *x.Url - } - return "" -} - -func (x *RichMsgBody) GetPictureUrl() string { - if x != nil && x.PictureUrl != nil { - return *x.PictureUrl - } - return "" -} - -func (x *RichMsgBody) GetAction() string { - if x != nil && x.Action != nil { - return *x.Action - } - return "" -} - -func (x *RichMsgBody) GetMusicUrl() string { - if x != nil && x.MusicUrl != nil { - return *x.MusicUrl - } - return "" -} - -func (x *RichMsgBody) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} diff --git a/internal/protobuf/data/oidb/oidb0xbcb/oidb0xbcb.go b/internal/protobuf/data/oidb/oidb0xbcb/0xbcb.pb.go similarity index 64% rename from internal/protobuf/data/oidb/oidb0xbcb/oidb0xbcb.go rename to internal/protobuf/data/oidb/oidb0xbcb/0xbcb.pb.go index bf4d0918..9df8ee00 100644 --- a/internal/protobuf/data/oidb/oidb0xbcb/oidb0xbcb.go +++ b/internal/protobuf/data/oidb/oidb0xbcb/0xbcb.pb.go @@ -1,74 +1,32 @@ -// Code generated by Proto2Go.Net. Only used for MiraiGo. DO NOT EDIT. -// Source: oidb0xbcb.proto +// Code generated by yaprotoc. DO NOT EDIT. +// source: oidb\0xbcb.proto package oidb0xbcb import ( "github.com/pkg/errors" - "go.dedis.ch/protobuf" + "github.com/segmentio/encoding/proto" ) -type ( - CheckUrlReq struct { - Url []string `protobuf:"1"` - Refer *string `protobuf:"2,opt"` - Plateform *string `protobuf:"3,opt"` - QqPfTo *string `protobuf:"4,opt"` - Type *uint32 `protobuf:"5,opt"` - From *uint32 `protobuf:"6,opt"` - Chatid *uint64 `protobuf:"7,opt"` - ServiceType *uint64 `protobuf:"8,opt"` - SendUin *uint64 `protobuf:"9,opt"` - ReqType *string `protobuf:"10,opt"` - OriginalUrl *string `protobuf:"11,opt"` - IsArk *bool `protobuf:"12,opt"` - ArkName *string `protobuf:"13,opt"` - IsFinish *bool `protobuf:"14,opt"` - SrcUrls []string `protobuf:"15"` - SrcPlatform *uint32 `protobuf:"16,opt"` - Qua *string `protobuf:"17,opt"` - } - - CheckUrlReqItem struct { - Url *string `protobuf:"1,opt"` - Refer *string `protobuf:"2,opt"` - Plateform *string `protobuf:"3,opt"` - QqPfTo *string `protobuf:"4,opt"` - Type *uint32 `protobuf:"5,opt"` - From *uint32 `protobuf:"6,opt"` - Chatid *uint64 `protobuf:"7,opt"` - ServiceType *uint64 `protobuf:"8,opt"` - SendUin *uint64 `protobuf:"9,opt"` - ReqType *string `protobuf:"10,opt"` - } - - CheckUrlRsp struct { - Results []*UrlCheckResult `protobuf:"1"` - NextReqDuration *uint32 `protobuf:"2,opt"` - } - - ReqBody struct { - NotUseCache *int32 `protobuf:"9,opt"` - CheckUrlReq *CheckUrlReq `protobuf:"10,opt"` - } - - RspBody struct { - Wording *string `protobuf:"1,opt"` - CheckUrlRsp *CheckUrlRsp `protobuf:"10,opt"` - } - - UrlCheckResult struct { - Url *string `protobuf:"1,opt"` - Result *uint32 `protobuf:"2,opt"` - JumpResult *uint32 `protobuf:"3,opt"` - JumpUrl *string `protobuf:"4,opt"` - Level *uint32 `protobuf:"5,opt"` - SubLevel *uint32 `protobuf:"6,opt"` - Umrtype *uint32 `protobuf:"7,opt"` - RetFrom *uint32 `protobuf:"8,opt"` - OperationBit *uint64 `protobuf:"9,opt"` - } -) +type CheckUrlReq struct { + Url []string `protobuf:"bytes,1,rep"` + Refer *string `protobuf:"bytes,2,opt"` + Plateform *string `protobuf:"bytes,3,opt"` + QqPfTo *string `protobuf:"bytes,4,opt"` + Type *uint32 `protobuf:"varint,5,opt"` + From *uint32 `protobuf:"varint,6,opt"` + Chatid *uint64 `protobuf:"varint,7,opt"` + ServiceType *uint64 `protobuf:"varint,8,opt"` + SendUin *uint64 `protobuf:"varint,9,opt"` + ReqType *string `protobuf:"bytes,10,opt"` + OriginalUrl *string `protobuf:"bytes,11,opt"` + IsArk *bool `protobuf:"varint,12,opt"` + ArkName *string `protobuf:"bytes,13,opt"` + IsFinish *bool `protobuf:"varint,14,opt"` + SrcUrls []string `protobuf:"bytes,15,rep"` + SrcPlatform *uint32 `protobuf:"varint,16,opt"` + Qua *string `protobuf:"bytes,17,opt"` +} func (x *CheckUrlReq) GetRefer() string { if x != nil && x.Refer != nil { @@ -177,9 +135,22 @@ func (x *CheckUrlReq) GetQua() string { func (x *CheckUrlReq) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type CheckUrlReqItem struct { + Url *string `protobuf:"bytes,1,opt"` + Refer *string `protobuf:"bytes,2,opt"` + Plateform *string `protobuf:"bytes,3,opt"` + QqPfTo *string `protobuf:"bytes,4,opt"` + Type *uint32 `protobuf:"varint,5,opt"` + From *uint32 `protobuf:"varint,6,opt"` + Chatid *uint64 `protobuf:"varint,7,opt"` + ServiceType *uint64 `protobuf:"varint,8,opt"` + SendUin *uint64 `protobuf:"varint,9,opt"` + ReqType *string `protobuf:"bytes,10,opt"` } func (x *CheckUrlReqItem) GetUrl() string { @@ -254,9 +225,14 @@ func (x *CheckUrlReqItem) GetReqType() string { func (x *CheckUrlReqItem) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type CheckUrlRsp struct { + Results []*UrlCheckResult `protobuf:"bytes,1,rep"` + NextReqDuration *uint32 `protobuf:"varint,2,opt"` } func (x *CheckUrlRsp) GetNextReqDuration() uint32 { @@ -268,9 +244,14 @@ func (x *CheckUrlRsp) GetNextReqDuration() uint32 { func (x *CheckUrlRsp) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type ReqBody struct { + NotUseCache *int32 `protobuf:"varint,9,opt"` + CheckUrlReq *CheckUrlReq `protobuf:"bytes,10,opt"` } func (x *ReqBody) GetNotUseCache() int32 { @@ -282,9 +263,14 @@ func (x *ReqBody) GetNotUseCache() int32 { func (x *ReqBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type RspBody struct { + Wording *string `protobuf:"bytes,1,opt"` + CheckUrlRsp *CheckUrlRsp `protobuf:"bytes,10,opt"` } func (x *RspBody) GetWording() string { @@ -296,9 +282,21 @@ func (x *RspBody) GetWording() string { func (x *RspBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type UrlCheckResult struct { + Url *string `protobuf:"bytes,1,opt"` + Result *uint32 `protobuf:"varint,2,opt"` + JumpResult *uint32 `protobuf:"varint,3,opt"` + JumpUrl *string `protobuf:"bytes,4,opt"` + Level *uint32 `protobuf:"varint,5,opt"` + SubLevel *uint32 `protobuf:"varint,6,opt"` + Umrtype *uint32 `protobuf:"varint,7,opt"` + RetFrom *uint32 `protobuf:"varint,8,opt"` + OperationBit *uint64 `protobuf:"varint,9,opt"` } func (x *UrlCheckResult) GetUrl() string { @@ -366,7 +364,7 @@ func (x *UrlCheckResult) GetOperationBit() uint64 { func (x *UrlCheckResult) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) } diff --git a/internal/protobuf/data/oidb/oidb0xd79/oidb0xd79.go b/internal/protobuf/data/oidb/oidb0xd79/0xd79.pb.go similarity index 52% rename from internal/protobuf/data/oidb/oidb0xd79/oidb0xd79.go rename to internal/protobuf/data/oidb/oidb0xd79/0xd79.pb.go index 4a59e0ca..14d6e5ae 100644 --- a/internal/protobuf/data/oidb/oidb0xd79/oidb0xd79.go +++ b/internal/protobuf/data/oidb/oidb0xd79/0xd79.pb.go @@ -1,36 +1,33 @@ -// Code generated by Proto2Go.Net. Only used for MiraiGo. DO NOT EDIT. -// Source: oidb0xd79.proto +// Code generated by yaprotoc. DO NOT EDIT. +// source: oidb\0xd79.proto package oidb0xd79 import ( "github.com/pkg/errors" - "go.dedis.ch/protobuf" + "github.com/segmentio/encoding/proto" ) -type ( - ReqBody struct { - Seq *uint64 `protobuf:"1,opt"` - Uin *uint64 `protobuf:"2,opt"` - CompressFlag *uint32 `protobuf:"3,opt"` - Content []byte `protobuf:"4,opt"` - SenderUin *uint64 `protobuf:"5,opt"` - Qua []byte `protobuf:"6,opt"` - WordExt []byte `protobuf:"7,opt"` - } +type Content struct { + SliceContent [][]byte `protobuf:"bytes,1,rep"` +} - RspBody struct { - Ret *uint32 `protobuf:"1,opt"` - Seq *uint64 `protobuf:"2,opt"` - Uin *uint64 `protobuf:"3,opt"` - CompressFlag *uint32 `protobuf:"4,opt"` - Content *Content `protobuf:"5,opt"` +func (x *Content) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") } + return proto.Marshal(x) +} - Content struct { - SliceContent [][]byte `protobuf:"1"` - } -) +type ReqBody struct { + Seq *uint64 `protobuf:"varint,1,opt"` + Uin *uint64 `protobuf:"varint,2,opt"` + CompressFlag *uint32 `protobuf:"varint,3,opt"` + Content []byte `protobuf:"bytes,4,opt"` + SenderUin *uint64 `protobuf:"varint,5,opt"` + Qua []byte `protobuf:"bytes,6,opt"` + WordExt []byte `protobuf:"bytes,7,opt"` +} func (x *ReqBody) GetSeq() uint64 { if x != nil && x.Seq != nil { @@ -62,9 +59,17 @@ func (x *ReqBody) GetSenderUin() uint64 { func (x *ReqBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type RspBody struct { + Ret *uint32 `protobuf:"varint,1,opt"` + Seq *uint64 `protobuf:"varint,2,opt"` + Uin *uint64 `protobuf:"varint,3,opt"` + CompressFlag *uint32 `protobuf:"varint,4,opt"` + Content *Content `protobuf:"bytes,5,opt"` } func (x *RspBody) GetRet() uint32 { @@ -97,14 +102,7 @@ func (x *RspBody) GetCompressFlag() uint32 { func (x *RspBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) -} - -func (x *Content) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) + return proto.Marshal(x) } diff --git a/internal/protobuf/data/oidb/oidb0xdad/0xdad.pb.go b/internal/protobuf/data/oidb/oidb0xdad/0xdad.pb.go new file mode 100644 index 00000000..55d9b9e1 --- /dev/null +++ b/internal/protobuf/data/oidb/oidb0xdad/0xdad.pb.go @@ -0,0 +1,129 @@ +// Code generated by yaprotoc. DO NOT EDIT. +// source: oidb\0xdad.proto + +package oidb0xdad + +import ( + "github.com/pkg/errors" + "github.com/segmentio/encoding/proto" +) + +type LoginSig struct { + Type *uint32 `protobuf:"varint,1,opt"` + Sig []byte `protobuf:"bytes,2,opt"` + Appid *uint32 `protobuf:"varint,3,opt"` +} + +func (x *LoginSig) GetType() uint32 { + if x != nil && x.Type != nil { + return *x.Type + } + return 0 +} + +func (x *LoginSig) GetAppid() uint32 { + if x != nil && x.Appid != nil { + return *x.Appid + } + return 0 +} + +func (x *LoginSig) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type ReqBody struct { + Client *int64 `protobuf:"varint,1,opt"` + ProductId *int64 `protobuf:"varint,2,opt"` + Amount *int64 `protobuf:"varint,3,opt"` + ToUin *uint64 `protobuf:"varint,4,opt"` + Gc *uint64 `protobuf:"varint,5,opt"` + Ip *string `protobuf:"bytes,6,opt"` + Vsersion *string `protobuf:"bytes,7,opt"` + Sig *LoginSig `protobuf:"bytes,8,opt"` +} + +func (x *ReqBody) GetClient() int64 { + if x != nil && x.Client != nil { + return *x.Client + } + return 0 +} + +func (x *ReqBody) GetProductId() int64 { + if x != nil && x.ProductId != nil { + return *x.ProductId + } + return 0 +} + +func (x *ReqBody) GetAmount() int64 { + if x != nil && x.Amount != nil { + return *x.Amount + } + return 0 +} + +func (x *ReqBody) GetToUin() uint64 { + if x != nil && x.ToUin != nil { + return *x.ToUin + } + return 0 +} + +func (x *ReqBody) GetGc() uint64 { + if x != nil && x.Gc != nil { + return *x.Gc + } + return 0 +} + +func (x *ReqBody) GetIp() string { + if x != nil && x.Ip != nil { + return *x.Ip + } + return "" +} + +func (x *ReqBody) GetVsersion() string { + if x != nil && x.Vsersion != nil { + return *x.Vsersion + } + return "" +} + +func (x *ReqBody) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type RspBody struct { + Retcode *int64 `protobuf:"varint,1,opt"` + Errmsg *string `protobuf:"bytes,2,opt"` +} + +func (x *RspBody) GetRetcode() int64 { + if x != nil && x.Retcode != nil { + return *x.Retcode + } + return 0 +} + +func (x *RspBody) GetErrmsg() string { + if x != nil && x.Errmsg != nil { + return *x.Errmsg + } + return "" +} + +func (x *RspBody) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} diff --git a/internal/protobuf/data/oidb/oidb0xdad/oidb0xdad.go b/internal/protobuf/data/oidb/oidb0xdad/oidb0xdad.go deleted file mode 100644 index 6bf3bb64..00000000 --- a/internal/protobuf/data/oidb/oidb0xdad/oidb0xdad.go +++ /dev/null @@ -1,105 +0,0 @@ -// Code generated by Proto2Go.Net. Only used for MiraiGo. DO NOT EDIT. -// Source: oidb0xdad.proto - -package oidb0xdad - -import ( - "github.com/pkg/errors" - "go.dedis.ch/protobuf" -) - -type ( - ReqBody struct { - Client *int64 `protobuf:"1,opt"` - ProductId *uint64 `protobuf:"2,opt"` - Amount *int64 `protobuf:"3,opt"` - ToUin *uint64 `protobuf:"4,opt"` - Gc *uint64 `protobuf:"5,opt"` - Ip *string `protobuf:"6,opt"` - Version *string `protobuf:"7,opt"` - Sig *LoginSig `protobuf:"8,opt"` - } - - LoginSig struct { - Type *uint32 `protobuf:"1,opt"` - Sig []byte `protobuf:"2,opt"` - Appid *uint32 `protobuf:"3,opt"` - } -) - -func (x *ReqBody) GetClient() int64 { - if x != nil && x.Client != nil { - return *x.Client - } - return 0 -} - -func (x *ReqBody) GetProductId() uint64 { - if x != nil && x.ProductId != nil { - return *x.ProductId - } - return 0 -} - -func (x *ReqBody) GetAmount() int64 { - if x != nil && x.Amount != nil { - return *x.Amount - } - return 0 -} - -func (x *ReqBody) GetToUin() uint64 { - if x != nil && x.ToUin != nil { - return *x.ToUin - } - return 0 -} - -func (x *ReqBody) GetGc() uint64 { - if x != nil && x.Gc != nil { - return *x.Gc - } - return 0 -} - -func (x *ReqBody) GetIp() string { - if x != nil && x.Ip != nil { - return *x.Ip - } - return "" -} - -func (x *ReqBody) GetVersion() string { - if x != nil && x.Version != nil { - return *x.Version - } - return "" -} - -func (x *ReqBody) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *LoginSig) GetType() uint32 { - if x != nil && x.Type != nil { - return *x.Type - } - return 0 -} - -func (x *LoginSig) GetAppid() uint32 { - if x != nil && x.Appid != nil { - return *x.Appid - } - return 0 -} - -func (x *LoginSig) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} diff --git a/internal/protobuf/data/oidb/oidb0xe07/oidb0xe07.go b/internal/protobuf/data/oidb/oidb0xe07/0xe07.pb.go similarity index 58% rename from internal/protobuf/data/oidb/oidb0xe07/oidb0xe07.go rename to internal/protobuf/data/oidb/oidb0xe07/0xe07.pb.go index eb3d8a68..f9022729 100644 --- a/internal/protobuf/data/oidb/oidb0xe07/oidb0xe07.go +++ b/internal/protobuf/data/oidb/oidb0xe07/0xe07.pb.go @@ -1,72 +1,17 @@ -// Code generated by Proto2Go.Net. Only used for MiraiGo. DO NOT EDIT. -// Source: oidb0xe07.proto +// Code generated by yaprotoc. DO NOT EDIT. +// source: oidb\0xe07.proto package oidb0xe07 import ( "github.com/pkg/errors" - "go.dedis.ch/protobuf" + "github.com/segmentio/encoding/proto" ) -type ( - Coordinate struct { - X *int32 `protobuf:"1,opt"` - Y *int32 `protobuf:"2,opt"` - } - - Language struct { - Language *string `protobuf:"1,opt"` - LanguageDesc *string `protobuf:"2,opt"` - } - - OCRReqBody struct { - ImageUrl *string `protobuf:"1,opt"` - LanguageType *string `protobuf:"2,opt"` - Scene *string `protobuf:"3,opt"` - OriginMd5 *string `protobuf:"10,opt"` - AfterCompressMd5 *string `protobuf:"11,opt"` - AfterCompressFileSize *uint32 `protobuf:"12,opt"` - AfterCompressWeight *uint32 `protobuf:"13,opt"` - AfterCompressHeight *uint32 `protobuf:"14,opt"` - IsCut *bool `protobuf:"15,opt"` - } - - OCRRspBody struct { - TextDetections []*TextDetection `protobuf:"1"` - Language *string `protobuf:"2,opt"` - RequestId *string `protobuf:"3,opt"` - OcrLanguageList []string `protobuf:"101"` - DstTranslateLanguageList []string `protobuf:"102"` - LanguageList []*Language `protobuf:"103"` - AfterCompressWeight *uint32 `protobuf:"111,opt"` - AfterCompressHeight *uint32 `protobuf:"112,opt"` - } - - Polygon struct { - Coordinates []*Coordinate `protobuf:"1"` - } - - ReqBody struct { - Version *uint32 `protobuf:"1,opt"` - Client *uint32 `protobuf:"2,opt"` - Entrance *uint32 `protobuf:"3,opt"` - OcrReqBody *OCRReqBody `protobuf:"10,opt"` - } - - RspBody struct { - RetCode *int32 `protobuf:"1,opt"` - ErrMsg *string `protobuf:"2,opt"` - Wording *string `protobuf:"3,opt"` - OcrRspBody *OCRRspBody `protobuf:"10,opt"` - } - - TextDetection struct { - DetectedText *string `protobuf:"1,opt"` - Confidence *uint32 `protobuf:"2,opt"` - Polygon *Polygon `protobuf:"3,opt"` - AdvancedInfo *string `protobuf:"4,opt"` - } -) +type Coordinate struct { + X *int32 `protobuf:"varint,1,opt"` + Y *int32 `protobuf:"varint,2,opt"` +} func (x *Coordinate) GetX() int32 { if x != nil && x.X != nil { @@ -84,9 +29,14 @@ func (x *Coordinate) GetY() int32 { func (x *Coordinate) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type Language struct { + Language *string `protobuf:"bytes,1,opt"` + LanguageDesc *string `protobuf:"bytes,2,opt"` } func (x *Language) GetLanguage() string { @@ -105,9 +55,21 @@ func (x *Language) GetLanguageDesc() string { func (x *Language) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type OCRReqBody struct { + ImageUrl *string `protobuf:"bytes,1,opt"` + LanguageType *string `protobuf:"bytes,2,opt"` + Scene *string `protobuf:"bytes,3,opt"` + OriginMd5 *string `protobuf:"bytes,10,opt"` + AfterCompressMd5 *string `protobuf:"bytes,11,opt"` + AfterCompressFileSize *uint32 `protobuf:"varint,12,opt"` + AfterCompressWeight *uint32 `protobuf:"varint,13,opt"` + AfterCompressHeight *uint32 `protobuf:"varint,14,opt"` + IsCut *bool `protobuf:"varint,15,opt"` } func (x *OCRReqBody) GetImageUrl() string { @@ -175,9 +137,20 @@ func (x *OCRReqBody) GetIsCut() bool { func (x *OCRReqBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type OCRRspBody struct { + TextDetections []*TextDetection `protobuf:"bytes,1,rep"` + Language *string `protobuf:"bytes,2,opt"` + RequestId *string `protobuf:"bytes,3,opt"` + OcrLanguageList []string `protobuf:"bytes,101,rep"` + DstTranslateLanguageList []string `protobuf:"bytes,102,rep"` + LanguageList []*Language `protobuf:"bytes,103,rep"` + AfterCompressWeight *uint32 `protobuf:"varint,111,opt"` + AfterCompressHeight *uint32 `protobuf:"varint,112,opt"` } func (x *OCRRspBody) GetLanguage() string { @@ -210,16 +183,27 @@ func (x *OCRRspBody) GetAfterCompressHeight() uint32 { func (x *OCRRspBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type Polygon struct { + Coordinates []*Coordinate `protobuf:"bytes,1,rep"` } func (x *Polygon) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type ReqBody struct { + Version *uint32 `protobuf:"varint,1,opt"` + Client *uint32 `protobuf:"varint,2,opt"` + Entrance *uint32 `protobuf:"varint,3,opt"` + OcrReqBody *OCRReqBody `protobuf:"bytes,10,opt"` } func (x *ReqBody) GetVersion() uint32 { @@ -245,9 +229,16 @@ func (x *ReqBody) GetEntrance() uint32 { func (x *ReqBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type RspBody struct { + RetCode *int32 `protobuf:"varint,1,opt"` + ErrMsg *string `protobuf:"bytes,2,opt"` + Wording *string `protobuf:"bytes,3,opt"` + OcrRspBody *OCRRspBody `protobuf:"bytes,10,opt"` } func (x *RspBody) GetRetCode() int32 { @@ -273,9 +264,16 @@ func (x *RspBody) GetWording() string { func (x *RspBody) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) +} + +type TextDetection struct { + DetectedText *string `protobuf:"bytes,1,opt"` + Confidence *uint32 `protobuf:"varint,2,opt"` + Polygon *Polygon `protobuf:"bytes,3,opt"` + AdvancedInfo *string `protobuf:"bytes,4,opt"` } func (x *TextDetection) GetDetectedText() string { @@ -301,7 +299,7 @@ func (x *TextDetection) GetAdvancedInfo() string { func (x *TextDetection) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) } diff --git a/internal/protobuf/data/oidb/oidb0xeac/0xeac.pb.go b/internal/protobuf/data/oidb/oidb0xeac/0xeac.pb.go new file mode 100644 index 00000000..9f5cc82f --- /dev/null +++ b/internal/protobuf/data/oidb/oidb0xeac/0xeac.pb.go @@ -0,0 +1,688 @@ +// Code generated by yaprotoc. DO NOT EDIT. +// source: oidb\0xeac.proto + +package oidb0xeac + +import ( + "github.com/pkg/errors" + "github.com/segmentio/encoding/proto" +) + +type ArkMsg struct { + AppName *string `protobuf:"bytes,1,opt"` + Json *string `protobuf:"bytes,2,opt"` +} + +func (x *ArkMsg) GetAppName() string { + if x != nil && x.AppName != nil { + return *x.AppName + } + return "" +} + +func (x *ArkMsg) GetJson() string { + if x != nil && x.Json != nil { + return *x.Json + } + return "" +} + +func (x *ArkMsg) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type BatchReqBody struct { + GroupCode *uint64 `protobuf:"varint,1,opt"` + Msgs []*MsgInfo `protobuf:"bytes,2,rep"` +} + +func (x *BatchReqBody) GetGroupCode() uint64 { + if x != nil && x.GroupCode != nil { + return *x.GroupCode + } + return 0 +} + +func (x *BatchReqBody) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type BatchRspBody struct { + Wording *string `protobuf:"bytes,1,opt"` + ErrorCode *uint32 `protobuf:"varint,2,opt"` + SuccCnt *int32 `protobuf:"varint,3,opt"` + ProcInfos []*MsgProcessInfo `protobuf:"bytes,4,rep"` + DigestTime *uint32 `protobuf:"varint,5,opt"` +} + +func (x *BatchRspBody) GetWording() string { + if x != nil && x.Wording != nil { + return *x.Wording + } + return "" +} + +func (x *BatchRspBody) GetErrorCode() uint32 { + if x != nil && x.ErrorCode != nil { + return *x.ErrorCode + } + return 0 +} + +func (x *BatchRspBody) GetSuccCnt() int32 { + if x != nil && x.SuccCnt != nil { + return *x.SuccCnt + } + return 0 +} + +func (x *BatchRspBody) GetDigestTime() uint32 { + if x != nil && x.DigestTime != nil { + return *x.DigestTime + } + return 0 +} + +func (x *BatchRspBody) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type DigestMsg struct { + GroupCode *uint64 `protobuf:"varint,1,opt"` + Seq *uint32 `protobuf:"varint,2,opt"` + Random *uint32 `protobuf:"varint,3,opt"` + Content []*MsgElem `protobuf:"bytes,4,rep"` + TextSize *uint64 `protobuf:"varint,5,opt"` + PicSize *uint64 `protobuf:"varint,6,opt"` + VideoSize *uint64 `protobuf:"varint,7,opt"` + SenderUin *uint64 `protobuf:"varint,8,opt"` + SenderTime *uint32 `protobuf:"varint,9,opt"` + AddDigestUin *uint64 `protobuf:"varint,10,opt"` + AddDigestTime *uint32 `protobuf:"varint,11,opt"` + StartTime *uint32 `protobuf:"varint,12,opt"` + LatestMsgSeq *uint32 `protobuf:"varint,13,opt"` + OpType *uint32 `protobuf:"varint,14,opt"` +} + +func (x *DigestMsg) GetGroupCode() uint64 { + if x != nil && x.GroupCode != nil { + return *x.GroupCode + } + return 0 +} + +func (x *DigestMsg) GetSeq() uint32 { + if x != nil && x.Seq != nil { + return *x.Seq + } + return 0 +} + +func (x *DigestMsg) GetRandom() uint32 { + if x != nil && x.Random != nil { + return *x.Random + } + return 0 +} + +func (x *DigestMsg) GetTextSize() uint64 { + if x != nil && x.TextSize != nil { + return *x.TextSize + } + return 0 +} + +func (x *DigestMsg) GetPicSize() uint64 { + if x != nil && x.PicSize != nil { + return *x.PicSize + } + return 0 +} + +func (x *DigestMsg) GetVideoSize() uint64 { + if x != nil && x.VideoSize != nil { + return *x.VideoSize + } + return 0 +} + +func (x *DigestMsg) GetSenderUin() uint64 { + if x != nil && x.SenderUin != nil { + return *x.SenderUin + } + return 0 +} + +func (x *DigestMsg) GetSenderTime() uint32 { + if x != nil && x.SenderTime != nil { + return *x.SenderTime + } + return 0 +} + +func (x *DigestMsg) GetAddDigestUin() uint64 { + if x != nil && x.AddDigestUin != nil { + return *x.AddDigestUin + } + return 0 +} + +func (x *DigestMsg) GetAddDigestTime() uint32 { + if x != nil && x.AddDigestTime != nil { + return *x.AddDigestTime + } + return 0 +} + +func (x *DigestMsg) GetStartTime() uint32 { + if x != nil && x.StartTime != nil { + return *x.StartTime + } + return 0 +} + +func (x *DigestMsg) GetLatestMsgSeq() uint32 { + if x != nil && x.LatestMsgSeq != nil { + return *x.LatestMsgSeq + } + return 0 +} + +func (x *DigestMsg) GetOpType() uint32 { + if x != nil && x.OpType != nil { + return *x.OpType + } + return 0 +} + +func (x *DigestMsg) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type FaceMsg struct { + Index *uint32 `protobuf:"varint,1,opt"` + Text *string `protobuf:"bytes,2,opt"` +} + +func (x *FaceMsg) GetIndex() uint32 { + if x != nil && x.Index != nil { + return *x.Index + } + return 0 +} + +func (x *FaceMsg) GetText() string { + if x != nil && x.Text != nil { + return *x.Text + } + return "" +} + +func (x *FaceMsg) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type GroupFileMsg struct { + FileName []byte `protobuf:"bytes,1,opt"` + BusId *uint32 `protobuf:"varint,2,opt"` + FileId *string `protobuf:"bytes,3,opt"` + FileSize *uint64 `protobuf:"varint,4,opt"` + DeadTime *uint64 `protobuf:"varint,5,opt"` + FileSha1 []byte `protobuf:"bytes,6,opt"` + Ext []byte `protobuf:"bytes,7,opt"` + FileMd5 []byte `protobuf:"bytes,8,opt"` +} + +func (x *GroupFileMsg) GetBusId() uint32 { + if x != nil && x.BusId != nil { + return *x.BusId + } + return 0 +} + +func (x *GroupFileMsg) GetFileId() string { + if x != nil && x.FileId != nil { + return *x.FileId + } + return "" +} + +func (x *GroupFileMsg) GetFileSize() uint64 { + if x != nil && x.FileSize != nil { + return *x.FileSize + } + return 0 +} + +func (x *GroupFileMsg) GetDeadTime() uint64 { + if x != nil && x.DeadTime != nil { + return *x.DeadTime + } + return 0 +} + +func (x *GroupFileMsg) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type ImageMsg struct { + Md5 *string `protobuf:"bytes,1,opt"` + Uuid *string `protobuf:"bytes,2,opt"` + ImgType *uint32 `protobuf:"varint,3,opt"` + FileSize *uint32 `protobuf:"varint,4,opt"` + Width *uint32 `protobuf:"varint,5,opt"` + Height *uint32 `protobuf:"varint,6,opt"` + FileId *uint32 `protobuf:"varint,101,opt"` + ServerIp *uint32 `protobuf:"varint,102,opt"` + ServerPort *uint32 `protobuf:"varint,103,opt"` + FilePath *string `protobuf:"bytes,104,opt"` + ThumbUrl *string `protobuf:"bytes,201,opt"` + OriginalUrl *string `protobuf:"bytes,202,opt"` + ResaveUrl *string `protobuf:"bytes,203,opt"` +} + +func (x *ImageMsg) GetMd5() string { + if x != nil && x.Md5 != nil { + return *x.Md5 + } + return "" +} + +func (x *ImageMsg) GetUuid() string { + if x != nil && x.Uuid != nil { + return *x.Uuid + } + return "" +} + +func (x *ImageMsg) GetImgType() uint32 { + if x != nil && x.ImgType != nil { + return *x.ImgType + } + return 0 +} + +func (x *ImageMsg) GetFileSize() uint32 { + if x != nil && x.FileSize != nil { + return *x.FileSize + } + return 0 +} + +func (x *ImageMsg) GetWidth() uint32 { + if x != nil && x.Width != nil { + return *x.Width + } + return 0 +} + +func (x *ImageMsg) GetHeight() uint32 { + if x != nil && x.Height != nil { + return *x.Height + } + return 0 +} + +func (x *ImageMsg) GetFileId() uint32 { + if x != nil && x.FileId != nil { + return *x.FileId + } + return 0 +} + +func (x *ImageMsg) GetServerIp() uint32 { + if x != nil && x.ServerIp != nil { + return *x.ServerIp + } + return 0 +} + +func (x *ImageMsg) GetServerPort() uint32 { + if x != nil && x.ServerPort != nil { + return *x.ServerPort + } + return 0 +} + +func (x *ImageMsg) GetFilePath() string { + if x != nil && x.FilePath != nil { + return *x.FilePath + } + return "" +} + +func (x *ImageMsg) GetThumbUrl() string { + if x != nil && x.ThumbUrl != nil { + return *x.ThumbUrl + } + return "" +} + +func (x *ImageMsg) GetOriginalUrl() string { + if x != nil && x.OriginalUrl != nil { + return *x.OriginalUrl + } + return "" +} + +func (x *ImageMsg) GetResaveUrl() string { + if x != nil && x.ResaveUrl != nil { + return *x.ResaveUrl + } + return "" +} + +func (x *ImageMsg) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type MsgElem struct { + Type *uint32 `protobuf:"varint,1,opt"` + TextMsg *TextMsg `protobuf:"bytes,11,opt"` + FaceMsg *FaceMsg `protobuf:"bytes,12,opt"` + ImageMsg *ImageMsg `protobuf:"bytes,13,opt"` + GroupFileMsg *GroupFileMsg `protobuf:"bytes,14,opt"` + ShareMsg *ShareMsg `protobuf:"bytes,15,opt"` + RichMsg *RichMsg `protobuf:"bytes,16,opt"` + ArkMsg *ArkMsg `protobuf:"bytes,17,opt"` +} + +func (x *MsgElem) GetType() uint32 { + if x != nil && x.Type != nil { + return *x.Type + } + return 0 +} + +func (x *MsgElem) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type MsgInfo struct { + Seq *uint32 `protobuf:"varint,1,opt"` + Random *uint32 `protobuf:"varint,2,opt"` +} + +func (x *MsgInfo) GetSeq() uint32 { + if x != nil && x.Seq != nil { + return *x.Seq + } + return 0 +} + +func (x *MsgInfo) GetRandom() uint32 { + if x != nil && x.Random != nil { + return *x.Random + } + return 0 +} + +func (x *MsgInfo) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type MsgProcessInfo struct { + Msg *MsgInfo `protobuf:"bytes,1,opt"` + ErrorCode *uint32 `protobuf:"varint,2,opt"` + DigestUin *uint64 `protobuf:"varint,3,opt"` + DigestTime *uint32 `protobuf:"varint,4,opt"` +} + +func (x *MsgProcessInfo) GetErrorCode() uint32 { + if x != nil && x.ErrorCode != nil { + return *x.ErrorCode + } + return 0 +} + +func (x *MsgProcessInfo) GetDigestUin() uint64 { + if x != nil && x.DigestUin != nil { + return *x.DigestUin + } + return 0 +} + +func (x *MsgProcessInfo) GetDigestTime() uint32 { + if x != nil && x.DigestTime != nil { + return *x.DigestTime + } + return 0 +} + +func (x *MsgProcessInfo) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type ReqBody struct { + GroupCode *uint64 `protobuf:"varint,1,opt"` + Seq *uint32 `protobuf:"varint,2,opt"` + Random *uint32 `protobuf:"varint,3,opt"` +} + +func (x *ReqBody) GetGroupCode() uint64 { + if x != nil && x.GroupCode != nil { + return *x.GroupCode + } + return 0 +} + +func (x *ReqBody) GetSeq() uint32 { + if x != nil && x.Seq != nil { + return *x.Seq + } + return 0 +} + +func (x *ReqBody) GetRandom() uint32 { + if x != nil && x.Random != nil { + return *x.Random + } + return 0 +} + +func (x *ReqBody) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type RichMsg struct { + ServiceId *uint32 `protobuf:"varint,1,opt"` + Xml *string `protobuf:"bytes,2,opt"` + LongMsgResid *string `protobuf:"bytes,3,opt"` +} + +func (x *RichMsg) GetServiceId() uint32 { + if x != nil && x.ServiceId != nil { + return *x.ServiceId + } + return 0 +} + +func (x *RichMsg) GetXml() string { + if x != nil && x.Xml != nil { + return *x.Xml + } + return "" +} + +func (x *RichMsg) GetLongMsgResid() string { + if x != nil && x.LongMsgResid != nil { + return *x.LongMsgResid + } + return "" +} + +func (x *RichMsg) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type RspBody struct { + Wording *string `protobuf:"bytes,1,opt"` + DigestUin *uint64 `protobuf:"varint,2,opt"` + DigestTime *uint32 `protobuf:"varint,3,opt"` + Msg *DigestMsg `protobuf:"bytes,4,opt"` + ErrorCode *uint32 `protobuf:"varint,10,opt"` +} + +func (x *RspBody) GetWording() string { + if x != nil && x.Wording != nil { + return *x.Wording + } + return "" +} + +func (x *RspBody) GetDigestUin() uint64 { + if x != nil && x.DigestUin != nil { + return *x.DigestUin + } + return 0 +} + +func (x *RspBody) GetDigestTime() uint32 { + if x != nil && x.DigestTime != nil { + return *x.DigestTime + } + return 0 +} + +func (x *RspBody) GetErrorCode() uint32 { + if x != nil && x.ErrorCode != nil { + return *x.ErrorCode + } + return 0 +} + +func (x *RspBody) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type ShareMsg struct { + Type *string `protobuf:"bytes,1,opt"` + Title *string `protobuf:"bytes,2,opt"` + Summary *string `protobuf:"bytes,3,opt"` + Brief *string `protobuf:"bytes,4,opt"` + Url *string `protobuf:"bytes,5,opt"` + PictureUrl *string `protobuf:"bytes,6,opt"` + Action *string `protobuf:"bytes,7,opt"` + Source *string `protobuf:"bytes,8,opt"` + SourceUrl *string `protobuf:"bytes,9,opt"` +} + +func (x *ShareMsg) GetType() string { + if x != nil && x.Type != nil { + return *x.Type + } + return "" +} + +func (x *ShareMsg) GetTitle() string { + if x != nil && x.Title != nil { + return *x.Title + } + return "" +} + +func (x *ShareMsg) GetSummary() string { + if x != nil && x.Summary != nil { + return *x.Summary + } + return "" +} + +func (x *ShareMsg) GetBrief() string { + if x != nil && x.Brief != nil { + return *x.Brief + } + return "" +} + +func (x *ShareMsg) GetUrl() string { + if x != nil && x.Url != nil { + return *x.Url + } + return "" +} + +func (x *ShareMsg) GetPictureUrl() string { + if x != nil && x.PictureUrl != nil { + return *x.PictureUrl + } + return "" +} + +func (x *ShareMsg) GetAction() string { + if x != nil && x.Action != nil { + return *x.Action + } + return "" +} + +func (x *ShareMsg) GetSource() string { + if x != nil && x.Source != nil { + return *x.Source + } + return "" +} + +func (x *ShareMsg) GetSourceUrl() string { + if x != nil && x.SourceUrl != nil { + return *x.SourceUrl + } + return "" +} + +func (x *ShareMsg) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type TextMsg struct { + Str []byte `protobuf:"bytes,1,opt"` +} + +func (x *TextMsg) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} diff --git a/internal/protobuf/data/oidb/oidb0xeac/oidb0xeac.go b/internal/protobuf/data/oidb/oidb0xeac/oidb0xeac.go deleted file mode 100644 index 2970e27b..00000000 --- a/internal/protobuf/data/oidb/oidb0xeac/oidb0xeac.go +++ /dev/null @@ -1,87 +0,0 @@ -// Code generated by Proto2Go.Net. Only used for MiraiGo. DO NOT EDIT. -// Source: oidb0xeac.proto - -package oidb0xeac - -import ( - "github.com/pkg/errors" - "go.dedis.ch/protobuf" -) - -type ( - ReqBody struct { - GroupCode *uint64 `protobuf:"1,opt"` - Seq *uint32 `protobuf:"2,opt"` - Random *uint32 `protobuf:"3,opt"` - } - - RspBody struct { - Wording *string `protobuf:"1,opt"` - DigestUin *uint64 `protobuf:"2,opt"` - DigestTime *uint32 `protobuf:"3,opt"` - ErrorCode *uint32 `protobuf:"10,opt"` - } -) - -func (x *ReqBody) GetGroupCode() uint64 { - if x != nil && x.GroupCode != nil { - return *x.GroupCode - } - return 0 -} - -func (x *ReqBody) GetSeq() uint32 { - if x != nil && x.Seq != nil { - return *x.Seq - } - return 0 -} - -func (x *ReqBody) GetRandom() uint32 { - if x != nil && x.Random != nil { - return *x.Random - } - return 0 -} - -func (x *ReqBody) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} - -func (x *RspBody) GetWording() string { - if x != nil && x.Wording != nil { - return *x.Wording - } - return "" -} - -func (x *RspBody) GetDigestUin() uint64 { - if x != nil && x.DigestUin != nil { - return *x.DigestUin - } - return 0 -} - -func (x *RspBody) GetDigestTime() uint32 { - if x != nil && x.DigestTime != nil { - return *x.DigestTime - } - return 0 -} - -func (x *RspBody) GetErrorCode() uint32 { - if x != nil && x.ErrorCode != nil { - return *x.ErrorCode - } - return 0 -} - -func (x *RspBody) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} diff --git a/internal/protobuf/data/oidb/oidb0xed3/0xed3.pb.go b/internal/protobuf/data/oidb/oidb0xed3/0xed3.pb.go new file mode 100644 index 00000000..2029bb7e --- /dev/null +++ b/internal/protobuf/data/oidb/oidb0xed3/0xed3.pb.go @@ -0,0 +1,67 @@ +// Code generated by yaprotoc. DO NOT EDIT. +// source: oidb\0xed3.proto + +package oidb0xed3 + +import ( + "github.com/pkg/errors" + "github.com/segmentio/encoding/proto" +) + +type ReqBody struct { + ToUin *uint64 `protobuf:"varint,1,opt"` + GroupCode *uint64 `protobuf:"varint,2,opt"` + MsgSeq *uint32 `protobuf:"varint,3,opt"` + MsgRand *uint32 `protobuf:"varint,4,opt"` + AioUin *uint64 `protobuf:"varint,5,opt"` + NudgeType *uint32 `protobuf:"varint,6,opt"` +} + +func (x *ReqBody) GetToUin() uint64 { + if x != nil && x.ToUin != nil { + return *x.ToUin + } + return 0 +} + +func (x *ReqBody) GetGroupCode() uint64 { + if x != nil && x.GroupCode != nil { + return *x.GroupCode + } + return 0 +} + +func (x *ReqBody) GetMsgSeq() uint32 { + if x != nil && x.MsgSeq != nil { + return *x.MsgSeq + } + return 0 +} + +func (x *ReqBody) GetMsgRand() uint32 { + if x != nil && x.MsgRand != nil { + return *x.MsgRand + } + return 0 +} + +func (x *ReqBody) GetAioUin() uint64 { + if x != nil && x.AioUin != nil { + return *x.AioUin + } + return 0 +} + +func (x *ReqBody) GetNudgeType() uint32 { + if x != nil && x.NudgeType != nil { + return *x.NudgeType + } + return 0 +} + +func (x *ReqBody) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} diff --git a/internal/protobuf/data/oidb/oidb0xed3/oidb0xed3.go b/internal/protobuf/data/oidb/oidb0xed3/oidb0xed3.go deleted file mode 100644 index e0f0c0c3..00000000 --- a/internal/protobuf/data/oidb/oidb0xed3/oidb0xed3.go +++ /dev/null @@ -1,61 +0,0 @@ -// Code generated by Proto2Go.Net. Only used for MiraiGo. DO NOT EDIT. -// Source: oidb0xed3.proto - -package oidb0xed3 - -import ( - "github.com/pkg/errors" - "go.dedis.ch/protobuf" -) - -type ( - ReqBody struct { - ToUin *int64 `protobuf:"1,opt"` - GroupCode *int64 `protobuf:"2,opt"` - MsgSeq *int32 `protobuf:"3,opt"` - MsgRand *int32 `protobuf:"4,opt"` - AioUin *int64 `protobuf:"5,opt"` - } -) - -func (x *ReqBody) GetToUin() int64 { - if x != nil && x.ToUin != nil { - return *x.ToUin - } - return 0 -} - -func (x *ReqBody) GetGroupCode() int64 { - if x != nil && x.GroupCode != nil { - return *x.GroupCode - } - return 0 -} - -func (x *ReqBody) GetMsgSeq() int32 { - if x != nil && x.MsgSeq != nil { - return *x.MsgSeq - } - return 0 -} - -func (x *ReqBody) GetMsgRand() int32 { - if x != nil && x.MsgRand != nil { - return *x.MsgRand - } - return 0 -} - -func (x *ReqBody) GetAioUin() int64 { - if x != nil && x.AioUin != nil { - return *x.AioUin - } - return 0 -} - -func (x *ReqBody) Marshal() ([]byte, error) { - if x == nil { - return nil, errors.New("nil pointer error") - } - return protobuf.Encode(x) -} diff --git a/internal/protobuf/data/oidb/oidb0xef0/0xef0.pb.go b/internal/protobuf/data/oidb/oidb0xef0/0xef0.pb.go new file mode 100644 index 00000000..c8a2133a --- /dev/null +++ b/internal/protobuf/data/oidb/oidb0xef0/0xef0.pb.go @@ -0,0 +1,126 @@ +// Code generated by yaprotoc. DO NOT EDIT. +// source: oidb/0xef0.proto + +package oidb0xef0 + +import ( + "github.com/pkg/errors" + "github.com/segmentio/encoding/proto" +) + +type GroupInfoExt struct { + GroupInfoExtSeq *uint32 `protobuf:"varint,1,opt"` + LuckyWordId *uint64 `protobuf:"varint,2,opt"` + LightCharNum *uint32 `protobuf:"varint,3,opt"` + LuckyWord []byte `protobuf:"bytes,4,opt"` + StarId *uint32 `protobuf:"varint,5,opt"` + EssentialMsgSwitch *uint32 `protobuf:"varint,6,opt"` + TodoSeq *uint32 `protobuf:"varint,7,opt"` + BlacklistExpireTime *uint32 `protobuf:"varint,8,opt"` +} + +func (x *GroupInfoExt) GetGroupInfoExtSeq() uint32 { + if x != nil && x.GroupInfoExtSeq != nil { + return *x.GroupInfoExtSeq + } + return 0 +} + +func (x *GroupInfoExt) GetLuckyWordId() uint64 { + if x != nil && x.LuckyWordId != nil { + return *x.LuckyWordId + } + return 0 +} + +func (x *GroupInfoExt) GetLightCharNum() uint32 { + if x != nil && x.LightCharNum != nil { + return *x.LightCharNum + } + return 0 +} + +func (x *GroupInfoExt) GetStarId() uint32 { + if x != nil && x.StarId != nil { + return *x.StarId + } + return 0 +} + +func (x *GroupInfoExt) GetEssentialMsgSwitch() uint32 { + if x != nil && x.EssentialMsgSwitch != nil { + return *x.EssentialMsgSwitch + } + return 0 +} + +func (x *GroupInfoExt) GetTodoSeq() uint32 { + if x != nil && x.TodoSeq != nil { + return *x.TodoSeq + } + return 0 +} + +func (x *GroupInfoExt) GetBlacklistExpireTime() uint32 { + if x != nil && x.BlacklistExpireTime != nil { + return *x.BlacklistExpireTime + } + return 0 +} + +func (x *GroupInfoExt) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type ReqBody struct { + GroupCode []uint64 `protobuf:"varint,1,rep"` + GroupInfoExt *GroupInfoExt `protobuf:"bytes,2,opt"` +} + +func (x *ReqBody) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type RspBody struct { + RspDetail []*RspDetail `protobuf:"bytes,1,rep"` +} + +func (x *RspBody) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} + +type RspDetail struct { + GroupCode *uint64 `protobuf:"varint,1,opt"` + Result *int32 `protobuf:"varint,2,opt"` + GroupInfoExt *GroupInfoExt `protobuf:"bytes,3,opt"` +} + +func (x *RspDetail) GetGroupCode() uint64 { + if x != nil && x.GroupCode != nil { + return *x.GroupCode + } + return 0 +} + +func (x *RspDetail) GetResult() int32 { + if x != nil && x.Result != nil { + return *x.Result + } + return 0 +} + +func (x *RspDetail) Marshal() ([]byte, error) { + if x == nil { + return nil, errors.New("nil message") + } + return proto.Marshal(x) +} diff --git a/internal/protobuf/data/oidb/sso.go b/internal/protobuf/data/oidb/sso.pb.go similarity index 59% rename from internal/protobuf/data/oidb/sso.go rename to internal/protobuf/data/oidb/sso.pb.go index 26099f9b..f30c735a 100644 --- a/internal/protobuf/data/oidb/sso.go +++ b/internal/protobuf/data/oidb/sso.pb.go @@ -1,23 +1,21 @@ -// Code generated by Proto2Go.Net. Only used for MiraiGo. DO NOT EDIT. -// Source: sso.proto +// Code generated by yaprotoc. DO NOT EDIT. +// source: oidb\sso.proto package oidb import ( "github.com/pkg/errors" - "go.dedis.ch/protobuf" + "github.com/segmentio/encoding/proto" ) -type ( - OIDBSSOPkg struct { - Command *uint32 `protobuf:"1,opt"` - ServiceType *uint32 `protobuf:"2,opt"` - Result *uint32 `protobuf:"3,opt"` - Bodybuffer []byte `protobuf:"4,opt"` - ErrorMsg *string `protobuf:"5,opt"` - ClientVersion *string `protobuf:"6,opt"` - } -) +type OIDBSSOPkg struct { + Command *uint32 `protobuf:"varint,1,opt"` + ServiceType *uint32 `protobuf:"varint,2,opt"` + Result *uint32 `protobuf:"varint,3,opt"` + Bodybuffer []byte `protobuf:"bytes,4,opt"` + ErrorMsg *string `protobuf:"bytes,5,opt"` + ClientVersion *string `protobuf:"bytes,6,opt"` +} func (x *OIDBSSOPkg) GetCommand() uint32 { if x != nil && x.Command != nil { @@ -56,7 +54,7 @@ func (x *OIDBSSOPkg) GetClientVersion() string { func (x *OIDBSSOPkg) Marshal() ([]byte, error) { if x == nil { - return nil, errors.New("nil pointer error") + return nil, errors.New("nil message") } - return protobuf.Encode(x) + return proto.Marshal(x) } diff --git a/proto/README.md b/proto/README.md new file mode 100644 index 00000000..1e745170 --- /dev/null +++ b/proto/README.md @@ -0,0 +1,4 @@ +## 编译proto文件指南 + +1. `go install github.com/wdvxdr1123/yaproto/cmd/yaprotoc@latest` +2. `make generate` diff --git a/proto/group_file_common/common.proto b/proto/group_file_common/common.proto new file mode 100644 index 00000000..4a4c92c0 --- /dev/null +++ b/proto/group_file_common/common.proto @@ -0,0 +1,81 @@ +syntax = "proto2"; + +package group_file_common; + +option go_package = "group_file_common;group_file_common"; + +message FeedsInfo { + optional uint32 busId = 1; + optional string fileId = 2; + optional uint32 msgRandom = 3; + optional bytes ext = 4; + optional uint32 feedFlag = 5; + // optional msg_ctrl.MsgCtrl ctrl = 6; +} + +message FeedsResult { + optional int32 retCode = 1; + optional string detail = 2; + optional string fileId = 3; + optional uint32 busId = 4; + optional uint32 deadTime = 5; +} + +message FileInfo { + optional string fileId = 1; + optional string fileName = 2; + optional uint64 fileSize = 3; + optional uint32 busId = 4; + optional uint64 uploadedSize = 5; + optional uint32 uploadTime = 6; + optional uint32 deadTime = 7; + optional uint32 modifyTime = 8; + optional uint32 downloadTimes = 9; + optional bytes sha = 10; + optional bytes sha3 = 11; + optional bytes md5 = 12; + optional string localPath = 13; + optional string uploaderName = 14; + optional uint64 uploaderUin = 15; + optional string parentFolderId = 16; + optional uint32 safeType = 17; + optional bytes fileBlobExt = 20; + optional uint64 ownerUin = 21; + optional string feedId = 22; + optional bytes reservedField = 23; +} + +message FileInfoTmem { + optional uint64 groupCode = 1; + repeated FileInfo files = 2; +} + +message FileItem { + optional uint32 type = 1; + optional FolderInfo folderInfo = 2; + optional FileInfo fileInfo = 3; +} + +message FolderInfo { + optional string folderId = 1; + optional string parentFolderId = 2; + optional string folderName = 3; + optional uint32 createTime = 4; + optional uint32 modifyTime = 5; + optional uint64 createUin = 6; + optional string creatorName = 7; + optional uint32 totalFileCount = 8; + optional uint64 modifyUin = 9; + optional string modifyName = 10; + optional uint64 usedSpace = 11; +} + +message FolderInfoTmem { + optional uint64 groupCode = 1; + repeated FolderInfo folders = 2; +} + +message OverwriteInfo { + optional string fileId = 1; + optional uint32 downloadTimes = 2; +} \ No newline at end of file diff --git a/proto/makefile b/proto/makefile new file mode 100644 index 00000000..a9f7c45a --- /dev/null +++ b/proto/makefile @@ -0,0 +1,3 @@ +generate: + yaprotoc -marshal=1 -getter=1 -output="./../internal/protobuf/data" \ + -pkg="github.com/Mrs4s/MiraiGo/internal/protobuf/data" . diff --git a/proto/oidb/0x6d6.proto b/proto/oidb/0x6d6.proto new file mode 100644 index 00000000..eb00151c --- /dev/null +++ b/proto/oidb/0x6d6.proto @@ -0,0 +1,146 @@ +syntax = "proto2"; + +package oidb_0x6d6; + +option go_package = "oidb/oidb0x6d6;oidb0x6d6"; + +message DeleteFileReqBody { + optional uint64 groupCode = 1; + optional uint32 appId = 2; + optional uint32 busId = 3; + optional string parentFolderId = 4; + optional string fileId = 5; + optional uint32 msgdbSeq = 6; + optional uint32 msgRand = 7; +} + +message DeleteFileRspBody { + optional int32 retCode = 1; + optional string retMsg = 2; + optional string clientWording = 3; +} + +message DownloadFileReqBody { + optional uint64 groupCode = 1; + optional uint32 appId = 2; + optional uint32 busId = 3; + optional string fileId = 4; + optional bool thumbnailReq = 5; + optional uint32 urlType = 6; + optional bool previewReq = 7; + optional uint32 src = 8; +} + +message DownloadFileRspBody { + optional int32 retCode = 1; + optional string retMsg = 2; + optional string clientWording = 3; + optional string downloadIp = 4; + optional bytes downloadDns = 5; + optional bytes downloadUrl = 6; + optional bytes sha = 7; + optional bytes sha3 = 8; + optional bytes md5 = 9; + optional bytes cookieVal = 10; + optional string saveFileName = 11; + optional uint32 previewPort = 12; + optional string downloadDnsHttps = 13; + optional uint32 previewPortHttps = 14; +} + +message MoveFileReqBody { + optional uint64 groupCode = 1; + optional uint32 appId = 2; + optional uint32 busId = 3; + optional string fileId = 4; + optional string parentFolderId = 5; + optional string destFolderId = 6; +} + +message MoveFileRspBody { + optional int32 retCode = 1; + optional string retMsg = 2; + optional string clientWording = 3; + optional string parentFolderId = 4; +} + +message RenameFileReqBody { + optional uint64 groupCode = 1; + optional uint32 appId = 2; + optional uint32 busId = 3; + optional string fileId = 4; + optional string parentFolderId = 5; + optional string newFileName = 6; +} + +message RenameFileRspBody { + optional int32 retCode = 1; + optional string retMsg = 2; + optional string clientWording = 3; +} + +message ReqBody { + optional UploadFileReqBody uploadFileReq = 1; + optional ResendReqBody resendFileReq = 2; + optional DownloadFileReqBody downloadFileReq = 3; + optional DeleteFileReqBody deleteFileReq = 4; + optional RenameFileReqBody renameFileReq = 5; + optional MoveFileReqBody moveFileReq = 6; +} + +message ResendReqBody { + optional uint64 groupCode = 1; + optional uint32 appId = 2; + optional uint32 busId = 3; + optional string fileId = 4; + optional bytes sha = 5; +} + +message ResendRspBody { + optional int32 retCode = 1; + optional string retMsg = 2; + optional string clientWording = 3; + optional string uploadIp = 4; + optional bytes fileKey = 5; + optional bytes checkKey = 6; +} + +message RspBody { + optional UploadFileRspBody uploadFileRsp = 1; + optional ResendRspBody resendFileRsp = 2; + optional DownloadFileRspBody downloadFileRsp = 3; + optional DeleteFileRspBody deleteFileRsp = 4; + optional RenameFileRspBody renameFileRsp = 5; + optional MoveFileRspBody moveFileRsp = 6; +} + +message UploadFileReqBody { + optional uint64 groupCode = 1; + optional uint32 appId = 2; + optional uint32 busId = 3; + optional uint32 entrance = 4; + optional string parentFolderId = 5; + optional string fileName = 6; + optional string localPath = 7; + optional uint64 fileSize = 8; + optional bytes sha = 9; + optional bytes sha3 = 10; + optional bytes md5 = 11; + optional bool supportMultiUpload = 15; +} + +message UploadFileRspBody { + optional int32 retCode = 1; + optional string retMsg = 2; + optional string clientWording = 3; + optional string uploadIp = 4; + optional string serverDns = 5; + optional uint32 busId = 6; + optional string fileId = 7; + optional bytes fileKey = 8; + optional bytes checkKey = 9; + optional bool fileExist = 10; + repeated string uploadIpLanV4 = 12; + repeated string uploadIpLanV6 = 13; + optional uint32 uploadPort = 14; +} \ No newline at end of file diff --git a/proto/oidb/0x6d7.proto b/proto/oidb/0x6d7.proto new file mode 100644 index 00000000..4290fb57 --- /dev/null +++ b/proto/oidb/0x6d7.proto @@ -0,0 +1,76 @@ +syntax = "proto2"; + +package oidb_0x6d7; + +import "group_file_common/common.proto"; + +option go_package = "oidb/oidb0x6d7;oidb0x6d7"; + +message CreateFolderReqBody { + optional uint64 groupCode = 1; + optional uint32 appId = 2; + optional string parentFolderId = 3; + optional string folderName = 4; +} + +message CreateFolderRspBody { + optional int32 retCode = 1; + optional string retMsg = 2; + optional string clientWording = 3; + optional group_file_common.FolderInfo folderInfo = 4; +} + +message DeleteFolderReqBody { + optional uint64 groupCode = 1; + optional uint32 appId = 2; + optional string folderId = 3; +} + +message DeleteFolderRspBody { + optional int32 retCode = 1; + optional string retMsg = 2; + optional string clientWording = 3; +} + +message MoveFolderReqBody { + optional uint64 groupCode = 1; + optional uint32 appId = 2; + optional string folderId = 3; + optional string parentFolderId = 4; + optional string destFolderId = 5; +} + +message MoveFolderRspBody { + optional int32 retCode = 1; + optional string retMsg = 2; + optional string clientWording = 3; + optional group_file_common.FolderInfo folderInfo = 4; +} + +message RenameFolderReqBody { + optional uint64 groupCode = 1; + optional uint32 appId = 2; + optional string folderId = 3; + optional string newFolderName = 4; +} + +message RenameFolderRspBody { + optional int32 retCode = 1; + optional string retMsg = 2; + optional string clientWording = 3; + optional group_file_common.FolderInfo folderInfo = 4; +} + +message ReqBody { + optional CreateFolderReqBody createFolderReq = 1; + optional DeleteFolderReqBody deleteFolderReq = 2; + optional RenameFolderReqBody renameFolderReq = 3; + optional MoveFolderReqBody moveFolderReq = 4; +} + +message RspBody { + optional CreateFolderRspBody createFolderRsp = 1; + optional DeleteFolderRspBody deleteFolderRsp = 2; + optional RenameFolderRspBody renameFolderRsp = 3; + optional MoveFolderRspBody moveFolderRsp = 4; +} diff --git a/proto/oidb/0x6d8.proto b/proto/oidb/0x6d8.proto new file mode 100644 index 00000000..2b6771e5 --- /dev/null +++ b/proto/oidb/0x6d8.proto @@ -0,0 +1,138 @@ +syntax = "proto2"; + +package oidb_0x6d8; + +import "group_file_common/common.proto"; + +option go_package = "oidb/oidb0x6d8;oidb0x6d8"; + +message FileTimeStamp { + optional uint32 uploadTime = 1; + optional string fileId = 2; +} + +message GetFileCountReqBody { + optional uint64 groupCode = 1; + optional uint32 appId = 2; + optional uint32 busId = 3; +} + +message GetFileCountRspBody { + optional int32 retCode = 1; + optional string retMsg = 2; + optional string clientWording = 3; + optional uint32 allFileCount = 4; + optional bool fileTooMany = 5; + optional uint32 limitCount = 6; + optional bool isFull = 7; +} + +message GetFileInfoReqBody { + optional uint64 groupCode = 1; + optional uint32 appId = 2; + optional uint32 busId = 3; + optional string fileId = 4; + optional uint32 fieldFlag = 5; +} + +message GetFileInfoRspBody { + optional int32 retCode = 1; + optional string retMsg = 2; + optional string clientWording = 3; + optional group_file_common.FileInfo fileInfo = 4; +} + +message GetFileListReqBody { + optional uint64 groupCode = 1; + optional uint32 appId = 2; + optional string folderId = 3; + optional FileTimeStamp startTimestamp = 4; + optional uint32 fileCount = 5; + optional FileTimeStamp maxTimestamp = 6; + optional uint32 allFileCount = 7; + optional uint32 reqFrom = 8; + optional uint32 sortBy = 9; + optional uint32 filterCode = 10; + optional uint64 uin = 11; + optional uint32 fieldFlag = 12; + optional uint32 startIndex = 13; + optional bytes context = 14; + optional uint32 clientVersion = 15; + optional uint32 whiteList = 16; + optional uint32 sortOrder = 17; + optional uint32 showOnlinedocFolder = 18; +} + +message GetFileListRspBody { + optional int32 retCode = 1; + optional string retMsg = 2; + optional string clientWording = 3; + optional bool isEnd = 4; + repeated Item itemList = 5; + optional FileTimeStamp maxTimestamp = 6; + optional uint32 allFileCount = 7; + optional uint32 filterCode = 8; + optional bool safeCheckFlag = 11; + optional uint32 safeCheckRes = 12; + optional uint32 nextIndex = 13; + optional bytes context = 14; + optional uint32 role = 15; + optional uint32 openFlag = 16; + + message Item { + optional uint32 type = 1; + optional group_file_common.FolderInfo folderInfo = 2; + optional group_file_common.FileInfo fileInfo = 3; + } +} + +message GetFilePreviewReqBody { + optional uint64 groupCode = 1; + optional uint32 appId = 2; + optional uint32 busId = 3; + optional string fileId = 4; +} + +message GetFilePreviewRspBody { + optional int32 retCode = 1; + optional string retMsg = 2; + optional string clientWording = 3; + optional uint32 serverIp = 4; + optional uint32 serverPort = 5; + optional string downloadDns = 6; + optional bytes downloadUrl = 7; + optional string cookieVal = 8; + optional bytes reservedField = 9; + optional bytes downloadDnsHttps = 10; + optional uint32 previewPortHttps = 11; +} + +message GetSpaceReqBody { + optional uint64 groupCode = 1; + optional uint32 appId = 2; +} + +message GetSpaceRspBody { + optional int32 retCode = 1; + optional string retMsg = 2; + optional string clientWording = 3; + optional uint64 totalSpace = 4; + optional uint64 usedSpace = 5; + optional bool allUpload = 6; +} + +message ReqBody { + optional GetFileInfoReqBody fileInfoReq = 1; + optional GetFileListReqBody fileListInfoReq = 2; + optional GetFileCountReqBody groupFileCntReq = 3; + optional GetSpaceReqBody groupSpaceReq = 4; + optional GetFilePreviewReqBody filePreviewReq = 5; +} + +message RspBody { + optional GetFileInfoRspBody fileInfoRsp = 1; + optional GetFileListRspBody fileListInfoRsp = 2; + optional GetFileCountRspBody groupFileCntRsp = 3; + optional GetSpaceRspBody groupSpaceRsp = 4; + optional GetFilePreviewRspBody filePreviewRsp = 5; +} \ No newline at end of file diff --git a/proto/oidb/0x6d9.proto b/proto/oidb/0x6d9.proto new file mode 100644 index 00000000..cb09aea6 --- /dev/null +++ b/proto/oidb/0x6d9.proto @@ -0,0 +1,97 @@ +syntax = "proto2"; + +package oidb_0x6d9; + +import "group_file_common/common.proto"; + +option go_package = "oidb/oidb0x6d9;oidb0x6d9"; + +message CopyFromReqBody { + optional uint64 groupCode = 1; + optional uint32 appId = 2; + optional uint32 srcBusId = 3; + optional bytes srcParentFolder = 4; + optional bytes srcFilePath = 5; + optional uint32 dstBusId = 6; + optional bytes dstFolderId = 7; + optional uint64 fileSize = 8; + optional string localPath = 9; + optional string fileName = 10; + optional uint64 srcUin = 11; + optional bytes md5 = 12; +} + +message CopyFromRspBody { + optional int32 retCode = 1; + optional string retMsg = 2; + optional string clientWording = 3; + optional bytes saveFilePath = 4; + optional uint32 busId = 5; +} + +message CopyToReqBody { + optional uint64 groupCode = 1; + optional uint32 appId = 2; + optional uint32 srcBusId = 3; + optional string srcFileId = 4; + optional uint32 dstBusId = 5; + optional uint64 dstUin = 6; + optional string newFileName = 40; + optional bytes timCloudPdirKey = 100; + optional bytes timCloudPpdirKey = 101; + optional bytes timCloudExtensionInfo = 102; + optional uint32 timFileExistOption = 103; +} + +message CopyToRspBody { + optional int32 retCode = 1; + optional string retMsg = 2; + optional string clientWording = 3; + optional string saveFilePath = 4; + optional uint32 busId = 5; + optional string fileName = 40; +} + +message FeedsReqBody { + optional uint64 groupCode = 1; + optional uint32 appId = 2; + repeated group_file_common.FeedsInfo feedsInfoList = 3; + optional uint32 multiSendSeq = 4; +} + +message FeedsRspBody { + optional int32 retCode = 1; + optional string retMsg = 2; + optional string clientWording = 3; + repeated group_file_common.FeedsResult feedsResultList = 4; + optional uint32 svrbusyWaitTime = 5; +} + +message ReqBody { + optional TransFileReqBody transFileReq = 1; + optional CopyFromReqBody copyFromReq = 2; + optional CopyToReqBody copyToReq = 3; + optional FeedsReqBody feedsInfoReq = 5; +} + +message RspBody { + optional TransFileRspBody transFileRsp = 1; + optional CopyFromRspBody copyFromRsp = 2; + optional CopyToRspBody copyToRsp = 3; + optional FeedsRspBody feedsInfoRsp = 5; +} + +message TransFileReqBody { + optional uint64 groupCode = 1; + optional uint32 appId = 2; + optional uint32 busId = 3; + optional string fileId = 4; +} + +message TransFileRspBody { + optional int32 retCode = 1; + optional string retMsg = 2; + optional string clientWording = 3; + optional uint32 saveBusId = 4; + optional string saveFilePath = 5; +} diff --git a/proto/oidb/0x769.proto b/proto/oidb/0x769.proto new file mode 100644 index 00000000..6fb8816f --- /dev/null +++ b/proto/oidb/0x769.proto @@ -0,0 +1,101 @@ +syntax = "proto2"; + +package oidb_0x769; + +option go_package = "oidb/oidb0x769;oidb0x769"; + +message CPU { + optional string model = 1; + optional uint32 cores = 2; + optional uint32 frequency = 3; +} + +message Camera { + optional uint64 primary = 1; + optional uint64 secondary = 2; + optional bool flash = 3; +} + +message ConfigSeq { + optional uint32 type = 1; + optional uint32 version = 2; +} + +message Content { + optional uint32 taskId = 1; + optional uint32 compress = 2; + optional bytes content = 10; +} + +message DeviceInfo { + optional string brand = 1; + optional string model = 2; + optional OS os = 3; + optional CPU cpu = 4; + optional Memory memory = 5; + optional Storage storage = 6; + optional Screen screen = 7; + optional Camera camera = 8; +} + +message Memory { + optional uint64 total = 1; + optional uint64 process = 2; +} + +message OS { + optional uint32 type = 1; + optional string version = 2; + optional string sdk = 3; + optional string kernel = 4; + optional string rom = 5; +} + +message QueryUinPackageUsageReq { + optional uint32 type = 1; + optional uint64 uinFileSize = 2; +} + +message QueryUinPackageUsageRsp { + optional uint32 status = 1; + optional uint64 leftUinNum = 2; + optional uint64 maxUinNum = 3; + optional uint32 proportion = 4; + repeated UinPackageUsedInfo uinPackageUsedList = 10; +} + +message ReqBody { + repeated ConfigSeq configList = 1; + optional DeviceInfo deviceInfo = 2; + optional string info = 3; + optional string province = 4; + optional string city = 5; + optional int32 reqDebugMsg = 6; + optional QueryUinPackageUsageReq queryUinPackageUsageReq = 101; +} + +message RspBody { + optional uint32 result = 1; + repeated ConfigSeq configList = 2; + optional QueryUinPackageUsageRsp queryUinPackageUsageRsp = 101; +} + +message Screen { + optional string model = 1; + optional uint32 width = 2; + optional uint32 height = 3; + optional uint32 dpi = 4; + optional bool multiTouch = 5; +} + +message Storage { + optional uint64 builtin = 1; + optional uint64 external = 2; +} + +message UinPackageUsedInfo { + optional uint32 ruleId = 1; + optional string author = 2; + optional string url = 3; + optional uint64 uinNum = 4; +} diff --git a/proto/oidb/0x88d.proto b/proto/oidb/0x88d.proto new file mode 100644 index 00000000..45ab7cb6 --- /dev/null +++ b/proto/oidb/0x88d.proto @@ -0,0 +1,190 @@ +syntax = "proto2"; + +package oidb_0x88d; + +import "oidb/0xef0.proto"; + +option go_package = "oidb/oidb0x88d;oidb0x88d"; + +message GroupCardPrefix { + optional bytes introduction = 1; + repeated bytes prefix = 2; +} + +message GroupExInfoOnly { + optional uint32 tribeId = 1; + optional uint32 moneyForAddGroup = 2; +} + +message GroupGeoInfo { + optional uint64 owneruin = 1; + optional uint32 settime = 2; + optional uint32 cityid = 3; + optional int64 longitude = 4; + optional int64 latitude = 5; + optional bytes geocontent = 6; + optional uint64 poiId = 7; +} + +message GroupHeadPortrait { + optional uint32 picCnt = 1; + repeated GroupHeadPortraitInfo info = 2; + optional uint32 defaultId = 3; + optional uint32 verifyingPicCnt = 4; + repeated GroupHeadPortraitInfo verifyingpicInfo = 5; +} + +message GroupHeadPortraitInfo { + optional uint32 picId = 1; + optional uint32 leftX = 2; + optional uint32 leftY = 3; + optional uint32 rightX = 4; + optional uint32 rightY = 5; +} + +message GroupInfo { + optional uint64 groupOwner = 1; + optional uint32 groupCreateTime = 2; + optional uint32 groupFlag = 3; + optional uint32 groupFlagExt = 4; + optional uint32 groupMemberMaxNum = 5; + optional uint32 groupMemberNum = 6; + optional uint32 groupOption = 7; + optional uint32 groupClassExt = 8; + optional uint32 groupSpecialClass = 9; + optional uint32 groupLevel = 10; + optional uint32 groupFace = 11; + optional uint32 groupDefaultPage = 12; + optional uint32 groupInfoSeq = 13; + optional uint32 groupRoamingTime = 14; + optional bytes groupName = 15; + optional bytes groupMemo = 16; + optional bytes groupFingerMemo = 17; + optional bytes groupClassText = 18; + repeated uint32 groupAllianceCode = 19; + optional uint32 groupExtraAdmNum = 20; + optional uint64 groupUin = 21; + optional uint32 groupCurMsgSeq = 22; + optional uint32 groupLastMsgTime = 23; + optional bytes groupQuestion = 24; + optional bytes groupAnswer = 25; + optional uint32 groupVisitorMaxNum = 26; + optional uint32 groupVisitorCurNum = 27; + optional uint32 levelNameSeq = 28; + optional uint32 groupAdminMaxNum = 29; + optional uint32 groupAioSkinTimestamp = 30; + optional uint32 groupBoardSkinTimestamp = 31; + optional bytes groupAioSkinUrl = 32; + optional bytes groupBoardSkinUrl = 33; + optional uint32 groupCoverSkinTimestamp = 34; + optional bytes groupCoverSkinUrl = 35; + optional uint32 groupGrade = 36; + optional uint32 activeMemberNum = 37; + optional uint32 certificationType = 38; + optional bytes certificationText = 39; + optional bytes groupRichFingerMemo = 40; + repeated TagRecord tagRecord = 41; + optional GroupGeoInfo groupGeoInfo = 42; + optional uint32 headPortraitSeq = 43; + optional GroupHeadPortrait headPortrait = 44; + optional uint32 shutupTimestamp = 45; + optional uint32 shutupTimestampMe = 46; + optional uint32 createSourceFlag = 47; + optional uint32 cmduinMsgSeq = 48; + optional uint32 cmduinJoinTime = 49; + optional uint32 cmduinUinFlag = 50; + optional uint32 cmduinFlagEx = 51; + optional uint32 cmduinNewMobileFlag = 52; + optional uint32 cmduinReadMsgSeq = 53; + optional uint32 cmduinLastMsgTime = 54; + optional uint32 groupTypeFlag = 55; + optional uint32 appPrivilegeFlag = 56; + optional GroupExInfoOnly stGroupExInfo = 57; + optional uint32 groupSecLevel = 58; + optional uint32 groupSecLevelInfo = 59; + optional uint32 cmduinPrivilege = 60; + optional bytes poidInfo = 61; + optional uint32 cmduinFlagEx2 = 62; + optional uint64 confUin = 63; + optional uint32 confMaxMsgSeq = 64; + optional uint32 confToGroupTime = 65; + optional uint32 passwordRedbagTime = 66; + optional uint64 subscriptionUin = 67; + optional uint32 memberListChangeSeq = 68; + optional uint32 membercardSeq = 69; + optional uint64 rootId = 70; + optional uint64 parentId = 71; + optional uint32 teamSeq = 72; + optional uint64 historyMsgBeginTime = 73; + optional uint64 inviteNoAuthNumLimit = 74; + optional uint32 cmduinHistoryMsgSeq = 75; + optional uint32 cmduinJoinMsgSeq = 76; + optional uint32 groupFlagext3 = 77; + optional uint32 groupOpenAppid = 78; + optional uint32 isConfGroup = 79; + optional uint32 isModifyConfGroupFace = 80; + optional uint32 isModifyConfGroupName = 81; + optional uint32 noFingerOpenFlag = 82; + optional uint32 noCodeFingerOpenFlag = 83; + optional uint32 autoAgreeJoinGroupUserNumForNormalGroup = 84; + optional uint32 autoAgreeJoinGroupUserNumForConfGroup = 85; + optional uint32 isAllowConfGroupMemberNick = 86; + optional uint32 isAllowConfGroupMemberAtAll = 87; + optional uint32 isAllowConfGroupMemberModifyGroupName = 88; + optional bytes longGroupName = 89; + optional uint32 cmduinJoinRealMsgSeq = 90; + optional uint32 isGroupFreeze = 91; + optional uint32 msgLimitFrequency = 92; + optional bytes joinGroupAuth = 93; + optional uint32 hlGuildAppid = 94; + optional uint32 hlGuildSubType = 95; + optional uint32 hlGuildOrgid = 96; + optional uint32 isAllowHlGuildBinary = 97; + optional uint32 cmduinRingtoneId = 98; + optional uint32 groupFlagext4 = 99; + optional uint32 groupFreezeReason = 100; + optional uint32 isAllowRecallMsg = 101; + optional uint32 importantMsgLatestSeq = 102; + optional bytes groupSchoolInfo = 103; + optional uint32 appealDeadline = 104; + optional GroupCardPrefix stGroupCardPrefix = 105; + optional uint64 allianceId = 106; + optional uint32 cmduinFlagEx3Grocery = 107; + optional uint32 groupInfoExtSeq = 108; + optional oidb_0xef0.GroupInfoExt stGroupInfoExt = 109; + optional bytes cmduinGroupRemarkName = 110; +} + +message ReqBody { + optional uint32 appid = 1; + repeated ReqGroupInfo stzreqgroupinfo = 2; + optional uint32 pcClientVersion = 3; +} + +message ReqGroupInfo { + optional uint64 groupCode = 1; + optional GroupInfo stgroupinfo = 2; + optional uint32 lastGetGroupNameTime = 3; +} + +message RspBody { + repeated RspGroupInfo stzrspgroupinfo = 1; + optional bytes errorinfo = 2; +} + +message RspGroupInfo { + optional uint64 groupCode = 1; + optional uint32 result = 2; + optional GroupInfo stgroupinfo = 3; +} + +message TagRecord { + optional uint64 fromUin = 1; + optional uint64 groupCode = 2; + optional bytes tagId = 3; + optional uint64 setTime = 4; + optional uint32 goodNum = 5; + optional uint32 badNum = 6; + optional uint32 tagLen = 7; + optional bytes tagValue = 8; +} \ No newline at end of file diff --git a/proto/oidb/0x89a.proto b/proto/oidb/0x89a.proto new file mode 100644 index 00000000..e5441cd6 --- /dev/null +++ b/proto/oidb/0x89a.proto @@ -0,0 +1,94 @@ +syntax = "proto2"; + +package oidb_0x89a; + +option go_package = "oidb/oidb0x89a;oidb0x89a"; + +message GroupCardPrefix { + optional bytes introduction = 1; + repeated bytes prefix = 2; +} + +message GroupExInfoOnly { + optional uint32 tribeId = 1; + optional uint32 moneyForAddGroup = 2; +} + +message GroupGeoInfo { + optional uint32 cityId = 1; + optional uint64 longtitude = 2; + optional uint64 latitude = 3; + optional bytes geoContent = 4; + optional uint64 poiId = 5; +} + +message GroupNewGuidelinesInfo { + optional bool enabled = 1; + optional bytes content = 2; +} + +message GroupSchoolInfo { + optional bytes location = 1; + optional uint32 grade = 2; + optional bytes school = 3; +} + +message ReqBody { + optional uint64 groupCode = 1; + optional groupInfo stGroupInfo = 2; + optional uint64 originalOperatorUin = 3; + optional uint32 reqGroupOpenAppid = 4; +} + +message RspBody { + optional uint64 groupCode = 1; + optional bytes errorinfo = 2; +} + +message groupInfo { + optional uint32 groupExtAdmNum = 1; + optional uint32 flag = 2; + optional bytes groupName = 3; + optional bytes groupMemo = 4; + optional bytes groupFingerMemo = 5; + optional bytes groupAioSkinUrl = 6; + optional bytes groupBoardSkinUrl = 7; + optional bytes groupCoverSkinUrl = 8; + optional uint32 groupGrade = 9; + optional uint32 activeMemberNum = 10; + optional uint32 certificationType = 11; + optional bytes certificationText = 12; + optional bytes groupRichFingerMemo = 13; + optional GroupNewGuidelinesInfo stGroupNewguidelines = 14; + optional uint32 groupFace = 15; + optional uint32 addOption = 16; + optional uint32 shutupTime = 17; + optional uint32 groupTypeFlag = 18; + repeated bytes groupTag = 19; + optional GroupGeoInfo groupGeoInfo = 20; + optional uint32 groupClassExt = 21; + optional bytes groupClassText = 22; + optional uint32 appPrivilegeFlag = 23; + optional uint32 appPrivilegeMask = 24; + optional GroupExInfoOnly stGroupExInfo = 25; + optional uint32 groupSecLevel = 26; + optional uint32 groupSecLevelInfo = 27; + optional uint64 subscriptionUin = 28; + optional uint32 allowMemberInvite = 29; + optional bytes groupQuestion = 30; + optional bytes groupAnswer = 31; + optional uint32 groupFlagext3 = 32; + optional uint32 groupFlagext3Mask = 33; + optional uint32 groupOpenAppid = 34; + optional uint32 noFingerOpenFlag = 35; + optional uint32 noCodeFingerOpenFlag = 36; + optional uint64 rootId = 37; + optional uint32 msgLimitFrequency = 38; + optional uint32 hlGuildAppid = 39; + optional uint32 hlGuildSubType = 40; + optional uint32 hlGuildOrgid = 41; + optional uint32 groupFlagext4 = 42; + optional uint32 groupFlagext4Mask = 43; + optional bytes groupSchoolInfo = 44; + optional GroupCardPrefix stGroupCardPrefix = 45; +} diff --git a/proto/oidb/0x8a0.proto b/proto/oidb/0x8a0.proto new file mode 100644 index 00000000..633b1d7a --- /dev/null +++ b/proto/oidb/0x8a0.proto @@ -0,0 +1,30 @@ +syntax = "proto2"; + +package oidb_0x8a0; + +option go_package = "oidb/oidb0x8a0;oidb0x8a0"; + +message KickMemberInfo { + optional uint32 operate = 1; + optional uint64 memberUin = 2; + optional uint32 flag = 3; + optional bytes msg = 4; +} + +message KickResult { + optional uint32 result = 1; + optional uint64 memberUin = 2; +} + +message ReqBody { + optional uint64 groupCode = 1; + repeated KickMemberInfo msgKickList = 2; + repeated uint64 kickList = 3; + optional uint32 kickFlag = 4; + optional bytes kickMsg = 5; +} + +message RspBody { + optional uint64 groupCode = 1; + repeated KickResult kickResult = 2; +} diff --git a/proto/oidb/0x8a7.proto b/proto/oidb/0x8a7.proto new file mode 100644 index 00000000..511c60c6 --- /dev/null +++ b/proto/oidb/0x8a7.proto @@ -0,0 +1,22 @@ +syntax = "proto2"; + +package oidb_0x8a7; + +option go_package = "oidb/oidb0x8a7;oidb0x8a7"; + +message ReqBody { + optional uint32 subCmd = 1; + optional uint32 limitIntervalTypeForUin = 2; + optional uint32 limitIntervalTypeForGroup = 3; + optional uint64 uin = 4; + optional uint64 groupCode = 5; +} + +message RspBody { + optional bool canAtAll = 1; + optional uint32 remainAtAllCountForUin = 2; + optional uint32 remainAtAllCountForGroup = 3; + optional bytes promptMsg1 = 4; + optional bytes promptMsg2 = 5; + optional bool showAtAllLable = 6; +} diff --git a/proto/oidb/0x8fc.proto b/proto/oidb/0x8fc.proto new file mode 100644 index 00000000..e788c13e --- /dev/null +++ b/proto/oidb/0x8fc.proto @@ -0,0 +1,73 @@ +syntax = "proto2"; + +package oidb_0x8fc; + +option go_package = "oidb/oidb0x8fc;oidb0x8fc"; + +message CardNameElem { + optional uint32 enumCardType = 1; + optional bytes value = 2; +} + +message ClientInfo { + optional uint32 implat = 1; + optional string clientver = 2; +} + +message CommCardNameBuf { + repeated RichCardNameElem richCardName = 1; + optional uint32 coolId = 2; +} + +message LevelName { + optional uint32 level = 1; + optional string name = 2; +} + +message MemberInfo { + optional uint64 uin = 1; + optional uint32 point = 2; + optional uint32 activeDay = 3; + optional uint32 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 uint32 gender = 12; + optional bytes job = 13; + optional uint32 tribeLevel = 14; + optional uint32 tribePoint = 15; + repeated CardNameElem richCardName = 16; + optional bytes commRichCardName = 17; + optional uint32 ringtoneId = 18; + optional bytes groupHonor = 19; + optional uint32 cmduinFlagEx3Grocery = 20; + optional uint32 cmduinFlagEx3Mask = 21; +} + +message ReqBody { + optional uint64 groupCode = 1; + optional uint32 showFlag = 2; + repeated MemberInfo memLevelInfo = 3; + repeated LevelName levelName = 4; + optional uint32 updateTime = 5; + optional uint32 officeMode = 6; + optional uint32 groupOpenAppid = 7; + optional ClientInfo clientInfo = 8; + optional bytes authKey = 9; + repeated LevelName levelNameNew = 10; +} + +message RichCardNameElem { + optional bytes ctrl = 1; + optional bytes text = 2; +} + +message RspBody { + optional uint64 groupCode = 1; + optional string ErrInfo = 2; + optional bytes coolGroupCardRsp = 3; +} diff --git a/proto/oidb/0x990.proto b/proto/oidb/0x990.proto new file mode 100644 index 00000000..c3e44cb8 --- /dev/null +++ b/proto/oidb/0x990.proto @@ -0,0 +1,44 @@ +syntax = "proto2"; + +package oidb_0x990; + +option go_package = "oidb/oidb0x990;oidb0x990"; + +message BatchTranslateReq { + optional string srcLanguage = 1; + optional string dstLanguage = 2; + repeated bytes srcBytesTextList = 3; +} + +message BatchTranslateRsp { + optional int32 errorCode = 1; + optional bytes errorMsg = 2; + optional string srcLanguage = 3; + optional string dstLanguage = 4; + repeated bytes srcBytesTextList = 5; + repeated bytes dstBytesTextList = 6; +} + +message ReqBody { + optional TranslateReq translateReq = 1; + optional BatchTranslateReq batchTranslateReq = 2; +} + +message RspBody { + optional TranslateRsp translateRsp = 1; + optional BatchTranslateRsp batchTranslateRsp = 2; +} + +message TranslateReq { + optional bytes text = 1; + optional int32 type = 2; + optional string srcLanguage = 3; + optional string dstLanguage = 4; +} + +message TranslateRsp { + optional int32 retCode = 1; + optional int32 type = 2; + optional bytes transResult = 3; + optional int32 textLen = 4; +} diff --git a/proto/oidb/0xb77.proto b/proto/oidb/0xb77.proto new file mode 100644 index 00000000..b35c61eb --- /dev/null +++ b/proto/oidb/0xb77.proto @@ -0,0 +1,132 @@ +syntax = "proto2"; + +package oidb_cmd0xb77; + +option go_package = "oidb/oidb0xb77;oidb0xb77"; + +message ArkJsonBody { + optional string jsonStr = 10; +} + +message ArkMsgBody { + optional string app = 1; + optional string view = 2; + optional string prompt = 3; + optional string ver = 4; + optional string desc = 5; + optional uint32 featureId = 6; + optional string meta = 10; + optional string metaUrl1 = 11; + optional string metaUrl2 = 12; + optional string metaUrl3 = 13; + optional string metaText1 = 14; + optional string metaText2 = 15; + optional string metaText3 = 16; + optional string config = 20; +} + +message ArkV1MsgBody { + optional string app = 1; + optional string view = 2; + optional string prompt = 3; + optional string ver = 4; + optional string desc = 5; + optional uint32 featureId = 6; + optional string meta = 10; + repeated TemplateItem items = 11; + optional string config = 20; +} + +message ClientInfo { + optional uint32 platform = 1; + optional string sdkVersion = 2; + optional string androidPackageName = 3; + optional string androidSignature = 4; + optional string iosBundleId = 5; + optional string pcSign = 6; +} + +message ExtInfo { + repeated uint32 customFeatureid = 11; + optional string apnsWording = 12; + optional uint32 groupSavedbFlag = 13; + optional uint32 receiverAppid = 14; + optional uint64 seq = 15; + optional bytes tagName = 17; + optional bytes messageExt = 18; +} + +message ImageInfo { + optional string md5 = 1; + optional string uuid = 2; + optional uint32 imgType = 3; + optional uint32 fileSize = 4; + optional uint32 width = 5; + optional uint32 height = 6; + optional uint32 original = 7; + optional uint32 fileId = 101; + optional uint32 serverIp = 102; + optional uint32 serverPort = 103; +} + +message MiniAppMsgBody { + optional uint64 miniAppAppid = 1; + optional string miniAppPath = 2; + optional string webPageUrl = 3; + optional uint32 miniAppType = 4; + optional string title = 5; + optional string desc = 6; + optional string jsonStr = 10; +} + +message ReqBody { + optional uint64 appId = 1; + optional uint32 appType = 2; + optional uint32 style = 3; + optional uint64 senderUin = 4; + optional ClientInfo clientInfo = 5; + optional string textMsg = 6; + optional ExtInfo extInfo = 7; + optional uint32 sendType = 10; + optional uint64 recvUin = 11; + optional RichMsgBody richMsgBody = 12; + optional ArkMsgBody arkMsgBody = 13; + optional string recvOpenid = 14; + optional ArkV1MsgBody arkv1MsgBody = 15; + optional ArkJsonBody arkJsonBody = 16; + optional XmlMsgBody xmlMsgBody = 17; + optional MiniAppMsgBody miniAppMsgBody = 18; + optional uint64 recvGuildId = 19; +} + +message RichMsgBody { + optional bool usingArk = 1; + optional string title = 10; + optional string summary = 11; + optional string brief = 12; + optional string url = 13; + optional string pictureUrl = 14; + optional string action = 15; + optional string musicUrl = 16; + optional ImageInfo imageInfo = 21; +} + +message RspBody { + optional string wording = 1; + optional uint32 jumpResult = 2; + optional string jumpUrl = 3; + optional uint32 level = 4; + optional uint32 subLevel = 5; + optional string developMsg = 6; +} + +message TemplateItem { + optional string key = 1; + optional uint32 type = 2; + optional string value = 3; +} + +message XmlMsgBody { + optional uint32 serviceId = 11; + optional string xml = 12; +} diff --git a/proto/oidb/0xbcb.proto b/proto/oidb/0xbcb.proto new file mode 100644 index 00000000..edf02540 --- /dev/null +++ b/proto/oidb/0xbcb.proto @@ -0,0 +1,65 @@ +syntax = "proto2"; + +package oidb_0xbcb; + +option go_package = "oidb/oidb0xbcb;oidb0xbcb"; + +message CheckUrlReq { + repeated string url = 1; + optional string refer = 2; + optional string plateform = 3; + optional string qqPfTo = 4; + optional uint32 type = 5; + optional uint32 from = 6; + optional uint64 chatid = 7; + optional uint64 serviceType = 8; + optional uint64 sendUin = 9; + optional string reqType = 10; + optional string originalUrl = 11; + optional bool isArk = 12; + optional string arkName = 13; + optional bool isFinish = 14; + repeated string srcUrls = 15; + optional uint32 srcPlatform = 16; + optional string qua = 17; +} + +message CheckUrlReqItem { + optional string url = 1; + optional string refer = 2; + optional string plateform = 3; + optional string qqPfTo = 4; + optional uint32 type = 5; + optional uint32 from = 6; + optional uint64 chatid = 7; + optional uint64 serviceType = 8; + optional uint64 sendUin = 9; + optional string reqType = 10; +} + +message CheckUrlRsp { + repeated UrlCheckResult results = 1; + optional uint32 nextReqDuration = 2; +} + +message ReqBody { + optional int32 notUseCache = 9; + optional CheckUrlReq checkUrlReq = 10; +} + +message RspBody { + optional string wording = 1; + optional CheckUrlRsp checkUrlRsp = 10; +} + +message UrlCheckResult { + optional string url = 1; + optional uint32 result = 2; + optional uint32 jumpResult = 3; + optional string jumpUrl = 4; + optional uint32 level = 5; + optional uint32 subLevel = 6; + optional uint32 umrtype = 7; + optional uint32 retFrom = 8; + optional uint64 operationBit = 9; +} diff --git a/proto/oidb/0xd79.proto b/proto/oidb/0xd79.proto new file mode 100644 index 00000000..5d1024c3 --- /dev/null +++ b/proto/oidb/0xd79.proto @@ -0,0 +1,27 @@ +syntax = "proto2"; + +package oidb_0xd79; + +option go_package = "oidb/oidb0xd79;oidb0xd79"; + +message ReqBody { + optional uint64 seq = 1; + optional uint64 uin = 2; + optional uint32 compressFlag = 3; + optional bytes content = 4; + optional uint64 senderUin = 5; + optional bytes qua = 6; + optional bytes wordExt = 7; +} + +message RspBody { + optional uint32 ret = 1; + optional uint64 seq = 2; + optional uint64 uin = 3; + optional uint32 compressFlag = 4; + optional content content = 5; +} + +message content { + repeated bytes sliceContent = 1; +} diff --git a/proto/oidb/0xdad.proto b/proto/oidb/0xdad.proto new file mode 100644 index 00000000..0eb62ed7 --- /dev/null +++ b/proto/oidb/0xdad.proto @@ -0,0 +1,27 @@ +syntax = "proto2"; + +package cmd0xdad; + +option go_package = "oidb/oidb0xdad;oidb0xdad"; + +message LoginSig { + optional uint32 type = 1; + optional bytes sig = 2; + optional uint32 appid = 3; +} + +message ReqBody { + optional int64 client = 1; + optional int64 productId = 2; + optional int64 amount = 3; + optional uint64 toUin = 4; + optional uint64 gc = 5; + optional string ip = 6; + optional string vsersion = 7; + optional LoginSig sig = 8; +} + +message RspBody { + optional int64 retcode = 1; + optional string errmsg = 2; +} diff --git a/proto/oidb/0xe07.proto b/proto/oidb/0xe07.proto new file mode 100644 index 00000000..bcd5aaf5 --- /dev/null +++ b/proto/oidb/0xe07.proto @@ -0,0 +1,64 @@ +syntax = "proto2"; + +package oidb_0xe07; + +option go_package = "oidb/oidb0xe07;oidb0xe07"; + +message Coordinate { + optional int32 X = 1; + optional int32 Y = 2; +} + +message Language { + optional string language = 1; + optional string languageDesc = 2; +} + +message OCRReqBody { + optional string imageUrl = 1; + optional string languageType = 2; + optional string scene = 3; + optional string originMd5 = 10; + optional string afterCompressMd5 = 11; + optional uint32 afterCompressFileSize = 12; + optional uint32 afterCompressWeight = 13; + optional uint32 afterCompressHeight = 14; + optional bool isCut = 15; +} + +message OCRRspBody { + repeated TextDetection textDetections = 1; + optional string language = 2; + optional string requestId = 3; + repeated string ocrLanguageList = 101; + repeated string dstTranslateLanguageList = 102; + repeated Language languageList = 103; + optional uint32 afterCompressWeight = 111; + optional uint32 afterCompressHeight = 112; +} + +message Polygon { + repeated Coordinate coordinates = 1; +} + +message ReqBody { + optional uint32 version = 1; + optional uint32 client = 2; + optional uint32 entrance = 3; + optional OCRReqBody ocrReqBody = 10; +} + +message RspBody { + optional int32 retCode = 1; + optional string errMsg = 2; + optional string wording = 3; + optional OCRRspBody ocrRspBody = 10; +} + +message TextDetection { + optional string detectedText = 1; + optional uint32 confidence = 2; + optional Polygon polygon = 3; + optional string advancedInfo = 4; +} + diff --git a/proto/oidb/0xeac.proto b/proto/oidb/0xeac.proto new file mode 100644 index 00000000..c9d0d0f0 --- /dev/null +++ b/proto/oidb/0xeac.proto @@ -0,0 +1,131 @@ +syntax = "proto2"; + +package oidb_0xeac; + +option go_package = "oidb/oidb0xeac;oidb0xeac"; + +message ArkMsg { + optional string appName = 1; + optional string json = 2; +} + +message BatchReqBody { + optional uint64 groupCode = 1; + repeated MsgInfo msgs = 2; +} + +message BatchRspBody { + optional string wording = 1; + optional uint32 errorCode = 2; + optional int32 succCnt = 3; + repeated MsgProcessInfo procInfos = 4; + optional uint32 digestTime = 5; +} + +message DigestMsg { + optional uint64 groupCode = 1; + optional uint32 seq = 2; + optional uint32 random = 3; + repeated MsgElem content = 4; + optional uint64 textSize = 5; + optional uint64 picSize = 6; + optional uint64 videoSize = 7; + optional uint64 senderUin = 8; + optional uint32 senderTime = 9; + optional uint64 addDigestUin = 10; + optional uint32 addDigestTime = 11; + optional uint32 startTime = 12; + optional uint32 latestMsgSeq = 13; + optional uint32 opType = 14; +} + +message FaceMsg { + optional uint32 index = 1; + optional string text = 2; +} + +message GroupFileMsg { + optional bytes fileName = 1; + optional uint32 busId = 2; + optional string fileId = 3; + optional uint64 fileSize = 4; + optional uint64 deadTime = 5; + optional bytes fileSha1 = 6; + optional bytes ext = 7; + optional bytes fileMd5 = 8; +} + +message ImageMsg { + optional string md5 = 1; + optional string uuid = 2; + optional uint32 imgType = 3; + optional uint32 fileSize = 4; + optional uint32 width = 5; + optional uint32 height = 6; + optional uint32 fileId = 101; + optional uint32 serverIp = 102; + optional uint32 serverPort = 103; + optional string filePath = 104; + optional string thumbUrl = 201; + optional string originalUrl = 202; + optional string resaveUrl = 203; +} + +message MsgElem { + optional uint32 type = 1; + optional TextMsg textMsg = 11; + optional FaceMsg faceMsg = 12; + optional ImageMsg imageMsg = 13; + optional GroupFileMsg groupFileMsg = 14; + optional ShareMsg shareMsg = 15; + optional RichMsg richMsg = 16; + optional ArkMsg arkMsg = 17; +} + +message MsgInfo { + optional uint32 seq = 1; + optional uint32 random = 2; +} + +message MsgProcessInfo { + optional MsgInfo msg = 1; + optional uint32 errorCode = 2; + optional uint64 digestUin = 3; + optional uint32 digestTime = 4; +} + +message ReqBody { + optional uint64 groupCode = 1; + optional uint32 seq = 2; + optional uint32 random = 3; +} + +message RichMsg { + optional uint32 serviceId = 1; + optional string xml = 2; + optional string longMsgResid = 3; +} + +message RspBody { + optional string wording = 1; + optional uint64 digestUin = 2; + optional uint32 digestTime = 3; + optional DigestMsg msg = 4; + optional uint32 errorCode = 10; +} + +message ShareMsg { + optional string type = 1; + optional string title = 2; + optional string summary = 3; + optional string brief = 4; + optional string url = 5; + optional string pictureUrl = 6; + optional string action = 7; + optional string source = 8; + optional string sourceUrl = 9; +} + +message TextMsg { + optional bytes str = 1; +} diff --git a/proto/oidb/0xed3.proto b/proto/oidb/0xed3.proto new file mode 100644 index 00000000..0a2837d4 --- /dev/null +++ b/proto/oidb/0xed3.proto @@ -0,0 +1,14 @@ +syntax = "proto2"; + +package oidb_cmd0xed3; + +option go_package = "oidb/oidb0xed3;oidb0xed3"; + +message ReqBody { + optional uint64 toUin = 1; + optional uint64 groupCode = 2; + optional uint32 msgSeq = 3; + optional uint32 msgRand = 4; + optional uint64 aioUin = 5; + optional uint32 nudgeType = 6; +} diff --git a/proto/oidb/0xef0.proto b/proto/oidb/0xef0.proto new file mode 100644 index 00000000..89ed9aab --- /dev/null +++ b/proto/oidb/0xef0.proto @@ -0,0 +1,32 @@ +syntax = "proto2"; + +package oidb_0xef0; + +option go_package = "oidb/oidb0xef0;oidb0xef0"; + +message GroupInfoExt { + optional uint32 groupInfoExtSeq = 1; + optional uint64 luckyWordId = 2; + optional uint32 lightCharNum = 3; + optional bytes luckyWord = 4; + optional uint32 starId = 5; + optional uint32 essentialMsgSwitch = 6; + optional uint32 todoSeq = 7; + optional uint32 blacklistExpireTime = 8; +} + +message ReqBody { + repeated uint64 groupCode = 1; + optional GroupInfoExt groupInfoExt = 2; +} + +message RspBody { + repeated RspDetail rspDetail = 1; +} + +message RspDetail { + optional uint64 groupCode = 1; + optional int32 result = 2; + optional GroupInfoExt groupInfoExt = 3; +} + diff --git a/proto/oidb/sso.proto b/proto/oidb/sso.proto new file mode 100644 index 00000000..7711359c --- /dev/null +++ b/proto/oidb/sso.proto @@ -0,0 +1,14 @@ +syntax = "proto2"; + +package oidb; + +option go_package = "oidb;oidb"; + +message OIDBSSOPkg { + optional uint32 command = 1; + optional uint32 serviceType = 2; + optional uint32 result = 3; + optional bytes bodybuffer = 4; + optional string errorMsg = 5; + optional string clientVersion = 6; +} \ No newline at end of file