game/common/proto/pb/chat.pb.go

234 lines
6.5 KiB
Go
Raw Normal View History

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
2025-06-07 01:58:14 +08:00
// protoc-gen-go v1.36.6
// protoc v6.31.0
// source: chat.proto
package pb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
2025-06-07 01:58:14 +08:00
unsafe "unsafe"
)
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}
}
// 聊天消息
2025-06-08 22:42:58 +08:00
type ReqChat struct {
2025-06-07 01:58:14 +08:00
state protoimpl.MessageState `protogen:"open.v1"`
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"` // 内容
2025-06-06 20:02:58 +08:00
unknownFields protoimpl.UnknownFields
2025-06-07 01:58:14 +08:00
sizeCache protoimpl.SizeCache
}
2025-06-08 22:42:58 +08:00
func (x *ReqChat) Reset() {
*x = ReqChat{}
2025-06-07 01:58:14 +08:00
mi := &file_chat_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
2025-06-08 22:42:58 +08:00
func (x *ReqChat) String() string {
return protoimpl.X.MessageStringOf(x)
}
2025-06-08 22:42:58 +08:00
func (*ReqChat) ProtoMessage() {}
2025-06-08 22:42:58 +08:00
func (x *ReqChat) ProtoReflect() protoreflect.Message {
mi := &file_chat_proto_msgTypes[0]
2025-06-07 01:58:14 +08:00
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
2025-06-08 22:42:58 +08:00
// Deprecated: Use ReqChat.ProtoReflect.Descriptor instead.
func (*ReqChat) Descriptor() ([]byte, []int) {
return file_chat_proto_rawDescGZIP(), []int{0}
}
2025-06-08 22:42:58 +08:00
func (x *ReqChat) GetSrcUser() *ChatUser {
if x != nil {
return x.SrcUser
}
return nil
}
2025-06-08 22:42:58 +08:00
func (x *ReqChat) GetDstUser() *ChatUser {
if x != nil {
return x.DstUser
}
return nil
}
2025-06-08 22:42:58 +08:00
func (x *ReqChat) GetType() ChatType {
if x != nil {
return x.Type
}
return ChatType_CT_Unknown
}
2025-06-08 22:42:58 +08:00
func (x *ReqChat) GetGameId() ServiceTypeId {
if x != nil {
return x.GameId
}
return ServiceTypeId_STI_Unknown
}
2025-06-08 22:42:58 +08:00
func (x *ReqChat) GetContent() string {
if x != nil {
return x.Content
}
return ""
}
var File_chat_proto protoreflect.FileDescriptor
2025-06-07 01:58:14 +08:00
const file_chat_proto_rawDesc = "" +
"\n" +
"\n" +
"chat.proto\x12\x02pb\x1a\n" +
"user.proto\x1a\rservice.proto\"\xc3\x01\n" +
2025-06-08 22:42:58 +08:00
"\aReqChat\x12'\n" +
2025-06-07 01:58:14 +08:00
"\bsrc_user\x18\x01 \x01(\v2\f.pb.ChatUserR\asrcUser\x12'\n" +
"\bdst_user\x18\x02 \x01(\v2\f.pb.ChatUserR\adstUser\x12 \n" +
"\x04type\x18\x03 \x01(\x0e2\f.pb.ChatTypeR\x04type\x12*\n" +
"\agame_id\x18\x04 \x01(\x0e2\x11.pb.ServiceTypeIdR\x06gameId\x12\x18\n" +
"\acontent\x18\x05 \x01(\tR\acontent*H\n" +
"\bChatType\x12\x0e\n" +
"\n" +
"CT_Unknown\x10\x00\x12\x0e\n" +
"\n" +
"CT_Private\x10\x01\x12\f\n" +
"\bCT_World\x10\x02\x12\x0e\n" +
"\n" +
"CT_Marquee\x10\x03B\x11Z\x0fcommon/proto/pbb\x06proto3"
var (
file_chat_proto_rawDescOnce sync.Once
2025-06-07 01:58:14 +08:00
file_chat_proto_rawDescData []byte
)
func file_chat_proto_rawDescGZIP() []byte {
file_chat_proto_rawDescOnce.Do(func() {
2025-06-07 01:58:14 +08:00
file_chat_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_chat_proto_rawDesc), len(file_chat_proto_rawDesc)))
})
return file_chat_proto_rawDescData
}
var file_chat_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_chat_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
2025-06-07 01:58:14 +08:00
var file_chat_proto_goTypes = []any{
(ChatType)(0), // 0: pb.ChatType
2025-06-08 22:42:58 +08:00
(*ReqChat)(nil), // 1: pb.ReqChat
(*ChatUser)(nil), // 2: pb.ChatUser
(ServiceTypeId)(0), // 3: pb.ServiceTypeId
}
var file_chat_proto_depIdxs = []int32{
2025-06-08 22:42:58 +08:00
2, // 0: pb.ReqChat.src_user:type_name -> pb.ChatUser
2, // 1: pb.ReqChat.dst_user:type_name -> pb.ChatUser
0, // 2: pb.ReqChat.type:type_name -> pb.ChatType
3, // 3: pb.ReqChat.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()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
2025-06-07 01:58:14 +08:00
RawDescriptor: unsafe.Slice(unsafe.StringData(file_chat_proto_rawDesc), len(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_goTypes = nil
file_chat_proto_depIdxs = nil
}