diff --git a/binary/pool.go b/binary/pool.go index 5379f239..9f6e3f05 100644 --- a/binary/pool.go +++ b/binary/pool.go @@ -14,8 +14,8 @@ var bufferPool = sync.Pool{ }, } -// NewWriter 从池中取出一个 Writer -func NewWriter() *Writer { +// SelectWriter 从池中取出一个 Writer +func SelectWriter() *Writer { w := bufferPool.Get().(*Writer) if w == nil { return new(Writer) diff --git a/binary/writer.go b/binary/writer.go index aef161a2..37e99d2d 100644 --- a/binary/writer.go +++ b/binary/writer.go @@ -12,7 +12,7 @@ import ( type Writer bytes.Buffer func NewWriterF(f func(writer *Writer)) []byte { - w := NewWriter() + w := SelectWriter() f(w) b := append([]byte(nil), w.Bytes()...) PutWriter(w) @@ -81,7 +81,7 @@ func (w *Writer) WriteIntLvPacket(offset int, f func(writer *Writer)) { } func (w *Writer) WriteUniPacket(commandName string, sessionId, extraData, body []byte) { - w1 := NewWriter() + w1 := SelectWriter() { // WriteIntLvPacket w1.WriteString(commandName) w1.WriteUInt32(8) diff --git a/client/builders.go b/client/builders.go index 83b1b401..a98df673 100644 --- a/client/builders.go +++ b/client/builders.go @@ -7,8 +7,6 @@ import ( "math/rand" "time" - "google.golang.org/protobuf/proto" - "github.com/Mrs4s/MiraiGo/binary" "github.com/Mrs4s/MiraiGo/binary/jce" "github.com/Mrs4s/MiraiGo/client/pb" @@ -20,6 +18,7 @@ import ( "github.com/Mrs4s/MiraiGo/client/pb/structmsg" "github.com/Mrs4s/MiraiGo/internal/crypto" "github.com/Mrs4s/MiraiGo/internal/packets" + "github.com/Mrs4s/MiraiGo/internal/proto" "github.com/Mrs4s/MiraiGo/internal/tlv" ) diff --git a/client/c2c_processor.go b/client/c2c_processor.go index 2d25df9e..c5434604 100644 --- a/client/c2c_processor.go +++ b/client/c2c_processor.go @@ -8,11 +8,11 @@ import ( "time" "github.com/pkg/errors" - "google.golang.org/protobuf/proto" "github.com/Mrs4s/MiraiGo/binary" "github.com/Mrs4s/MiraiGo/client/pb" "github.com/Mrs4s/MiraiGo/client/pb/msg" + "github.com/Mrs4s/MiraiGo/internal/proto" ) type ( diff --git a/client/decoders.go b/client/decoders.go index 22602626..a1f45a15 100644 --- a/client/decoders.go +++ b/client/decoders.go @@ -11,7 +11,6 @@ import ( "time" "github.com/pkg/errors" - "google.golang.org/protobuf/proto" "github.com/Mrs4s/MiraiGo/binary" "github.com/Mrs4s/MiraiGo/binary/jce" @@ -23,6 +22,7 @@ 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/proto" "github.com/Mrs4s/MiraiGo/utils" ) diff --git a/client/face.go b/client/face.go index 0905748f..2f2500f3 100644 --- a/client/face.go +++ b/client/face.go @@ -4,10 +4,10 @@ import ( "fmt" "github.com/pkg/errors" - "google.golang.org/protobuf/proto" "github.com/Mrs4s/MiraiGo/client/pb/faceroam" "github.com/Mrs4s/MiraiGo/internal/packets" + "github.com/Mrs4s/MiraiGo/internal/proto" ) type CustomFace struct { diff --git a/client/global.go b/client/global.go index 5fb5d75f..56d24df8 100644 --- a/client/global.go +++ b/client/global.go @@ -13,13 +13,13 @@ import ( "time" "github.com/pkg/errors" - "google.golang.org/protobuf/proto" "github.com/Mrs4s/MiraiGo/binary" "github.com/Mrs4s/MiraiGo/binary/jce" devinfo "github.com/Mrs4s/MiraiGo/client/pb" "github.com/Mrs4s/MiraiGo/client/pb/msg" "github.com/Mrs4s/MiraiGo/client/pb/oidb" + "github.com/Mrs4s/MiraiGo/internal/proto" "github.com/Mrs4s/MiraiGo/message" "github.com/Mrs4s/MiraiGo/utils" ) diff --git a/client/group_file.go b/client/group_file.go index e838ea98..2e53ee80 100644 --- a/client/group_file.go +++ b/client/group_file.go @@ -10,11 +10,11 @@ import ( "runtime/debug" "github.com/pkg/errors" - "google.golang.org/protobuf/proto" "github.com/Mrs4s/MiraiGo/client/pb/exciting" "github.com/Mrs4s/MiraiGo/client/pb/oidb" "github.com/Mrs4s/MiraiGo/internal/packets" + "github.com/Mrs4s/MiraiGo/internal/proto" "github.com/Mrs4s/MiraiGo/utils" ) diff --git a/client/group_info.go b/client/group_info.go index 3a59a45b..c103c904 100644 --- a/client/group_info.go +++ b/client/group_info.go @@ -10,13 +10,13 @@ import ( "sync" "github.com/pkg/errors" - "google.golang.org/protobuf/proto" "github.com/Mrs4s/MiraiGo/binary" "github.com/Mrs4s/MiraiGo/binary/jce" "github.com/Mrs4s/MiraiGo/client/pb/oidb" "github.com/Mrs4s/MiraiGo/client/pb/profilecard" "github.com/Mrs4s/MiraiGo/internal/packets" + "github.com/Mrs4s/MiraiGo/internal/proto" "github.com/Mrs4s/MiraiGo/utils" ) diff --git a/client/group_msg.go b/client/group_msg.go index 2be8c3c8..83ee0767 100644 --- a/client/group_msg.go +++ b/client/group_msg.go @@ -12,13 +12,13 @@ import ( "time" "github.com/pkg/errors" - "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/client/pb/oidb" "github.com/Mrs4s/MiraiGo/internal/packets" + "github.com/Mrs4s/MiraiGo/internal/proto" "github.com/Mrs4s/MiraiGo/message" "github.com/Mrs4s/MiraiGo/utils" ) diff --git a/client/guild.go b/client/guild.go index d708cf00..acb86fce 100644 --- a/client/guild.go +++ b/client/guild.go @@ -6,11 +6,11 @@ import ( "time" "github.com/pkg/errors" - "google.golang.org/protobuf/proto" "github.com/Mrs4s/MiraiGo/binary" "github.com/Mrs4s/MiraiGo/client/pb/channel" "github.com/Mrs4s/MiraiGo/internal/packets" + "github.com/Mrs4s/MiraiGo/internal/proto" "github.com/Mrs4s/MiraiGo/utils" ) @@ -308,8 +308,8 @@ func (s *GuildService) GetGuildRoles(guildId uint64) ([]*GuildRole, error) { if err = s.c.unpackOIDBPackage(rsp, body); err != nil { return nil, errors.Wrap(err, "decode packet error") } - roles := make([]*GuildRole, 0, len(body.Roles)) - for _, role := range body.Roles { + roles := make([]*GuildRole, 0, len(body.GetRoles())) + for _, role := range body.GetRoles() { roles = append(roles, &GuildRole{ RoleId: role.GetRoleId(), RoleName: role.GetName(), @@ -324,6 +324,42 @@ func (s *GuildService) GetGuildRoles(guildId uint64) ([]*GuildRole, error) { return roles, nil } +func (s *GuildService) GetUserRoles(guildId uint64, userId uint64) ([]*GuildRole, error) { + seq := s.c.nextSeq() + u1 := uint32(1) + packet := packets.BuildUniPacket(s.c.Uin, seq, "OidbSvcTrpcTcp.0x1017_1", 1, s.c.OutGoingPacketSessionId, []byte{}, s.c.sigInfo.d2Key, + s.c.packOIDBPackageDynamically(4119, 1, binary.DynamicProtoMessage{ + 1: guildId, + 2: userId, + 4: binary.DynamicProtoMessage{ + 1: u1, + 2: u1, + 3: u1, + }, + })) + rsp, err := s.c.sendAndWaitDynamic(seq, packet) + if err != nil { + return nil, errors.Wrap(err, "send packet error") + } + body := new(channel.ChannelOidb0X1017Rsp) + if err = s.c.unpackOIDBPackage(rsp, body); err != nil { + return nil, errors.Wrap(err, "decode packet error") + } + p1 := body.GetP1() + if p1 == nil { + return nil, errors.New("packet OidbSvcTrpcTcp.0x1017_1: decode p1 error") + } + roles := make([]*GuildRole, 0, len(p1.GetRoles())) + for _, role := range p1.GetRoles() { + roles = append(roles, &GuildRole{ + RoleId: role.GetRoleId(), + RoleName: role.GetName(), + ArgbColor: role.GetArgbColor(), + }) + } + return roles, nil +} + func (s *GuildService) CreateGuildRole(guildId uint64, name string, color uint32, independent bool, initialUsers []uint64) (uint64, error) { seq := s.c.nextSeq() u1 := uint32(1) @@ -369,7 +405,6 @@ func (s *GuildService) DeleteGuildRole(guildId uint64, roleId uint64) error { func (s *GuildService) SetUserRoleInGuild(guildId uint64, set bool, roleId uint64, user []uint64) error { // remove => p2 = false seq := s.c.nextSeq() - var packet []byte setOrRemove := binary.DynamicProtoMessage{ 1: roleId, } @@ -378,7 +413,7 @@ func (s *GuildService) SetUserRoleInGuild(guildId uint64, set bool, roleId uint6 } else { setOrRemove[3] = user } - packet = packets.BuildUniPacket(s.c.Uin, seq, "OidbSvcTrpcTcp.0x101a_1", 1, s.c.OutGoingPacketSessionId, []byte{}, s.c.sigInfo.d2Key, + packet := packets.BuildUniPacket(s.c.Uin, seq, "OidbSvcTrpcTcp.0x101a_1", 1, s.c.OutGoingPacketSessionId, []byte{}, s.c.sigInfo.d2Key, s.c.packOIDBPackageDynamically(4122, 1, binary.DynamicProtoMessage{ 1: guildId, 2: setOrRemove, diff --git a/client/guild_eventflow.go b/client/guild_eventflow.go index e1f97154..5aeef6dd 100644 --- a/client/guild_eventflow.go +++ b/client/guild_eventflow.go @@ -5,11 +5,11 @@ import ( "time" "github.com/pkg/errors" - "google.golang.org/protobuf/proto" "github.com/Mrs4s/MiraiGo/client/pb/channel" "github.com/Mrs4s/MiraiGo/client/pb/msg" "github.com/Mrs4s/MiraiGo/internal/packets" + "github.com/Mrs4s/MiraiGo/internal/proto" ) func init() { diff --git a/client/guild_msg.go b/client/guild_msg.go index 1d29f776..a6b6b200 100644 --- a/client/guild_msg.go +++ b/client/guild_msg.go @@ -11,7 +11,6 @@ import ( "strconv" "github.com/pkg/errors" - "google.golang.org/protobuf/proto" "github.com/Mrs4s/MiraiGo/binary" "github.com/Mrs4s/MiraiGo/client/pb/channel" @@ -19,6 +18,7 @@ import ( "github.com/Mrs4s/MiraiGo/client/pb/msg" "github.com/Mrs4s/MiraiGo/client/pb/pttcenter" "github.com/Mrs4s/MiraiGo/internal/packets" + "github.com/Mrs4s/MiraiGo/internal/proto" "github.com/Mrs4s/MiraiGo/message" "github.com/Mrs4s/MiraiGo/utils" ) diff --git a/client/highway.go b/client/highway.go index e409e065..252c7bee 100644 --- a/client/highway.go +++ b/client/highway.go @@ -16,10 +16,10 @@ import ( "github.com/pkg/errors" "golang.org/x/sync/errgroup" - "google.golang.org/protobuf/proto" "github.com/Mrs4s/MiraiGo/binary" "github.com/Mrs4s/MiraiGo/client/pb" + "github.com/Mrs4s/MiraiGo/internal/proto" "github.com/Mrs4s/MiraiGo/utils" ) @@ -49,7 +49,7 @@ func (c *QQClient) highwayUploadStream(ip uint32, port int, updKey []byte, strea chunk := *buf defer binary.Put256KBytes(buf) - w := binary.NewWriter() + w := binary.SelectWriter() defer binary.PutWriter(w) for { chunk = chunk[:chunkSize] @@ -134,7 +134,7 @@ func (c *QQClient) highwayUploadByBDH(stream io.Reader, length int64, cmdId int3 chunk := *buf defer binary.Put256KBytes(buf) - w := binary.NewWriter() + w := binary.SelectWriter() defer binary.PutWriter(w) for { chunk = chunk[:chunkSize] @@ -270,7 +270,7 @@ func (c *QQClient) highwayUploadFileMultiThreadingByBDH(path string, cmdId int32 return errors.Wrap(err, "echo error") } buffer := make([]byte, blockSize) - w := binary.NewWriter() + w := binary.SelectWriter() w.Reset() w.Grow(600 * 1024) // 复用,600k 不要放回池中 for { @@ -368,7 +368,7 @@ func (c *QQClient) highwaySendHeartbreak(conn net.Conn) error { LocaleId: 2052, }, }) - w := binary.NewWriter() + w := binary.SelectWriter() w.WriteByte(40) w.WriteUInt32(uint32(len(head))) w.WriteUInt32(0) @@ -406,7 +406,7 @@ func (c *QQClient) excitingUploadStream(stream io.ReadSeeker, cmdId int32, ticke chunkSize = 524288 ) chunk := make([]byte, chunkSize) - w := binary.NewWriter() + w := binary.SelectWriter() w.Reset() w.Grow(600 * 1024) // 复用,600k 不要放回池中 for { diff --git a/client/http_api.go b/client/http_api.go index 69a71698..03ecda5e 100644 --- a/client/http_api.go +++ b/client/http_api.go @@ -14,10 +14,10 @@ import ( "strings" "github.com/pkg/errors" - "google.golang.org/protobuf/proto" "github.com/Mrs4s/MiraiGo/binary" "github.com/Mrs4s/MiraiGo/client/pb/richmedia" + "github.com/Mrs4s/MiraiGo/internal/proto" "github.com/Mrs4s/MiraiGo/utils" ) @@ -132,7 +132,7 @@ func (c *QQClient) GetTts(text string) ([]byte, error) { return nil, errors.Wrap(err, "failed to post to tts server") } ttsReader := binary.NewReader(rsp) - ttsWriter := binary.NewWriter() + ttsWriter := binary.SelectWriter() for { // 数据格式 69e(字符串) 十六进制 数据长度 0 为结尾 // 0D 0A (分隔符) payload 0D 0A diff --git a/client/image.go b/client/image.go index 22478324..b096767a 100644 --- a/client/image.go +++ b/client/image.go @@ -13,13 +13,13 @@ import ( "time" "github.com/pkg/errors" - "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/client/pb/oidb" "github.com/Mrs4s/MiraiGo/internal/packets" + "github.com/Mrs4s/MiraiGo/internal/proto" "github.com/Mrs4s/MiraiGo/message" "github.com/Mrs4s/MiraiGo/utils" ) diff --git a/client/multimsg.go b/client/multimsg.go index e3152fee..c2d3f478 100644 --- a/client/multimsg.go +++ b/client/multimsg.go @@ -4,13 +4,13 @@ import ( "fmt" "github.com/pkg/errors" - "google.golang.org/protobuf/proto" "github.com/Mrs4s/MiraiGo/binary" "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/proto" "github.com/Mrs4s/MiraiGo/utils" ) diff --git a/client/offline_file.go b/client/offline_file.go index 83f01879..f14774a5 100644 --- a/client/offline_file.go +++ b/client/offline_file.go @@ -2,10 +2,10 @@ package client import ( "github.com/pkg/errors" - "google.golang.org/protobuf/proto" "github.com/Mrs4s/MiraiGo/client/pb/cmd0x346" "github.com/Mrs4s/MiraiGo/internal/packets" + "github.com/Mrs4s/MiraiGo/internal/proto" ) func init() { diff --git a/client/online_push.go b/client/online_push.go index 4f2b9d06..2718a930 100644 --- a/client/online_push.go +++ b/client/online_push.go @@ -6,13 +6,13 @@ import ( "time" "github.com/pkg/errors" - "google.golang.org/protobuf/proto" "github.com/Mrs4s/MiraiGo/binary" "github.com/Mrs4s/MiraiGo/binary/jce" "github.com/Mrs4s/MiraiGo/client/pb" "github.com/Mrs4s/MiraiGo/client/pb/msgtype0x210" "github.com/Mrs4s/MiraiGo/client/pb/notify" + "github.com/Mrs4s/MiraiGo/internal/proto" ) var msg0x210Decoders = map[int64]func(*QQClient, []byte) error{ diff --git a/client/pb/channel/unknown.pb.go b/client/pb/channel/unknown.pb.go index 9dd44716..82473205 100644 --- a/client/pb/channel/unknown.pb.go +++ b/client/pb/channel/unknown.pb.go @@ -345,6 +345,108 @@ func (x *ChannelOidb0Xf5DRsp) GetRsp() *ChannelListRsp { return nil } +type ChannelOidb0X1017Rsp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + P1 *P10X1017 `protobuf:"bytes,1,opt,name=p1" json:"p1,omitempty"` +} + +func (x *ChannelOidb0X1017Rsp) Reset() { + *x = ChannelOidb0X1017Rsp{} + if protoimpl.UnsafeEnabled { + mi := &file_pb_channel_unknown_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChannelOidb0X1017Rsp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChannelOidb0X1017Rsp) ProtoMessage() {} + +func (x *ChannelOidb0X1017Rsp) ProtoReflect() protoreflect.Message { + mi := &file_pb_channel_unknown_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChannelOidb0X1017Rsp.ProtoReflect.Descriptor instead. +func (*ChannelOidb0X1017Rsp) Descriptor() ([]byte, []int) { + return file_pb_channel_unknown_proto_rawDescGZIP(), []int{6} +} + +func (x *ChannelOidb0X1017Rsp) GetP1() *P10X1017 { + if x != nil { + return x.P1 + } + return nil +} + +type P10X1017 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserId *uint64 `protobuf:"varint,1,opt,name=userId" json:"userId,omitempty"` + Roles []*GuildRole `protobuf:"bytes,3,rep,name=roles" json:"roles,omitempty"` +} + +func (x *P10X1017) Reset() { + *x = P10X1017{} + if protoimpl.UnsafeEnabled { + mi := &file_pb_channel_unknown_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *P10X1017) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*P10X1017) ProtoMessage() {} + +func (x *P10X1017) ProtoReflect() protoreflect.Message { + mi := &file_pb_channel_unknown_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use P10X1017.ProtoReflect.Descriptor instead. +func (*P10X1017) Descriptor() ([]byte, []int) { + return file_pb_channel_unknown_proto_rawDescGZIP(), []int{7} +} + +func (x *P10X1017) GetUserId() uint64 { + if x != nil && x.UserId != nil { + return *x.UserId + } + return 0 +} + +func (x *P10X1017) GetRoles() []*GuildRole { + if x != nil { + return x.Roles + } + return nil +} + type ChannelOidb0X1019Rsp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -357,7 +459,7 @@ type ChannelOidb0X1019Rsp struct { func (x *ChannelOidb0X1019Rsp) Reset() { *x = ChannelOidb0X1019Rsp{} if protoimpl.UnsafeEnabled { - mi := &file_pb_channel_unknown_proto_msgTypes[6] + mi := &file_pb_channel_unknown_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -370,7 +472,7 @@ func (x *ChannelOidb0X1019Rsp) String() string { func (*ChannelOidb0X1019Rsp) ProtoMessage() {} func (x *ChannelOidb0X1019Rsp) ProtoReflect() protoreflect.Message { - mi := &file_pb_channel_unknown_proto_msgTypes[6] + mi := &file_pb_channel_unknown_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -383,7 +485,7 @@ func (x *ChannelOidb0X1019Rsp) ProtoReflect() protoreflect.Message { // Deprecated: Use ChannelOidb0X1019Rsp.ProtoReflect.Descriptor instead. func (*ChannelOidb0X1019Rsp) Descriptor() ([]byte, []int) { - return file_pb_channel_unknown_proto_rawDescGZIP(), []int{6} + return file_pb_channel_unknown_proto_rawDescGZIP(), []int{8} } func (x *ChannelOidb0X1019Rsp) GetGuildId() uint64 { @@ -411,7 +513,7 @@ type ChannelOidb0X1016Rsp struct { func (x *ChannelOidb0X1016Rsp) Reset() { *x = ChannelOidb0X1016Rsp{} if protoimpl.UnsafeEnabled { - mi := &file_pb_channel_unknown_proto_msgTypes[7] + mi := &file_pb_channel_unknown_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -424,7 +526,7 @@ func (x *ChannelOidb0X1016Rsp) String() string { func (*ChannelOidb0X1016Rsp) ProtoMessage() {} func (x *ChannelOidb0X1016Rsp) ProtoReflect() protoreflect.Message { - mi := &file_pb_channel_unknown_proto_msgTypes[7] + mi := &file_pb_channel_unknown_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -437,7 +539,7 @@ func (x *ChannelOidb0X1016Rsp) ProtoReflect() protoreflect.Message { // Deprecated: Use ChannelOidb0X1016Rsp.ProtoReflect.Descriptor instead. func (*ChannelOidb0X1016Rsp) Descriptor() ([]byte, []int) { - return file_pb_channel_unknown_proto_rawDescGZIP(), []int{7} + return file_pb_channel_unknown_proto_rawDescGZIP(), []int{9} } func (x *ChannelOidb0X1016Rsp) GetRoleId() uint64 { @@ -459,7 +561,7 @@ type GuildMetaRsp struct { func (x *GuildMetaRsp) Reset() { *x = GuildMetaRsp{} if protoimpl.UnsafeEnabled { - mi := &file_pb_channel_unknown_proto_msgTypes[8] + mi := &file_pb_channel_unknown_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -472,7 +574,7 @@ func (x *GuildMetaRsp) String() string { func (*GuildMetaRsp) ProtoMessage() {} func (x *GuildMetaRsp) ProtoReflect() protoreflect.Message { - mi := &file_pb_channel_unknown_proto_msgTypes[8] + mi := &file_pb_channel_unknown_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -485,7 +587,7 @@ func (x *GuildMetaRsp) ProtoReflect() protoreflect.Message { // Deprecated: Use GuildMetaRsp.ProtoReflect.Descriptor instead. func (*GuildMetaRsp) Descriptor() ([]byte, []int) { - return file_pb_channel_unknown_proto_rawDescGZIP(), []int{8} + return file_pb_channel_unknown_proto_rawDescGZIP(), []int{10} } func (x *GuildMetaRsp) GetGuildId() uint64 { @@ -514,7 +616,7 @@ type ChannelListRsp struct { func (x *ChannelListRsp) Reset() { *x = ChannelListRsp{} if protoimpl.UnsafeEnabled { - mi := &file_pb_channel_unknown_proto_msgTypes[9] + mi := &file_pb_channel_unknown_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -527,7 +629,7 @@ func (x *ChannelListRsp) String() string { func (*ChannelListRsp) ProtoMessage() {} func (x *ChannelListRsp) ProtoReflect() protoreflect.Message { - mi := &file_pb_channel_unknown_proto_msgTypes[9] + mi := &file_pb_channel_unknown_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -540,7 +642,7 @@ func (x *ChannelListRsp) ProtoReflect() protoreflect.Message { // Deprecated: Use ChannelListRsp.ProtoReflect.Descriptor instead. func (*ChannelListRsp) Descriptor() ([]byte, []int) { - return file_pb_channel_unknown_proto_rawDescGZIP(), []int{9} + return file_pb_channel_unknown_proto_rawDescGZIP(), []int{11} } func (x *ChannelListRsp) GetGuildId() uint64 { @@ -568,7 +670,7 @@ type GuildAdminInfo struct { func (x *GuildAdminInfo) Reset() { *x = GuildAdminInfo{} if protoimpl.UnsafeEnabled { - mi := &file_pb_channel_unknown_proto_msgTypes[10] + mi := &file_pb_channel_unknown_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -581,7 +683,7 @@ func (x *GuildAdminInfo) String() string { func (*GuildAdminInfo) ProtoMessage() {} func (x *GuildAdminInfo) ProtoReflect() protoreflect.Message { - mi := &file_pb_channel_unknown_proto_msgTypes[10] + mi := &file_pb_channel_unknown_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -594,7 +696,7 @@ func (x *GuildAdminInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use GuildAdminInfo.ProtoReflect.Descriptor instead. func (*GuildAdminInfo) Descriptor() ([]byte, []int) { - return file_pb_channel_unknown_proto_rawDescGZIP(), []int{10} + return file_pb_channel_unknown_proto_rawDescGZIP(), []int{12} } func (x *GuildAdminInfo) GetAdmins() []*GuildMemberInfo { @@ -619,7 +721,7 @@ type GuildMemberInfo struct { func (x *GuildMemberInfo) Reset() { *x = GuildMemberInfo{} if protoimpl.UnsafeEnabled { - mi := &file_pb_channel_unknown_proto_msgTypes[11] + mi := &file_pb_channel_unknown_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -632,7 +734,7 @@ func (x *GuildMemberInfo) String() string { func (*GuildMemberInfo) ProtoMessage() {} func (x *GuildMemberInfo) ProtoReflect() protoreflect.Message { - mi := &file_pb_channel_unknown_proto_msgTypes[11] + mi := &file_pb_channel_unknown_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -645,7 +747,7 @@ func (x *GuildMemberInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use GuildMemberInfo.ProtoReflect.Descriptor instead. func (*GuildMemberInfo) Descriptor() ([]byte, []int) { - return file_pb_channel_unknown_proto_rawDescGZIP(), []int{11} + return file_pb_channel_unknown_proto_rawDescGZIP(), []int{13} } func (x *GuildMemberInfo) GetTitle() string { @@ -699,7 +801,7 @@ type GuildUserProfile struct { func (x *GuildUserProfile) Reset() { *x = GuildUserProfile{} if protoimpl.UnsafeEnabled { - mi := &file_pb_channel_unknown_proto_msgTypes[12] + mi := &file_pb_channel_unknown_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -712,7 +814,7 @@ func (x *GuildUserProfile) String() string { func (*GuildUserProfile) ProtoMessage() {} func (x *GuildUserProfile) ProtoReflect() protoreflect.Message { - mi := &file_pb_channel_unknown_proto_msgTypes[12] + mi := &file_pb_channel_unknown_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -725,7 +827,7 @@ func (x *GuildUserProfile) ProtoReflect() protoreflect.Message { // Deprecated: Use GuildUserProfile.ProtoReflect.Descriptor instead. func (*GuildUserProfile) Descriptor() ([]byte, []int) { - return file_pb_channel_unknown_proto_rawDescGZIP(), []int{12} + return file_pb_channel_unknown_proto_rawDescGZIP(), []int{14} } func (x *GuildUserProfile) GetTinyId() uint64 { @@ -774,7 +876,7 @@ type GuildRole struct { func (x *GuildRole) Reset() { *x = GuildRole{} if protoimpl.UnsafeEnabled { - mi := &file_pb_channel_unknown_proto_msgTypes[13] + mi := &file_pb_channel_unknown_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -787,7 +889,7 @@ func (x *GuildRole) String() string { func (*GuildRole) ProtoMessage() {} func (x *GuildRole) ProtoReflect() protoreflect.Message { - mi := &file_pb_channel_unknown_proto_msgTypes[13] + mi := &file_pb_channel_unknown_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -800,7 +902,7 @@ func (x *GuildRole) ProtoReflect() protoreflect.Message { // Deprecated: Use GuildRole.ProtoReflect.Descriptor instead. func (*GuildRole) Descriptor() ([]byte, []int) { - return file_pb_channel_unknown_proto_rawDescGZIP(), []int{13} + return file_pb_channel_unknown_proto_rawDescGZIP(), []int{15} } func (x *GuildRole) GetRoleId() uint64 { @@ -881,7 +983,7 @@ type GuildMeta struct { func (x *GuildMeta) Reset() { *x = GuildMeta{} if protoimpl.UnsafeEnabled { - mi := &file_pb_channel_unknown_proto_msgTypes[14] + mi := &file_pb_channel_unknown_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -894,7 +996,7 @@ func (x *GuildMeta) String() string { func (*GuildMeta) ProtoMessage() {} func (x *GuildMeta) ProtoReflect() protoreflect.Message { - mi := &file_pb_channel_unknown_proto_msgTypes[14] + mi := &file_pb_channel_unknown_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -907,7 +1009,7 @@ func (x *GuildMeta) ProtoReflect() protoreflect.Message { // Deprecated: Use GuildMeta.ProtoReflect.Descriptor instead. func (*GuildMeta) Descriptor() ([]byte, []int) { - return file_pb_channel_unknown_proto_rawDescGZIP(), []int{14} + return file_pb_channel_unknown_proto_rawDescGZIP(), []int{16} } func (x *GuildMeta) GetGuildCode() uint64 { @@ -1019,7 +1121,7 @@ type GuildChannelInfo struct { func (x *GuildChannelInfo) Reset() { *x = GuildChannelInfo{} if protoimpl.UnsafeEnabled { - mi := &file_pb_channel_unknown_proto_msgTypes[15] + mi := &file_pb_channel_unknown_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1032,7 +1134,7 @@ func (x *GuildChannelInfo) String() string { func (*GuildChannelInfo) ProtoMessage() {} func (x *GuildChannelInfo) ProtoReflect() protoreflect.Message { - mi := &file_pb_channel_unknown_proto_msgTypes[15] + mi := &file_pb_channel_unknown_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1045,7 +1147,7 @@ func (x *GuildChannelInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use GuildChannelInfo.ProtoReflect.Descriptor instead. func (*GuildChannelInfo) Descriptor() ([]byte, []int) { - return file_pb_channel_unknown_proto_rawDescGZIP(), []int{15} + return file_pb_channel_unknown_proto_rawDescGZIP(), []int{17} } func (x *GuildChannelInfo) GetChannelId() uint64 { @@ -1153,7 +1255,7 @@ type GuildChannelSlowModeInfo struct { func (x *GuildChannelSlowModeInfo) Reset() { *x = GuildChannelSlowModeInfo{} if protoimpl.UnsafeEnabled { - mi := &file_pb_channel_unknown_proto_msgTypes[16] + mi := &file_pb_channel_unknown_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1166,7 +1268,7 @@ func (x *GuildChannelSlowModeInfo) String() string { func (*GuildChannelSlowModeInfo) ProtoMessage() {} func (x *GuildChannelSlowModeInfo) ProtoReflect() protoreflect.Message { - mi := &file_pb_channel_unknown_proto_msgTypes[16] + mi := &file_pb_channel_unknown_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1179,7 +1281,7 @@ func (x *GuildChannelSlowModeInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use GuildChannelSlowModeInfo.ProtoReflect.Descriptor instead. func (*GuildChannelSlowModeInfo) Descriptor() ([]byte, []int) { - return file_pb_channel_unknown_proto_rawDescGZIP(), []int{16} + return file_pb_channel_unknown_proto_rawDescGZIP(), []int{18} } func (x *GuildChannelSlowModeInfo) GetSlowModeKey() int32 { @@ -1223,7 +1325,7 @@ type GuildChannelTopMsgInfo struct { func (x *GuildChannelTopMsgInfo) Reset() { *x = GuildChannelTopMsgInfo{} if protoimpl.UnsafeEnabled { - mi := &file_pb_channel_unknown_proto_msgTypes[17] + mi := &file_pb_channel_unknown_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1236,7 +1338,7 @@ func (x *GuildChannelTopMsgInfo) String() string { func (*GuildChannelTopMsgInfo) ProtoMessage() {} func (x *GuildChannelTopMsgInfo) ProtoReflect() protoreflect.Message { - mi := &file_pb_channel_unknown_proto_msgTypes[17] + mi := &file_pb_channel_unknown_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1249,7 +1351,7 @@ func (x *GuildChannelTopMsgInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use GuildChannelTopMsgInfo.ProtoReflect.Descriptor instead. func (*GuildChannelTopMsgInfo) Descriptor() ([]byte, []int) { - return file_pb_channel_unknown_proto_rawDescGZIP(), []int{17} + return file_pb_channel_unknown_proto_rawDescGZIP(), []int{19} } func (x *GuildChannelTopMsgInfo) GetTopMsgSeq() uint64 { @@ -1317,141 +1419,149 @@ var file_pb_channel_unknown_proto_rawDesc = []byte{ 0x69, 0x64, 0x62, 0x30, 0x78, 0x66, 0x35, 0x64, 0x52, 0x73, 0x70, 0x12, 0x29, 0x0a, 0x03, 0x72, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x73, - 0x70, 0x52, 0x03, 0x72, 0x73, 0x70, 0x22, 0x5a, 0x0a, 0x14, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, - 0x6c, 0x4f, 0x69, 0x64, 0x62, 0x30, 0x78, 0x31, 0x30, 0x31, 0x39, 0x52, 0x73, 0x70, 0x12, 0x18, - 0x0a, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x05, 0x72, 0x6f, 0x6c, 0x65, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, - 0x6c, 0x2e, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x6f, 0x6c, - 0x65, 0x73, 0x22, 0x2e, 0x0a, 0x14, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4f, 0x69, 0x64, - 0x62, 0x30, 0x78, 0x31, 0x30, 0x31, 0x36, 0x52, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, - 0x6c, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x72, 0x6f, 0x6c, 0x65, - 0x49, 0x64, 0x22, 0x50, 0x0a, 0x0c, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x52, - 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x04, - 0x6d, 0x65, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x68, 0x61, - 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, - 0x6d, 0x65, 0x74, 0x61, 0x22, 0x61, 0x0a, 0x0e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, - 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x47, 0x75, 0x69, - 0x6c, 0x64, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x63, - 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x22, 0x42, 0x0a, 0x0e, 0x47, 0x75, 0x69, 0x6c, 0x64, - 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x30, 0x0a, 0x06, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x68, 0x61, 0x6e, - 0x6e, 0x65, 0x6c, 0x2e, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x22, 0x95, 0x01, 0x0a, 0x0f, - 0x47, 0x75, 0x69, 0x6c, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, - 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x70, 0x65, 0x61, 0x6b, 0x54, 0x69, - 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x70, - 0x65, 0x61, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, - 0x69, 0x6e, 0x79, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x74, 0x69, 0x6e, - 0x79, 0x49, 0x64, 0x22, 0x80, 0x01, 0x0a, 0x10, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x55, 0x73, 0x65, - 0x72, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x69, 0x6e, 0x79, - 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x74, 0x69, 0x6e, 0x79, 0x49, 0x64, - 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, - 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x55, 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x55, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x6a, 0x6f, - 0x69, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6a, 0x6f, - 0x69, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xd3, 0x01, 0x0a, 0x09, 0x47, 0x75, 0x69, 0x6c, 0x64, - 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x72, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x72, 0x67, 0x62, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x09, 0x61, 0x72, 0x67, 0x62, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x20, - 0x0a, 0x0b, 0x69, 0x6e, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0b, 0x69, 0x6e, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, - 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6e, - 0x75, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x78, 0x4e, 0x75, 0x6d, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x4e, 0x75, 0x6d, 0x22, 0xf5, 0x02, 0x0a, - 0x09, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x75, - 0x69, 0x6c, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x67, - 0x75, 0x69, 0x6c, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x4d, - 0x65, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x4d, - 0x61, 0x78, 0x4e, 0x75, 0x6d, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x72, 0x6f, 0x62, - 0x6f, 0x74, 0x4d, 0x61, 0x78, 0x4e, 0x75, 0x6d, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x4d, 0x61, 0x78, 0x4e, 0x75, 0x6d, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x4d, 0x61, 0x78, 0x4e, 0x75, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, - 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x72, 0x6f, - 0x66, 0x69, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x53, 0x65, - 0x71, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x53, - 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x18, 0x12, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x53, 0x65, 0x71, 0x18, 0x13, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x53, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x49, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x49, 0x64, 0x22, 0x9a, 0x04, 0x0a, 0x10, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x43, 0x68, - 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68, 0x61, - 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x63, 0x68, - 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x6e, - 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x68, - 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x6f, 0x72, 0x55, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x69, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x75, 0x69, - 0x6c, 0x64, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x75, 0x69, 0x6c, - 0x64, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x4e, 0x6f, 0x74, 0x69, - 0x66, 0x79, 0x54, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x66, 0x69, - 0x6e, 0x61, 0x6c, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, - 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x26, 0x0a, 0x0e, 0x74, 0x61, 0x6c, 0x6b, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x74, 0x61, 0x6c, 0x6b, 0x50, 0x65, 0x72, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x6f, 0x72, 0x54, 0x69, 0x6e, 0x79, 0x49, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x69, 0x6e, 0x79, 0x49, 0x64, 0x12, 0x20, 0x0a, - 0x0b, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x16, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x0b, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x37, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x4d, 0x73, 0x67, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1f, 0x2e, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x43, - 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x54, 0x6f, 0x70, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x06, 0x74, 0x6f, 0x70, 0x4d, 0x73, 0x67, 0x12, 0x2e, 0x0a, 0x12, 0x63, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x53, 0x6c, 0x6f, 0x77, 0x4d, 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x1f, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x6c, 0x6f, - 0x77, 0x4d, 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x47, 0x0a, 0x0d, 0x73, 0x6c, 0x6f, 0x77, - 0x4d, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x20, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x21, 0x2e, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x43, - 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x6c, 0x6f, 0x77, 0x4d, 0x6f, 0x64, 0x65, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x0d, 0x73, 0x6c, 0x6f, 0x77, 0x4d, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, - 0x73, 0x22, 0xb0, 0x01, 0x0a, 0x18, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x43, 0x68, 0x61, 0x6e, 0x6e, - 0x65, 0x6c, 0x53, 0x6c, 0x6f, 0x77, 0x4d, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x20, - 0x0a, 0x0b, 0x73, 0x6c, 0x6f, 0x77, 0x4d, 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0b, 0x73, 0x6c, 0x6f, 0x77, 0x4d, 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79, - 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x70, 0x65, 0x61, 0x6b, 0x46, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, - 0x63, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x73, 0x70, 0x65, 0x61, 0x6b, 0x46, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x6c, 0x6f, 0x77, - 0x4d, 0x6f, 0x64, 0x65, 0x43, 0x69, 0x72, 0x63, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0e, 0x73, 0x6c, 0x6f, 0x77, 0x4d, 0x6f, 0x64, 0x65, 0x43, 0x69, 0x72, 0x63, 0x6c, 0x65, - 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x6c, 0x6f, 0x77, 0x4d, 0x6f, 0x64, 0x65, 0x54, 0x65, 0x78, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x6c, 0x6f, 0x77, 0x4d, 0x6f, 0x64, 0x65, - 0x54, 0x65, 0x78, 0x74, 0x22, 0x8a, 0x01, 0x0a, 0x16, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x43, 0x68, - 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x54, 0x6f, 0x70, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, - 0x1c, 0x0a, 0x09, 0x74, 0x6f, 0x70, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x09, 0x74, 0x6f, 0x70, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x71, 0x12, 0x1e, 0x0a, - 0x0a, 0x74, 0x6f, 0x70, 0x4d, 0x73, 0x67, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x0a, 0x74, 0x6f, 0x70, 0x4d, 0x73, 0x67, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x32, 0x0a, - 0x14, 0x74, 0x6f, 0x70, 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x54, - 0x69, 0x6e, 0x79, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x74, 0x6f, 0x70, - 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x69, 0x6e, 0x79, 0x49, - 0x64, 0x42, 0x14, 0x5a, 0x12, 0x70, 0x62, 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x3b, - 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, + 0x70, 0x52, 0x03, 0x72, 0x73, 0x70, 0x22, 0x39, 0x0a, 0x14, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, + 0x6c, 0x4f, 0x69, 0x64, 0x62, 0x30, 0x78, 0x31, 0x30, 0x31, 0x37, 0x52, 0x73, 0x70, 0x12, 0x21, + 0x0a, 0x02, 0x70, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x68, 0x61, + 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x50, 0x31, 0x30, 0x78, 0x31, 0x30, 0x31, 0x37, 0x52, 0x02, 0x70, + 0x31, 0x22, 0x4c, 0x0a, 0x08, 0x50, 0x31, 0x30, 0x78, 0x31, 0x30, 0x31, 0x37, 0x12, 0x16, 0x0a, + 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x75, + 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x47, + 0x75, 0x69, 0x6c, 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x22, + 0x5a, 0x0a, 0x14, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4f, 0x69, 0x64, 0x62, 0x30, 0x78, + 0x31, 0x30, 0x31, 0x39, 0x52, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, + 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, + 0x64, 0x12, 0x28, 0x0a, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x47, 0x75, 0x69, 0x6c, 0x64, + 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x22, 0x2e, 0x0a, 0x14, 0x43, + 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4f, 0x69, 0x64, 0x62, 0x30, 0x78, 0x31, 0x30, 0x31, 0x36, + 0x52, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x06, 0x72, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x22, 0x50, 0x0a, 0x0c, 0x47, + 0x75, 0x69, 0x6c, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x67, + 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x75, + 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x47, 0x75, + 0x69, 0x6c, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x22, 0x61, 0x0a, + 0x0e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x73, 0x70, 0x12, + 0x18, 0x0a, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x61, + 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x68, + 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x43, 0x68, 0x61, 0x6e, 0x6e, + 0x65, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, + 0x22, 0x42, 0x0a, 0x0e, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x6e, + 0x66, 0x6f, 0x12, 0x30, 0x0a, 0x06, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x47, 0x75, 0x69, + 0x6c, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x73, 0x22, 0x95, 0x01, 0x0a, 0x0f, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x4d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x1a, + 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x6c, 0x61, + 0x73, 0x74, 0x53, 0x70, 0x65, 0x61, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x70, 0x65, 0x61, 0x6b, 0x54, 0x69, 0x6d, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, + 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x69, 0x6e, 0x79, 0x49, 0x64, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x74, 0x69, 0x6e, 0x79, 0x49, 0x64, 0x22, 0x80, 0x01, 0x0a, + 0x10, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x69, 0x6e, 0x79, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x06, 0x74, 0x69, 0x6e, 0x79, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, + 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, + 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x55, + 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, + 0x55, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x6a, 0x6f, 0x69, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x18, + 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6a, 0x6f, 0x69, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x22, + 0xd3, 0x01, 0x0a, 0x09, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x72, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x72, + 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x72, 0x67, + 0x62, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x61, 0x72, + 0x67, 0x62, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x6e, 0x64, 0x65, 0x70, + 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x69, 0x6e, + 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x75, 0x6d, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6e, 0x75, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x6f, + 0x77, 0x6e, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, + 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x16, 0x0a, + 0x06, 0x6d, 0x61, 0x78, 0x4e, 0x75, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6d, + 0x61, 0x78, 0x4e, 0x75, 0x6d, 0x22, 0xf5, 0x02, 0x0a, 0x09, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x4d, + 0x65, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x43, 0x6f, 0x64, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x43, 0x6f, 0x64, + 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x4d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, + 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x20, 0x0a, 0x0b, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x4d, 0x61, 0x78, 0x4e, 0x75, 0x6d, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x4d, 0x61, 0x78, 0x4e, 0x75, + 0x6d, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x4d, 0x61, 0x78, 0x4e, 0x75, 0x6d, + 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x4d, 0x61, 0x78, + 0x4e, 0x75, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x1c, 0x0a, + 0x09, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x53, 0x65, 0x71, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x09, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x53, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x6f, + 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x18, 0x12, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x6f, 0x77, + 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x53, 0x65, + 0x71, 0x18, 0x13, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x53, 0x65, + 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x14, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x9a, 0x04, + 0x0a, 0x10, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x6e, + 0x66, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, + 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x69, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x55, + 0x69, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, + 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x54, 0x79, 0x70, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x4e, 0x6f, 0x74, 0x69, + 0x66, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, + 0x6c, 0x54, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x63, 0x68, 0x61, + 0x6e, 0x6e, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x74, 0x61, 0x6c, 0x6b, + 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0e, 0x74, 0x61, 0x6c, 0x6b, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x69, 0x6e, 0x79, 0x49, + 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, + 0x54, 0x69, 0x6e, 0x79, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x16, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x76, 0x69, 0x73, + 0x69, 0x62, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x4d, + 0x73, 0x67, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x68, 0x61, 0x6e, 0x6e, + 0x65, 0x6c, 0x2e, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x54, + 0x6f, 0x70, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x4d, 0x73, + 0x67, 0x12, 0x2e, 0x0a, 0x12, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x6c, 0x6f, 0x77, + 0x4d, 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x6c, 0x6f, 0x77, 0x4d, 0x6f, 0x64, 0x65, 0x4b, 0x65, + 0x79, 0x12, 0x47, 0x0a, 0x0d, 0x73, 0x6c, 0x6f, 0x77, 0x4d, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x73, 0x18, 0x20, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x68, 0x61, 0x6e, 0x6e, + 0x65, 0x6c, 0x2e, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x53, + 0x6c, 0x6f, 0x77, 0x4d, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0d, 0x73, 0x6c, 0x6f, + 0x77, 0x4d, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x22, 0xb0, 0x01, 0x0a, 0x18, 0x47, + 0x75, 0x69, 0x6c, 0x64, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x6c, 0x6f, 0x77, 0x4d, + 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x6c, 0x6f, 0x77, 0x4d, + 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x73, 0x6c, + 0x6f, 0x77, 0x4d, 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x70, 0x65, + 0x61, 0x6b, 0x46, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0e, 0x73, 0x70, 0x65, 0x61, 0x6b, 0x46, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, + 0x79, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x6c, 0x6f, 0x77, 0x4d, 0x6f, 0x64, 0x65, 0x43, 0x69, 0x72, + 0x63, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x73, 0x6c, 0x6f, 0x77, 0x4d, + 0x6f, 0x64, 0x65, 0x43, 0x69, 0x72, 0x63, 0x6c, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x6c, 0x6f, + 0x77, 0x4d, 0x6f, 0x64, 0x65, 0x54, 0x65, 0x78, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x73, 0x6c, 0x6f, 0x77, 0x4d, 0x6f, 0x64, 0x65, 0x54, 0x65, 0x78, 0x74, 0x22, 0x8a, 0x01, + 0x0a, 0x16, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x54, 0x6f, + 0x70, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x6f, 0x70, 0x4d, + 0x73, 0x67, 0x53, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x6f, 0x70, + 0x4d, 0x73, 0x67, 0x53, 0x65, 0x71, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x70, 0x4d, 0x73, 0x67, + 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x74, 0x6f, 0x70, 0x4d, + 0x73, 0x67, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x14, 0x74, 0x6f, 0x70, 0x4d, 0x73, 0x67, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x69, 0x6e, 0x79, 0x49, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x74, 0x6f, 0x70, 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x6f, 0x72, 0x54, 0x69, 0x6e, 0x79, 0x49, 0x64, 0x42, 0x14, 0x5a, 0x12, 0x70, 0x62, + 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x3b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, } var ( @@ -1466,7 +1576,7 @@ func file_pb_channel_unknown_proto_rawDescGZIP() []byte { return file_pb_channel_unknown_proto_rawDescData } -var file_pb_channel_unknown_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_pb_channel_unknown_proto_msgTypes = make([]protoimpl.MessageInfo, 20) var file_pb_channel_unknown_proto_goTypes = []interface{}{ (*ChannelOidb0Xf5BRsp)(nil), // 0: channel.ChannelOidb0xf5bRsp (*ChannelOidb0Xf88Rsp)(nil), // 1: channel.ChannelOidb0xf88Rsp @@ -1474,39 +1584,43 @@ var file_pb_channel_unknown_proto_goTypes = []interface{}{ (*ChannelOidb0Xf57Rsp)(nil), // 3: channel.ChannelOidb0xf57Rsp (*ChannelOidb0Xf55Rsp)(nil), // 4: channel.ChannelOidb0xf55Rsp (*ChannelOidb0Xf5DRsp)(nil), // 5: channel.ChannelOidb0xf5dRsp - (*ChannelOidb0X1019Rsp)(nil), // 6: channel.ChannelOidb0x1019Rsp - (*ChannelOidb0X1016Rsp)(nil), // 7: channel.ChannelOidb0x1016Rsp - (*GuildMetaRsp)(nil), // 8: channel.GuildMetaRsp - (*ChannelListRsp)(nil), // 9: channel.ChannelListRsp - (*GuildAdminInfo)(nil), // 10: channel.GuildAdminInfo - (*GuildMemberInfo)(nil), // 11: channel.GuildMemberInfo - (*GuildUserProfile)(nil), // 12: channel.GuildUserProfile - (*GuildRole)(nil), // 13: channel.GuildRole - (*GuildMeta)(nil), // 14: channel.GuildMeta - (*GuildChannelInfo)(nil), // 15: channel.GuildChannelInfo - (*GuildChannelSlowModeInfo)(nil), // 16: channel.GuildChannelSlowModeInfo - (*GuildChannelTopMsgInfo)(nil), // 17: channel.GuildChannelTopMsgInfo + (*ChannelOidb0X1017Rsp)(nil), // 6: channel.ChannelOidb0x1017Rsp + (*P10X1017)(nil), // 7: channel.P10x1017 + (*ChannelOidb0X1019Rsp)(nil), // 8: channel.ChannelOidb0x1019Rsp + (*ChannelOidb0X1016Rsp)(nil), // 9: channel.ChannelOidb0x1016Rsp + (*GuildMetaRsp)(nil), // 10: channel.GuildMetaRsp + (*ChannelListRsp)(nil), // 11: channel.ChannelListRsp + (*GuildAdminInfo)(nil), // 12: channel.GuildAdminInfo + (*GuildMemberInfo)(nil), // 13: channel.GuildMemberInfo + (*GuildUserProfile)(nil), // 14: channel.GuildUserProfile + (*GuildRole)(nil), // 15: channel.GuildRole + (*GuildMeta)(nil), // 16: channel.GuildMeta + (*GuildChannelInfo)(nil), // 17: channel.GuildChannelInfo + (*GuildChannelSlowModeInfo)(nil), // 18: channel.GuildChannelSlowModeInfo + (*GuildChannelTopMsgInfo)(nil), // 19: channel.GuildChannelTopMsgInfo } var file_pb_channel_unknown_proto_depIdxs = []int32{ - 11, // 0: channel.ChannelOidb0xf5bRsp.bots:type_name -> channel.GuildMemberInfo - 11, // 1: channel.ChannelOidb0xf5bRsp.members:type_name -> channel.GuildMemberInfo - 10, // 2: channel.ChannelOidb0xf5bRsp.adminInfo:type_name -> channel.GuildAdminInfo - 12, // 3: channel.ChannelOidb0xf88Rsp.profile:type_name -> channel.GuildUserProfile - 12, // 4: channel.ChannelOidb0xfc9Rsp.profile:type_name -> channel.GuildUserProfile - 8, // 5: channel.ChannelOidb0xf57Rsp.rsp:type_name -> channel.GuildMetaRsp - 15, // 6: channel.ChannelOidb0xf55Rsp.info:type_name -> channel.GuildChannelInfo - 9, // 7: channel.ChannelOidb0xf5dRsp.rsp:type_name -> channel.ChannelListRsp - 13, // 8: channel.ChannelOidb0x1019Rsp.roles:type_name -> channel.GuildRole - 14, // 9: channel.GuildMetaRsp.meta:type_name -> channel.GuildMeta - 15, // 10: channel.ChannelListRsp.channels:type_name -> channel.GuildChannelInfo - 11, // 11: channel.GuildAdminInfo.admins:type_name -> channel.GuildMemberInfo - 17, // 12: channel.GuildChannelInfo.topMsg:type_name -> channel.GuildChannelTopMsgInfo - 16, // 13: channel.GuildChannelInfo.slowModeInfos:type_name -> channel.GuildChannelSlowModeInfo - 14, // [14:14] is the sub-list for method output_type - 14, // [14:14] is the sub-list for method input_type - 14, // [14:14] is the sub-list for extension type_name - 14, // [14:14] is the sub-list for extension extendee - 0, // [0:14] is the sub-list for field type_name + 13, // 0: channel.ChannelOidb0xf5bRsp.bots:type_name -> channel.GuildMemberInfo + 13, // 1: channel.ChannelOidb0xf5bRsp.members:type_name -> channel.GuildMemberInfo + 12, // 2: channel.ChannelOidb0xf5bRsp.adminInfo:type_name -> channel.GuildAdminInfo + 14, // 3: channel.ChannelOidb0xf88Rsp.profile:type_name -> channel.GuildUserProfile + 14, // 4: channel.ChannelOidb0xfc9Rsp.profile:type_name -> channel.GuildUserProfile + 10, // 5: channel.ChannelOidb0xf57Rsp.rsp:type_name -> channel.GuildMetaRsp + 17, // 6: channel.ChannelOidb0xf55Rsp.info:type_name -> channel.GuildChannelInfo + 11, // 7: channel.ChannelOidb0xf5dRsp.rsp:type_name -> channel.ChannelListRsp + 7, // 8: channel.ChannelOidb0x1017Rsp.p1:type_name -> channel.P10x1017 + 15, // 9: channel.P10x1017.roles:type_name -> channel.GuildRole + 15, // 10: channel.ChannelOidb0x1019Rsp.roles:type_name -> channel.GuildRole + 16, // 11: channel.GuildMetaRsp.meta:type_name -> channel.GuildMeta + 17, // 12: channel.ChannelListRsp.channels:type_name -> channel.GuildChannelInfo + 13, // 13: channel.GuildAdminInfo.admins:type_name -> channel.GuildMemberInfo + 19, // 14: channel.GuildChannelInfo.topMsg:type_name -> channel.GuildChannelTopMsgInfo + 18, // 15: channel.GuildChannelInfo.slowModeInfos:type_name -> channel.GuildChannelSlowModeInfo + 16, // [16:16] is the sub-list for method output_type + 16, // [16:16] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name } func init() { file_pb_channel_unknown_proto_init() } @@ -1588,7 +1702,7 @@ func file_pb_channel_unknown_proto_init() { } } file_pb_channel_unknown_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChannelOidb0X1019Rsp); i { + switch v := v.(*ChannelOidb0X1017Rsp); i { case 0: return &v.state case 1: @@ -1600,7 +1714,7 @@ func file_pb_channel_unknown_proto_init() { } } file_pb_channel_unknown_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChannelOidb0X1016Rsp); i { + switch v := v.(*P10X1017); i { case 0: return &v.state case 1: @@ -1612,7 +1726,7 @@ func file_pb_channel_unknown_proto_init() { } } file_pb_channel_unknown_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GuildMetaRsp); i { + switch v := v.(*ChannelOidb0X1019Rsp); i { case 0: return &v.state case 1: @@ -1624,7 +1738,7 @@ func file_pb_channel_unknown_proto_init() { } } file_pb_channel_unknown_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChannelListRsp); i { + switch v := v.(*ChannelOidb0X1016Rsp); i { case 0: return &v.state case 1: @@ -1636,7 +1750,7 @@ func file_pb_channel_unknown_proto_init() { } } file_pb_channel_unknown_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GuildAdminInfo); i { + switch v := v.(*GuildMetaRsp); i { case 0: return &v.state case 1: @@ -1648,7 +1762,7 @@ func file_pb_channel_unknown_proto_init() { } } file_pb_channel_unknown_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GuildMemberInfo); i { + switch v := v.(*ChannelListRsp); i { case 0: return &v.state case 1: @@ -1660,7 +1774,7 @@ func file_pb_channel_unknown_proto_init() { } } file_pb_channel_unknown_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GuildUserProfile); i { + switch v := v.(*GuildAdminInfo); i { case 0: return &v.state case 1: @@ -1672,7 +1786,7 @@ func file_pb_channel_unknown_proto_init() { } } file_pb_channel_unknown_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GuildRole); i { + switch v := v.(*GuildMemberInfo); i { case 0: return &v.state case 1: @@ -1684,7 +1798,7 @@ func file_pb_channel_unknown_proto_init() { } } file_pb_channel_unknown_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GuildMeta); i { + switch v := v.(*GuildUserProfile); i { case 0: return &v.state case 1: @@ -1696,7 +1810,7 @@ func file_pb_channel_unknown_proto_init() { } } file_pb_channel_unknown_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GuildChannelInfo); i { + switch v := v.(*GuildRole); i { case 0: return &v.state case 1: @@ -1708,7 +1822,7 @@ func file_pb_channel_unknown_proto_init() { } } file_pb_channel_unknown_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GuildChannelSlowModeInfo); i { + switch v := v.(*GuildMeta); i { case 0: return &v.state case 1: @@ -1720,6 +1834,30 @@ func file_pb_channel_unknown_proto_init() { } } file_pb_channel_unknown_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GuildChannelInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pb_channel_unknown_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GuildChannelSlowModeInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pb_channel_unknown_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GuildChannelTopMsgInfo); i { case 0: return &v.state @@ -1738,7 +1876,7 @@ func file_pb_channel_unknown_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pb_channel_unknown_proto_rawDesc, NumEnums: 0, - NumMessages: 18, + NumMessages: 20, NumExtensions: 0, NumServices: 0, }, diff --git a/client/pb/channel/unknown.proto b/client/pb/channel/unknown.proto index 7e7bf1c2..79ef02cd 100644 --- a/client/pb/channel/unknown.proto +++ b/client/pb/channel/unknown.proto @@ -34,6 +34,15 @@ message ChannelOidb0xf5dRsp { optional ChannelListRsp rsp = 1; } +message ChannelOidb0x1017Rsp { + optional P10x1017 p1 = 1; +} + +message P10x1017 { + optional uint64 userId = 1; + repeated GuildRole roles = 3; +} + message ChannelOidb0x1019Rsp { optional uint64 guildId = 1; repeated GuildRole roles = 2; diff --git a/client/private_msg.go b/client/private_msg.go index 6153afc0..87c5ca56 100644 --- a/client/private_msg.go +++ b/client/private_msg.go @@ -6,10 +6,10 @@ import ( "time" "github.com/pkg/errors" - "google.golang.org/protobuf/proto" "github.com/Mrs4s/MiraiGo/client/pb/msg" "github.com/Mrs4s/MiraiGo/internal/packets" + "github.com/Mrs4s/MiraiGo/internal/proto" "github.com/Mrs4s/MiraiGo/message" ) diff --git a/client/ptt.go b/client/ptt.go index 4703f805..1828b9e1 100644 --- a/client/ptt.go +++ b/client/ptt.go @@ -7,7 +7,6 @@ import ( "os" "github.com/pkg/errors" - "google.golang.org/protobuf/proto" "github.com/Mrs4s/MiraiGo/binary" "github.com/Mrs4s/MiraiGo/client/pb/cmd0x346" @@ -15,6 +14,7 @@ import ( "github.com/Mrs4s/MiraiGo/client/pb/msg" "github.com/Mrs4s/MiraiGo/client/pb/pttcenter" "github.com/Mrs4s/MiraiGo/internal/packets" + "github.com/Mrs4s/MiraiGo/internal/proto" "github.com/Mrs4s/MiraiGo/message" "github.com/Mrs4s/MiraiGo/utils" ) diff --git a/client/qidian.go b/client/qidian.go index 1f229b77..ea03f00a 100644 --- a/client/qidian.go +++ b/client/qidian.go @@ -1,4 +1,5 @@ // 企点协议相关特殊逻辑 + package client import ( @@ -8,13 +9,13 @@ import ( "net/http" "github.com/pkg/errors" - "google.golang.org/protobuf/proto" "github.com/Mrs4s/MiraiGo/binary" "github.com/Mrs4s/MiraiGo/client/pb/cmd0x3f6" "github.com/Mrs4s/MiraiGo/client/pb/cmd0x6ff" "github.com/Mrs4s/MiraiGo/client/pb/msg" "github.com/Mrs4s/MiraiGo/internal/packets" + "github.com/Mrs4s/MiraiGo/internal/proto" "github.com/Mrs4s/MiraiGo/utils" ) diff --git a/client/recall.go b/client/recall.go index 115cc7ce..897dbd78 100644 --- a/client/recall.go +++ b/client/recall.go @@ -2,10 +2,10 @@ package client import ( "github.com/pkg/errors" - "google.golang.org/protobuf/proto" "github.com/Mrs4s/MiraiGo/client/pb/msg" "github.com/Mrs4s/MiraiGo/internal/packets" + "github.com/Mrs4s/MiraiGo/internal/proto" "github.com/Mrs4s/MiraiGo/message" ) diff --git a/client/richmsg.go b/client/richmsg.go index 3b9794e8..10210e25 100644 --- a/client/richmsg.go +++ b/client/richmsg.go @@ -5,10 +5,10 @@ import ( "time" "github.com/pkg/errors" - "google.golang.org/protobuf/proto" "github.com/Mrs4s/MiraiGo/client/pb/oidb" "github.com/Mrs4s/MiraiGo/internal/packets" + "github.com/Mrs4s/MiraiGo/internal/proto" "github.com/Mrs4s/MiraiGo/message" "github.com/Mrs4s/MiraiGo/utils" ) diff --git a/client/security.go b/client/security.go index 17278e05..8b194713 100644 --- a/client/security.go +++ b/client/security.go @@ -2,10 +2,10 @@ package client import ( "github.com/pkg/errors" - "google.golang.org/protobuf/proto" "github.com/Mrs4s/MiraiGo/client/pb/oidb" "github.com/Mrs4s/MiraiGo/internal/packets" + "github.com/Mrs4s/MiraiGo/internal/proto" ) func init() { diff --git a/client/stash.go b/client/stash.go new file mode 100644 index 00000000..e8957b52 --- /dev/null +++ b/client/stash.go @@ -0,0 +1,303 @@ +// UNCHECKED + +package client + +import ( + "bytes" + "encoding/binary" + "io" + "strings" +) + +// Stash will store the data for the client, this will speed up booting +// the QQ client but some data may not sync with the server. So it is +// recommended to use this in development mode only. + +//go:generate stringer -type=syncMarker -trimprefix=syncMarker +type syncMarker int8 + +const ( + syncMarkerNone syncMarker = iota + syncMarkerFriendList + syncMarkerFriendInfo + syncMarkerGroupList + syncMarkerGroupInfo + syncMarkerGroupMemberList + syncMarkerGroupMemberInfo +) + +type StashSyncMarkerError struct { + marker syncMarker + expected syncMarker +} + +func (e *StashSyncMarkerError) Error() string { + return "stash sync marker error: expected " + e.expected.String() + ", got " + e.marker.String() +} + +// WriteStash will write the stash to the given writer. +func WriteStash(client *QQClient, writer io.Writer) { + var out intWriter + w := stashWriter{ + stringIndex: make(map[string]uint64), + } + + w.friendList(client.FriendList) + w.groupList(client.GroupList) + + out.uvarint(uint64(w.strings.Len())) + out.uvarint(uint64(w.data.Len())) + _, _ = io.Copy(&out, &w.strings) + _, _ = io.Copy(&out, &w.data) + _, _ = io.Copy(writer, &out) +} + +type stashWriter struct { + data intWriter + strings intWriter + stringIndex map[string]uint64 +} + +func (w *stashWriter) string(s string) { + off, ok := w.stringIndex[s] + if !ok { + off = uint64(w.strings.Len()) + w.strings.uvarint(uint64(len(s))) + _, _ = w.strings.WriteString(s) + w.stringIndex[s] = off + } + w.uvarint(off) +} + +func (w *stashWriter) sync(marker syncMarker) { w.data.uvarint(uint64(marker)) } +func (w *stashWriter) uvarint(v uint64) { w.data.uvarint(v) } +func (w *stashWriter) svarint(v int64) { w.data.svarint(v) } + +func (w *stashWriter) int64(v int64) { + var buf [8]byte + binary.LittleEndian.PutUint64(buf[:], uint64(v)) + _, _ = w.data.Write(buf[:]) +} + +func (w *stashWriter) friendList(list []*FriendInfo) { + w.sync(syncMarkerFriendList) + w.uvarint(uint64(len(list))) + for _, friend := range list { + w.sync(syncMarkerFriendInfo) + w.int64(friend.Uin) + w.string(friend.Nickname) + w.string(friend.Remark) + w.svarint(int64(friend.FaceId)) + } +} + +func (w *stashWriter) groupList(list []*GroupInfo) { + w.sync(syncMarkerGroupList) + w.uvarint(uint64(len(list))) + for _, group := range list { + w.sync(syncMarkerGroupInfo) + w.int64(group.Uin) + w.int64(group.Code) + w.string(group.Name) + w.string(group.Memo) + w.int64(group.OwnerUin) + w.uvarint(uint64(group.GroupCreateTime)) + w.uvarint(uint64(group.MemberCount)) + w.uvarint(uint64(group.MaxMemberCount)) + w.svarint(group.LastMsgSeq) + + w.groupMemberList(group.Members) + } +} + +func (w *stashWriter) groupMemberList(list []*GroupMemberInfo) { + w.sync(syncMarkerGroupMemberList) + w.uvarint(uint64(len(list))) + for _, member := range list { + w.sync(syncMarkerGroupMemberInfo) + w.int64(member.Uin) + w.uvarint(uint64(member.Gender)) + w.string(member.Nickname) + w.string(member.CardName) + w.uvarint(uint64(member.Level)) + w.int64(member.JoinTime) + w.int64(member.LastSpeakTime) + w.string(member.SpecialTitle) + w.svarint(member.SpecialTitleExpireTime) + w.svarint(member.ShutUpTimestamp) + w.uvarint(uint64(member.Permission)) + } +} + +type intWriter struct { + bytes.Buffer +} + +func (w *intWriter) svarint(x int64) { + w.uvarint(uint64(x)<<1 ^ uint64(x>>63)) +} + +func (w *intWriter) uvarint(x uint64) { + var buf [binary.MaxVarintLen64]byte + n := binary.PutUvarint(buf[:], x) + _, _ = w.Write(buf[:n]) +} + +// ReadStash will read the stash from the given reader and apply to the given QQClient. +func ReadStash(client *QQClient, data string) (err error) { + in := newIntReader(data) + sl := int64(in.uvarint()) + dl := int64(in.uvarint()) + whence, err := in.Seek(0, io.SeekCurrent) + if err != nil { + return err + } + sData := data[whence : whence+sl] + dData := data[whence+sl : whence+sl+dl] + + r := stashReader{ + data: newIntReader(dData), + strings: newIntReader(sData), + stringIndex: make(map[uint64]string), + } + defer func() { + if r := recover(); r != nil { + if e, ok := r.(error); ok { + err = e + return + } + panic(r) + } + }() + + client.FriendList = r.friendList() + client.GroupList = r.groupList(client) + return nil +} + +type stashReader struct { + data intReader + strings intReader + stringIndex map[uint64]string +} + +func (r *stashReader) string() string { + off := r.data.uvarint() + if off == 0 { + return "" + } + if s, ok := r.stringIndex[off]; ok { + return s + } + _, _ = r.strings.Seek(int64(off), io.SeekStart) + l := int64(r.strings.uvarint()) + whence, _ := r.strings.Seek(0, io.SeekCurrent) + s := r.strings.data[whence : whence+l] + r.stringIndex[off] = s + return s +} + +func (r *stashReader) sync(marker syncMarker) { + got := syncMarker(r.data.uvarint()) + if got != marker { + panic(&StashSyncMarkerError{ + marker: got, + expected: marker, + }) + } +} + +func (r *stashReader) friendList() []*FriendInfo { + r.sync(syncMarkerFriendList) + l := r.uvarint() + list := make([]*FriendInfo, l) + for i := uint64(0); i < l; i++ { + r.sync(syncMarkerFriendInfo) + list[i] = &FriendInfo{ + Uin: r.int64(), + Nickname: r.string(), + Remark: r.string(), + FaceId: int16(r.svarint()), + } + } + return list +} + +func (r *stashReader) groupList(client *QQClient) []*GroupInfo { + r.sync(syncMarkerGroupList) + l := r.uvarint() + list := make([]*GroupInfo, l) + for i := uint64(0); i < l; i++ { + r.sync(syncMarkerGroupInfo) + list[i] = &GroupInfo{ + Uin: r.int64(), + Code: r.int64(), + Name: r.string(), + Memo: r.string(), + OwnerUin: r.int64(), + GroupCreateTime: uint32(r.uvarint()), + GroupLevel: uint32(r.uvarint()), + MemberCount: uint16(r.uvarint()), + MaxMemberCount: uint16(r.uvarint()), + client: client, + } + list[i].Members = r.groupMemberList(list[i]) + list[i].LastMsgSeq = r.svarint() + } + return list +} + +func (r *stashReader) groupMemberList(group *GroupInfo) []*GroupMemberInfo { + r.sync(syncMarkerGroupMemberList) + l := r.uvarint() + list := make([]*GroupMemberInfo, l) + for i := uint64(0); i < l; i++ { + r.sync(syncMarkerGroupMemberInfo) + list[i] = &GroupMemberInfo{ + Group: group, + Uin: r.int64(), + Gender: byte(r.uvarint()), + Nickname: r.string(), + CardName: r.string(), + Level: uint16(r.uvarint()), + JoinTime: r.int64(), + LastSpeakTime: r.int64(), + SpecialTitle: r.string(), + SpecialTitleExpireTime: r.svarint(), + ShutUpTimestamp: r.svarint(), + Permission: MemberPermission(r.uvarint()), + } + } + return list +} + +func (r *stashReader) uvarint() uint64 { return r.data.uvarint() } +func (r *stashReader) svarint() int64 { return r.data.svarint() } + +func (r *stashReader) int64() int64 { + var buf [8]byte + _, _ = r.data.Read(buf[:]) + return int64(binary.LittleEndian.Uint64(buf[:])) +} + +type intReader struct { + data string + *strings.Reader +} + +func newIntReader(s string) intReader { + return intReader{ + data: s, + Reader: strings.NewReader(s), + } +} + +func (r *intReader) svarint() int64 { + i, _ := binary.ReadVarint(r) + return i +} + +func (r *intReader) uvarint() uint64 { + i, _ := binary.ReadUvarint(r) + return i +} diff --git a/client/sync.go b/client/sync.go index 177c8416..7b9e05ee 100644 --- a/client/sync.go +++ b/client/sync.go @@ -7,13 +7,13 @@ import ( "time" "github.com/pkg/errors" - "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/client/pb/oidb" "github.com/Mrs4s/MiraiGo/internal/packets" + "github.com/Mrs4s/MiraiGo/internal/proto" "github.com/Mrs4s/MiraiGo/message" ) diff --git a/client/syncmarker_string.go b/client/syncmarker_string.go new file mode 100644 index 00000000..729efd8b --- /dev/null +++ b/client/syncmarker_string.go @@ -0,0 +1,29 @@ +// Code generated by "stringer -type=syncMarker -trimprefix=syncMarker"; DO NOT EDIT. + +package client + +import "strconv" + +func _() { + // An "invalid array index" compiler error signifies that the constant values have changed. + // Re-run the stringer command to generate them again. + var x [1]struct{} + _ = x[syncMarkerNone-0] + _ = x[syncMarkerFriendList-1] + _ = x[syncMarkerFriendInfo-2] + _ = x[syncMarkerGroupList-3] + _ = x[syncMarkerGroupInfo-4] + _ = x[syncMarkerGroupMemberList-5] + _ = x[syncMarkerGroupMemberInfo-6] +} + +const _syncMarker_name = "NoneFriendListFriendInfoGroupListGroupInfoGroupMemberListGroupMemberInfo" + +var _syncMarker_index = [...]uint8{0, 4, 14, 24, 33, 42, 57, 72} + +func (i syncMarker) String() string { + if i < 0 || i >= syncMarker(len(_syncMarker_index)-1) { + return "syncMarker(" + strconv.FormatInt(int64(i), 10) + ")" + } + return _syncMarker_name[_syncMarker_index[i]:_syncMarker_index[i+1]] +} diff --git a/client/system_msg.go b/client/system_msg.go index e70012be..948d8128 100644 --- a/client/system_msg.go +++ b/client/system_msg.go @@ -1,10 +1,9 @@ package client import ( - "google.golang.org/protobuf/proto" - "github.com/Mrs4s/MiraiGo/client/pb/structmsg" "github.com/Mrs4s/MiraiGo/internal/packets" + "github.com/Mrs4s/MiraiGo/internal/proto" ) type ( diff --git a/client/translate.go b/client/translate.go index e005a189..e04715f8 100644 --- a/client/translate.go +++ b/client/translate.go @@ -2,10 +2,10 @@ package client import ( "github.com/pkg/errors" - "google.golang.org/protobuf/proto" "github.com/Mrs4s/MiraiGo/client/pb/oidb" "github.com/Mrs4s/MiraiGo/internal/packets" + "github.com/Mrs4s/MiraiGo/internal/proto" ) func (c *QQClient) buildTranslatePacket(src, dst, text string) (uint16, []byte) { diff --git a/client/web.go b/client/web.go index 132c9611..8f2d97a4 100644 --- a/client/web.go +++ b/client/web.go @@ -7,10 +7,10 @@ import ( "strings" "github.com/pkg/errors" - "google.golang.org/protobuf/proto" "github.com/Mrs4s/MiraiGo/client/pb/web" "github.com/Mrs4s/MiraiGo/internal/packets" + "github.com/Mrs4s/MiraiGo/internal/proto" "github.com/Mrs4s/MiraiGo/utils" ) diff --git a/internal/crypto/crypto.go b/internal/crypto/crypto.go index 7de14c09..a3b006a7 100644 --- a/internal/crypto/crypto.go +++ b/internal/crypto/crypto.go @@ -50,7 +50,7 @@ func (e *EncryptECDH) generateKey(sPubKey string) { } func (e *EncryptECDH) DoEncrypt(d, k []byte) []byte { - w := binary.NewWriter() + w := binary.SelectWriter() w.WriteByte(0x02) w.WriteByte(0x01) w.Write(k) diff --git a/internal/packets/builders.go b/internal/packets/builders.go index a234ed5f..e3e1685e 100644 --- a/internal/packets/builders.go +++ b/internal/packets/builders.go @@ -27,7 +27,7 @@ func BuildLoginPacket(uin int64, bodyType byte, key, body, extraData []byte) []b func BuildUniPacket(uin int64, seq uint16, commandName string, encryptType byte, sessionID, extraData, key, body []byte) []byte { return binary.NewWriterF(func(w *binary.Writer) { - w2 := binary.NewWriter() + w2 := binary.SelectWriter() { // w.WriteIntLvPacket w2.WriteUInt32(0x0B) w2.WriteByte(encryptType) @@ -36,7 +36,7 @@ func BuildUniPacket(uin int64, seq uint16, commandName string, encryptType byte, w2.WriteString(strconv.FormatInt(uin, 10)) // inline NewWriterF - w3 := binary.NewWriter() + w3 := binary.SelectWriter() w3.WriteUniPacket(commandName, sessionID, extraData, body) w2.EncryptAndWrite(key, w3.Bytes()) binary.PutWriter(w3) diff --git a/internal/proto/wrapper.go b/internal/proto/wrapper.go new file mode 100644 index 00000000..d7b3874f --- /dev/null +++ b/internal/proto/wrapper.go @@ -0,0 +1,37 @@ +package proto + +import "google.golang.org/protobuf/proto" + +type Message = proto.Message + +func Marshal(m Message) ([]byte, error) { + return proto.Marshal(m) +} + +func Unmarshal(b []byte, m Message) error { + return proto.Unmarshal(b, m) +} + +// Bool stores v in a new bool value and returns a pointer to it. +func Bool(v bool) *bool { return &v } + +// Int32 stores v in a new int32 value and returns a pointer to it. +func Int32(v int32) *int32 { return &v } + +// Int64 stores v in a new int64 value and returns a pointer to it. +func Int64(v int64) *int64 { return &v } + +// Float32 stores v in a new float32 value and returns a pointer to it. +func Float32(v float32) *float32 { return &v } + +// Float64 stores v in a new float64 value and returns a pointer to it. +func Float64(v float64) *float64 { return &v } + +// Uint32 stores v in a new uint32 value and returns a pointer to it. +func Uint32(v uint32) *uint32 { return &v } + +// Uint64 stores v in a new uint64 value and returns a pointer to it. +func Uint64(v uint64) *uint64 { return &v } + +// String stores v in a new string value and returns a pointer to it. +func String(v string) *string { return &v } diff --git a/message/forward.go b/message/forward.go index 1b144d6e..62cc8e45 100644 --- a/message/forward.go +++ b/message/forward.go @@ -4,10 +4,9 @@ import ( "bytes" "crypto/md5" - "google.golang.org/protobuf/proto" - "github.com/Mrs4s/MiraiGo/binary" "github.com/Mrs4s/MiraiGo/client/pb/msg" + "github.com/Mrs4s/MiraiGo/internal/proto" "github.com/Mrs4s/MiraiGo/utils" ) diff --git a/message/image.go b/message/image.go index f3db709f..80018ceb 100644 --- a/message/image.go +++ b/message/image.go @@ -3,10 +3,9 @@ package message import ( "strings" - "google.golang.org/protobuf/proto" - "github.com/Mrs4s/MiraiGo/binary" "github.com/Mrs4s/MiraiGo/client/pb/msg" + "github.com/Mrs4s/MiraiGo/internal/proto" ) /* -------- Definitions -------- */ diff --git a/message/marketface.go b/message/marketface.go index da1b69cd..8f594829 100644 --- a/message/marketface.go +++ b/message/marketface.go @@ -4,8 +4,8 @@ import ( "fmt" "github.com/Mrs4s/MiraiGo/client/pb/msg" + "github.com/Mrs4s/MiraiGo/internal/proto" "github.com/Mrs4s/MiraiGo/utils" - "google.golang.org/protobuf/proto" ) type MarketFaceElement struct { diff --git a/message/message.go b/message/message.go index b7d311d9..4a1a4fe4 100644 --- a/message/message.go +++ b/message/message.go @@ -7,10 +7,9 @@ import ( "strconv" "strings" - "google.golang.org/protobuf/proto" - "github.com/Mrs4s/MiraiGo/binary" "github.com/Mrs4s/MiraiGo/client/pb/msg" + "github.com/Mrs4s/MiraiGo/internal/proto" "github.com/Mrs4s/MiraiGo/utils" ) diff --git a/message/pack.go b/message/pack.go index 410be098..0f5d55ad 100644 --- a/message/pack.go +++ b/message/pack.go @@ -4,10 +4,9 @@ import ( "encoding/hex" "fmt" - "google.golang.org/protobuf/proto" - "github.com/Mrs4s/MiraiGo/binary" "github.com/Mrs4s/MiraiGo/client/pb/msg" + "github.com/Mrs4s/MiraiGo/internal/proto" ) /*