// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.1 // protoc v4.25.2 // source: chat.proto package pb import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // 聊天类型 type ChatType int32 const ( ChatType_CT_Unknown ChatType = 0 ChatType_CT_Private ChatType = 1 // 私聊,一对一 ChatType_CT_World ChatType = 2 // 世界频道聊天 ChatType_CT_Marquee ChatType = 3 // 跑马灯,滚动信息 ) // Enum value maps for ChatType. var ( ChatType_name = map[int32]string{ 0: "CT_Unknown", 1: "CT_Private", 2: "CT_World", 3: "CT_Marquee", } ChatType_value = map[string]int32{ "CT_Unknown": 0, "CT_Private": 1, "CT_World": 2, "CT_Marquee": 3, } ) func (x ChatType) Enum() *ChatType { p := new(ChatType) *p = x return p } func (x ChatType) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (ChatType) Descriptor() protoreflect.EnumDescriptor { return file_chat_proto_enumTypes[0].Descriptor() } func (ChatType) Type() protoreflect.EnumType { return &file_chat_proto_enumTypes[0] } func (x ChatType) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use ChatType.Descriptor instead. func (ChatType) EnumDescriptor() ([]byte, []int) { return file_chat_proto_rawDescGZIP(), []int{0} } // 聊天消息 type C2SChat struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields SrcUser *ChatUser `protobuf:"bytes,1,opt,name=src_user,json=srcUser,proto3" json:"src_user,omitempty"` // 说话的人 DstUser *ChatUser `protobuf:"bytes,2,opt,name=dst_user,json=dstUser,proto3" json:"dst_user,omitempty"` // 接收者 Type ChatType `protobuf:"varint,3,opt,name=type,proto3,enum=pb.ChatType" json:"type,omitempty"` // 聊天类型 GameId ServiceTypeId `protobuf:"varint,4,opt,name=game_id,json=gameId,proto3,enum=pb.ServiceTypeId" json:"game_id,omitempty"` // 游戏id,只在本玩法中显示的聊天信息 Content string `protobuf:"bytes,5,opt,name=content,proto3" json:"content,omitempty"` // 内容 } func (x *C2SChat) Reset() { *x = C2SChat{} if protoimpl.UnsafeEnabled { mi := &file_chat_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *C2SChat) String() string { return protoimpl.X.MessageStringOf(x) } func (*C2SChat) ProtoMessage() {} func (x *C2SChat) ProtoReflect() protoreflect.Message { mi := &file_chat_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use C2SChat.ProtoReflect.Descriptor instead. func (*C2SChat) Descriptor() ([]byte, []int) { return file_chat_proto_rawDescGZIP(), []int{0} } func (x *C2SChat) GetSrcUser() *ChatUser { if x != nil { return x.SrcUser } return nil } func (x *C2SChat) GetDstUser() *ChatUser { if x != nil { return x.DstUser } return nil } func (x *C2SChat) GetType() ChatType { if x != nil { return x.Type } return ChatType_CT_Unknown } func (x *C2SChat) GetGameId() ServiceTypeId { if x != nil { return x.GameId } return ServiceTypeId_STI_Unknown } func (x *C2SChat) GetContent() string { if x != nil { return x.Content } return "" } var File_chat_proto protoreflect.FileDescriptor var file_chat_proto_rawDesc = []byte{ 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc3, 0x01, 0x0a, 0x07, 0x43, 0x32, 0x53, 0x43, 0x68, 0x61, 0x74, 0x12, 0x27, 0x0a, 0x08, 0x73, 0x72, 0x63, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x07, 0x73, 0x72, 0x63, 0x55, 0x73, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x08, 0x64, 0x73, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x07, 0x64, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x67, 0x61, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x52, 0x06, 0x67, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2a, 0x48, 0x0a, 0x08, 0x43, 0x68, 0x61, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x54, 0x5f, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x54, 0x5f, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x54, 0x5f, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x54, 0x5f, 0x4d, 0x61, 0x72, 0x71, 0x75, 0x65, 0x65, 0x10, 0x03, 0x42, 0x11, 0x5a, 0x0f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_chat_proto_rawDescOnce sync.Once file_chat_proto_rawDescData = file_chat_proto_rawDesc ) func file_chat_proto_rawDescGZIP() []byte { file_chat_proto_rawDescOnce.Do(func() { file_chat_proto_rawDescData = protoimpl.X.CompressGZIP(file_chat_proto_rawDescData) }) return file_chat_proto_rawDescData } var file_chat_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_chat_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_chat_proto_goTypes = []interface{}{ (ChatType)(0), // 0: pb.ChatType (*C2SChat)(nil), // 1: pb.C2SChat (*ChatUser)(nil), // 2: pb.ChatUser (ServiceTypeId)(0), // 3: pb.ServiceTypeId } var file_chat_proto_depIdxs = []int32{ 2, // 0: pb.C2SChat.src_user:type_name -> pb.ChatUser 2, // 1: pb.C2SChat.dst_user:type_name -> pb.ChatUser 0, // 2: pb.C2SChat.type:type_name -> pb.ChatType 3, // 3: pb.C2SChat.game_id:type_name -> pb.ServiceTypeId 4, // [4:4] is the sub-list for method output_type 4, // [4:4] is the sub-list for method input_type 4, // [4:4] is the sub-list for extension type_name 4, // [4:4] is the sub-list for extension extendee 0, // [0:4] is the sub-list for field type_name } func init() { file_chat_proto_init() } func file_chat_proto_init() { if File_chat_proto != nil { return } file_user_proto_init() file_service_proto_init() if !protoimpl.UnsafeEnabled { file_chat_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*C2SChat); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_chat_proto_rawDesc, NumEnums: 1, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, GoTypes: file_chat_proto_goTypes, DependencyIndexes: file_chat_proto_depIdxs, EnumInfos: file_chat_proto_enumTypes, MessageInfos: file_chat_proto_msgTypes, }.Build() File_chat_proto = out.File file_chat_proto_rawDesc = nil file_chat_proto_goTypes = nil file_chat_proto_depIdxs = nil }