fox/ipb/internal.pb.go
2025-06-14 13:24:40 +08:00

290 lines
7.8 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.6
// protoc v6.31.0
// source: internal.proto
package ipb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
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 MsgId int32
const (
MsgId_Unknown MsgId = 0
MsgId_Internal MsgId = -1 // 内部消息id
)
// Enum value maps for MsgId.
var (
MsgId_name = map[int32]string{
0: "Unknown",
-1: "Internal",
}
MsgId_value = map[string]int32{
"Unknown": 0,
"Internal": -1,
}
)
func (x MsgId) Enum() *MsgId {
p := new(MsgId)
*p = x
return p
}
func (x MsgId) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (MsgId) Descriptor() protoreflect.EnumDescriptor {
return file_internal_proto_enumTypes[0].Descriptor()
}
func (MsgId) Type() protoreflect.EnumType {
return &file_internal_proto_enumTypes[0]
}
func (x MsgId) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use MsgId.Descriptor instead.
func (MsgId) EnumDescriptor() ([]byte, []int) {
return file_internal_proto_rawDescGZIP(), []int{0}
}
type MsgType int32
const (
MsgType_NormalMsg MsgType = 0
MsgType_RpcMsg MsgType = 1
)
// Enum value maps for MsgType.
var (
MsgType_name = map[int32]string{
0: "NormalMsg",
1: "RpcMsg",
}
MsgType_value = map[string]int32{
"NormalMsg": 0,
"RpcMsg": 1,
}
)
func (x MsgType) Enum() *MsgType {
p := new(MsgType)
*p = x
return p
}
func (x MsgType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (MsgType) Descriptor() protoreflect.EnumDescriptor {
return file_internal_proto_enumTypes[1].Descriptor()
}
func (MsgType) Type() protoreflect.EnumType {
return &file_internal_proto_enumTypes[1]
}
func (x MsgType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use MsgType.Descriptor instead.
func (MsgType) EnumDescriptor() ([]byte, []int) {
return file_internal_proto_rawDescGZIP(), []int{1}
}
type InternalMsg struct {
state protoimpl.MessageState `protogen:"open.v1"`
ServiceName string `protobuf:"bytes,1,opt,name=serviceName,proto3" json:"serviceName,omitempty"` // 该服务类型下的具体的服务节点名,需要保证该消息是该服务节点发的。否则可能会导致客户端出现路由错误
ConnId uint32 `protobuf:"varint,2,opt,name=connId,proto3" json:"connId,omitempty"` // 刚登陆时没有user_id只有conn_id
UserId int64 `protobuf:"varint,3,opt,name=userId,proto3" json:"userId,omitempty"` // 玩家id
MsgId int32 `protobuf:"varint,4,opt,name=msgId,proto3" json:"msgId,omitempty"` // 消息id
Msg []byte `protobuf:"bytes,5,opt,name=msg,proto3" json:"msg,omitempty"` // 消息
Type MsgType `protobuf:"varint,6,opt,name=type,proto3,enum=ipb.MsgType" json:"type,omitempty"` // 消息类型
RpcMsgId string `protobuf:"bytes,7,opt,name=rpcMsgId,proto3" json:"rpcMsgId,omitempty"` // rpc消息id
RpcCode int32 `protobuf:"varint,8,opt,name=rpcCode,proto3" json:"rpcCode,omitempty"` // rpc返回码
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *InternalMsg) Reset() {
*x = InternalMsg{}
mi := &file_internal_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *InternalMsg) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*InternalMsg) ProtoMessage() {}
func (x *InternalMsg) ProtoReflect() protoreflect.Message {
mi := &file_internal_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use InternalMsg.ProtoReflect.Descriptor instead.
func (*InternalMsg) Descriptor() ([]byte, []int) {
return file_internal_proto_rawDescGZIP(), []int{0}
}
func (x *InternalMsg) GetServiceName() string {
if x != nil {
return x.ServiceName
}
return ""
}
func (x *InternalMsg) GetConnId() uint32 {
if x != nil {
return x.ConnId
}
return 0
}
func (x *InternalMsg) GetUserId() int64 {
if x != nil {
return x.UserId
}
return 0
}
func (x *InternalMsg) GetMsgId() int32 {
if x != nil {
return x.MsgId
}
return 0
}
func (x *InternalMsg) GetMsg() []byte {
if x != nil {
return x.Msg
}
return nil
}
func (x *InternalMsg) GetType() MsgType {
if x != nil {
return x.Type
}
return MsgType_NormalMsg
}
func (x *InternalMsg) GetRpcMsgId() string {
if x != nil {
return x.RpcMsgId
}
return ""
}
func (x *InternalMsg) GetRpcCode() int32 {
if x != nil {
return x.RpcCode
}
return 0
}
var File_internal_proto protoreflect.FileDescriptor
const file_internal_proto_rawDesc = "" +
"\n" +
"\x0einternal.proto\x12\x03ipb\"\xdf\x01\n" +
"\vInternalMsg\x12 \n" +
"\vserviceName\x18\x01 \x01(\tR\vserviceName\x12\x16\n" +
"\x06connId\x18\x02 \x01(\rR\x06connId\x12\x16\n" +
"\x06userId\x18\x03 \x01(\x03R\x06userId\x12\x14\n" +
"\x05msgId\x18\x04 \x01(\x05R\x05msgId\x12\x10\n" +
"\x03msg\x18\x05 \x01(\fR\x03msg\x12 \n" +
"\x04type\x18\x06 \x01(\x0e2\f.ipb.MsgTypeR\x04type\x12\x1a\n" +
"\brpcMsgId\x18\a \x01(\tR\brpcMsgId\x12\x18\n" +
"\arpcCode\x18\b \x01(\x05R\arpcCode*+\n" +
"\x05MsgId\x12\v\n" +
"\aUnknown\x10\x00\x12\x15\n" +
"\bInternal\x10\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01*$\n" +
"\aMsgType\x12\r\n" +
"\tNormalMsg\x10\x00\x12\n" +
"\n" +
"\x06RpcMsg\x10\x01B\tZ\afox/ipbb\x06proto3"
var (
file_internal_proto_rawDescOnce sync.Once
file_internal_proto_rawDescData []byte
)
func file_internal_proto_rawDescGZIP() []byte {
file_internal_proto_rawDescOnce.Do(func() {
file_internal_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_internal_proto_rawDesc), len(file_internal_proto_rawDesc)))
})
return file_internal_proto_rawDescData
}
var file_internal_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_internal_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_internal_proto_goTypes = []any{
(MsgId)(0), // 0: ipb.MsgId
(MsgType)(0), // 1: ipb.MsgType
(*InternalMsg)(nil), // 2: ipb.InternalMsg
}
var file_internal_proto_depIdxs = []int32{
1, // 0: ipb.InternalMsg.type:type_name -> ipb.MsgType
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_internal_proto_init() }
func file_internal_proto_init() {
if File_internal_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_internal_proto_rawDesc), len(file_internal_proto_rawDesc)),
NumEnums: 2,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_internal_proto_goTypes,
DependencyIndexes: file_internal_proto_depIdxs,
EnumInfos: file_internal_proto_enumTypes,
MessageInfos: file_internal_proto_msgTypes,
}.Build()
File_internal_proto = out.File
file_internal_proto_goTypes = nil
file_internal_proto_depIdxs = nil
}