458 lines
12 KiB
Go
458 lines
12 KiB
Go
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||
|
// versions:
|
||
|
// protoc-gen-go v1.36.6
|
||
|
// protoc v6.31.0
|
||
|
// source: login.proto
|
||
|
|
||
|
package pb
|
||
|
|
||
|
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 LoginMsgId int32
|
||
|
|
||
|
const (
|
||
|
LoginMsgId_Unknown LoginMsgId = 0
|
||
|
LoginMsgId_C2SUserLogin LoginMsgId = 1 // 玩家登陆
|
||
|
LoginMsgId_S2SUserLogin LoginMsgId = 2
|
||
|
LoginMsgId_NtfUserOnline LoginMsgId = 3
|
||
|
LoginMsgId_C2SUserLogout LoginMsgId = 4
|
||
|
LoginMsgId_S2CUserLogout LoginMsgId = 5
|
||
|
LoginMsgId_NtfUserOffline LoginMsgId = 6
|
||
|
)
|
||
|
|
||
|
// Enum value maps for LoginMsgId.
|
||
|
var (
|
||
|
LoginMsgId_name = map[int32]string{
|
||
|
0: "Unknown",
|
||
|
1: "C2SUserLogin",
|
||
|
2: "S2SUserLogin",
|
||
|
3: "NtfUserOnline",
|
||
|
4: "C2SUserLogout",
|
||
|
5: "S2CUserLogout",
|
||
|
6: "NtfUserOffline",
|
||
|
}
|
||
|
LoginMsgId_value = map[string]int32{
|
||
|
"Unknown": 0,
|
||
|
"C2SUserLogin": 1,
|
||
|
"S2SUserLogin": 2,
|
||
|
"NtfUserOnline": 3,
|
||
|
"C2SUserLogout": 4,
|
||
|
"S2CUserLogout": 5,
|
||
|
"NtfUserOffline": 6,
|
||
|
}
|
||
|
)
|
||
|
|
||
|
func (x LoginMsgId) Enum() *LoginMsgId {
|
||
|
p := new(LoginMsgId)
|
||
|
*p = x
|
||
|
return p
|
||
|
}
|
||
|
|
||
|
func (x LoginMsgId) String() string {
|
||
|
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||
|
}
|
||
|
|
||
|
func (LoginMsgId) Descriptor() protoreflect.EnumDescriptor {
|
||
|
return file_login_proto_enumTypes[0].Descriptor()
|
||
|
}
|
||
|
|
||
|
func (LoginMsgId) Type() protoreflect.EnumType {
|
||
|
return &file_login_proto_enumTypes[0]
|
||
|
}
|
||
|
|
||
|
func (x LoginMsgId) Number() protoreflect.EnumNumber {
|
||
|
return protoreflect.EnumNumber(x)
|
||
|
}
|
||
|
|
||
|
// Deprecated: Use LoginMsgId.Descriptor instead.
|
||
|
func (LoginMsgId) EnumDescriptor() ([]byte, []int) {
|
||
|
return file_login_proto_rawDescGZIP(), []int{0}
|
||
|
}
|
||
|
|
||
|
// 玩家登陆
|
||
|
type C2SUserLoginMsg struct {
|
||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||
|
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` // 用户名
|
||
|
Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` // 密码或token
|
||
|
Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` // 版本
|
||
|
unknownFields protoimpl.UnknownFields
|
||
|
sizeCache protoimpl.SizeCache
|
||
|
}
|
||
|
|
||
|
func (x *C2SUserLoginMsg) Reset() {
|
||
|
*x = C2SUserLoginMsg{}
|
||
|
mi := &file_login_proto_msgTypes[0]
|
||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
|
ms.StoreMessageInfo(mi)
|
||
|
}
|
||
|
|
||
|
func (x *C2SUserLoginMsg) String() string {
|
||
|
return protoimpl.X.MessageStringOf(x)
|
||
|
}
|
||
|
|
||
|
func (*C2SUserLoginMsg) ProtoMessage() {}
|
||
|
|
||
|
func (x *C2SUserLoginMsg) ProtoReflect() protoreflect.Message {
|
||
|
mi := &file_login_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 C2SUserLoginMsg.ProtoReflect.Descriptor instead.
|
||
|
func (*C2SUserLoginMsg) Descriptor() ([]byte, []int) {
|
||
|
return file_login_proto_rawDescGZIP(), []int{0}
|
||
|
}
|
||
|
|
||
|
func (x *C2SUserLoginMsg) GetUsername() string {
|
||
|
if x != nil {
|
||
|
return x.Username
|
||
|
}
|
||
|
return ""
|
||
|
}
|
||
|
|
||
|
func (x *C2SUserLoginMsg) GetToken() string {
|
||
|
if x != nil {
|
||
|
return x.Token
|
||
|
}
|
||
|
return ""
|
||
|
}
|
||
|
|
||
|
func (x *C2SUserLoginMsg) GetVersion() string {
|
||
|
if x != nil {
|
||
|
return x.Version
|
||
|
}
|
||
|
return ""
|
||
|
}
|
||
|
|
||
|
type S2CUserLoginMsg struct {
|
||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||
|
Code ErrCode `protobuf:"varint,1,opt,name=code,proto3,enum=pb.ErrCode" json:"code,omitempty"`
|
||
|
UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||
|
unknownFields protoimpl.UnknownFields
|
||
|
sizeCache protoimpl.SizeCache
|
||
|
}
|
||
|
|
||
|
func (x *S2CUserLoginMsg) Reset() {
|
||
|
*x = S2CUserLoginMsg{}
|
||
|
mi := &file_login_proto_msgTypes[1]
|
||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
|
ms.StoreMessageInfo(mi)
|
||
|
}
|
||
|
|
||
|
func (x *S2CUserLoginMsg) String() string {
|
||
|
return protoimpl.X.MessageStringOf(x)
|
||
|
}
|
||
|
|
||
|
func (*S2CUserLoginMsg) ProtoMessage() {}
|
||
|
|
||
|
func (x *S2CUserLoginMsg) ProtoReflect() protoreflect.Message {
|
||
|
mi := &file_login_proto_msgTypes[1]
|
||
|
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 S2CUserLoginMsg.ProtoReflect.Descriptor instead.
|
||
|
func (*S2CUserLoginMsg) Descriptor() ([]byte, []int) {
|
||
|
return file_login_proto_rawDescGZIP(), []int{1}
|
||
|
}
|
||
|
|
||
|
func (x *S2CUserLoginMsg) GetCode() ErrCode {
|
||
|
if x != nil {
|
||
|
return x.Code
|
||
|
}
|
||
|
return ErrCode_EC_OK
|
||
|
}
|
||
|
|
||
|
func (x *S2CUserLoginMsg) GetUserId() int64 {
|
||
|
if x != nil {
|
||
|
return x.UserId
|
||
|
}
|
||
|
return 0
|
||
|
}
|
||
|
|
||
|
// 上线通知
|
||
|
type NtfUserOnlineMsg struct {
|
||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||
|
UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // 玩家id
|
||
|
unknownFields protoimpl.UnknownFields
|
||
|
sizeCache protoimpl.SizeCache
|
||
|
}
|
||
|
|
||
|
func (x *NtfUserOnlineMsg) Reset() {
|
||
|
*x = NtfUserOnlineMsg{}
|
||
|
mi := &file_login_proto_msgTypes[2]
|
||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
|
ms.StoreMessageInfo(mi)
|
||
|
}
|
||
|
|
||
|
func (x *NtfUserOnlineMsg) String() string {
|
||
|
return protoimpl.X.MessageStringOf(x)
|
||
|
}
|
||
|
|
||
|
func (*NtfUserOnlineMsg) ProtoMessage() {}
|
||
|
|
||
|
func (x *NtfUserOnlineMsg) ProtoReflect() protoreflect.Message {
|
||
|
mi := &file_login_proto_msgTypes[2]
|
||
|
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 NtfUserOnlineMsg.ProtoReflect.Descriptor instead.
|
||
|
func (*NtfUserOnlineMsg) Descriptor() ([]byte, []int) {
|
||
|
return file_login_proto_rawDescGZIP(), []int{2}
|
||
|
}
|
||
|
|
||
|
func (x *NtfUserOnlineMsg) GetUserId() int64 {
|
||
|
if x != nil {
|
||
|
return x.UserId
|
||
|
}
|
||
|
return 0
|
||
|
}
|
||
|
|
||
|
// 玩家登陆
|
||
|
type C2SUserLogoutMsg struct {
|
||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||
|
unknownFields protoimpl.UnknownFields
|
||
|
sizeCache protoimpl.SizeCache
|
||
|
}
|
||
|
|
||
|
func (x *C2SUserLogoutMsg) Reset() {
|
||
|
*x = C2SUserLogoutMsg{}
|
||
|
mi := &file_login_proto_msgTypes[3]
|
||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
|
ms.StoreMessageInfo(mi)
|
||
|
}
|
||
|
|
||
|
func (x *C2SUserLogoutMsg) String() string {
|
||
|
return protoimpl.X.MessageStringOf(x)
|
||
|
}
|
||
|
|
||
|
func (*C2SUserLogoutMsg) ProtoMessage() {}
|
||
|
|
||
|
func (x *C2SUserLogoutMsg) ProtoReflect() protoreflect.Message {
|
||
|
mi := &file_login_proto_msgTypes[3]
|
||
|
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 C2SUserLogoutMsg.ProtoReflect.Descriptor instead.
|
||
|
func (*C2SUserLogoutMsg) Descriptor() ([]byte, []int) {
|
||
|
return file_login_proto_rawDescGZIP(), []int{3}
|
||
|
}
|
||
|
|
||
|
type S2CUserLogoutMsg struct {
|
||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||
|
Code ErrCode `protobuf:"varint,1,opt,name=code,proto3,enum=pb.ErrCode" json:"code,omitempty"` // 登出原因
|
||
|
unknownFields protoimpl.UnknownFields
|
||
|
sizeCache protoimpl.SizeCache
|
||
|
}
|
||
|
|
||
|
func (x *S2CUserLogoutMsg) Reset() {
|
||
|
*x = S2CUserLogoutMsg{}
|
||
|
mi := &file_login_proto_msgTypes[4]
|
||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
|
ms.StoreMessageInfo(mi)
|
||
|
}
|
||
|
|
||
|
func (x *S2CUserLogoutMsg) String() string {
|
||
|
return protoimpl.X.MessageStringOf(x)
|
||
|
}
|
||
|
|
||
|
func (*S2CUserLogoutMsg) ProtoMessage() {}
|
||
|
|
||
|
func (x *S2CUserLogoutMsg) ProtoReflect() protoreflect.Message {
|
||
|
mi := &file_login_proto_msgTypes[4]
|
||
|
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 S2CUserLogoutMsg.ProtoReflect.Descriptor instead.
|
||
|
func (*S2CUserLogoutMsg) Descriptor() ([]byte, []int) {
|
||
|
return file_login_proto_rawDescGZIP(), []int{4}
|
||
|
}
|
||
|
|
||
|
func (x *S2CUserLogoutMsg) GetCode() ErrCode {
|
||
|
if x != nil {
|
||
|
return x.Code
|
||
|
}
|
||
|
return ErrCode_EC_OK
|
||
|
}
|
||
|
|
||
|
// 下线通知
|
||
|
type NtfUserOfflineMsg struct {
|
||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||
|
UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // 玩家id
|
||
|
unknownFields protoimpl.UnknownFields
|
||
|
sizeCache protoimpl.SizeCache
|
||
|
}
|
||
|
|
||
|
func (x *NtfUserOfflineMsg) Reset() {
|
||
|
*x = NtfUserOfflineMsg{}
|
||
|
mi := &file_login_proto_msgTypes[5]
|
||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
|
ms.StoreMessageInfo(mi)
|
||
|
}
|
||
|
|
||
|
func (x *NtfUserOfflineMsg) String() string {
|
||
|
return protoimpl.X.MessageStringOf(x)
|
||
|
}
|
||
|
|
||
|
func (*NtfUserOfflineMsg) ProtoMessage() {}
|
||
|
|
||
|
func (x *NtfUserOfflineMsg) ProtoReflect() protoreflect.Message {
|
||
|
mi := &file_login_proto_msgTypes[5]
|
||
|
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 NtfUserOfflineMsg.ProtoReflect.Descriptor instead.
|
||
|
func (*NtfUserOfflineMsg) Descriptor() ([]byte, []int) {
|
||
|
return file_login_proto_rawDescGZIP(), []int{5}
|
||
|
}
|
||
|
|
||
|
func (x *NtfUserOfflineMsg) GetUserId() int64 {
|
||
|
if x != nil {
|
||
|
return x.UserId
|
||
|
}
|
||
|
return 0
|
||
|
}
|
||
|
|
||
|
var File_login_proto protoreflect.FileDescriptor
|
||
|
|
||
|
const file_login_proto_rawDesc = "" +
|
||
|
"\n" +
|
||
|
"\vlogin.proto\x12\x02pb\x1a\n" +
|
||
|
"code.proto\"]\n" +
|
||
|
"\x0fC2SUserLoginMsg\x12\x1a\n" +
|
||
|
"\busername\x18\x01 \x01(\tR\busername\x12\x14\n" +
|
||
|
"\x05token\x18\x02 \x01(\tR\x05token\x12\x18\n" +
|
||
|
"\aversion\x18\x03 \x01(\tR\aversion\"K\n" +
|
||
|
"\x0fS2CUserLoginMsg\x12\x1f\n" +
|
||
|
"\x04code\x18\x01 \x01(\x0e2\v.pb.ErrCodeR\x04code\x12\x17\n" +
|
||
|
"\auser_id\x18\x02 \x01(\x03R\x06userId\"+\n" +
|
||
|
"\x10NtfUserOnlineMsg\x12\x17\n" +
|
||
|
"\auser_id\x18\x02 \x01(\x03R\x06userId\"\x12\n" +
|
||
|
"\x10C2SUserLogoutMsg\"3\n" +
|
||
|
"\x10S2CUserLogoutMsg\x12\x1f\n" +
|
||
|
"\x04code\x18\x01 \x01(\x0e2\v.pb.ErrCodeR\x04code\",\n" +
|
||
|
"\x11NtfUserOfflineMsg\x12\x17\n" +
|
||
|
"\auser_id\x18\x02 \x01(\x03R\x06userId*\x8a\x01\n" +
|
||
|
"\n" +
|
||
|
"LoginMsgId\x12\v\n" +
|
||
|
"\aUnknown\x10\x00\x12\x10\n" +
|
||
|
"\fC2SUserLogin\x10\x01\x12\x10\n" +
|
||
|
"\fS2SUserLogin\x10\x02\x12\x11\n" +
|
||
|
"\rNtfUserOnline\x10\x03\x12\x11\n" +
|
||
|
"\rC2SUserLogout\x10\x04\x12\x11\n" +
|
||
|
"\rS2CUserLogout\x10\x05\x12\x12\n" +
|
||
|
"\x0eNtfUserOffline\x10\x06B\x11Z\x0fcommon/proto/pbb\x06proto3"
|
||
|
|
||
|
var (
|
||
|
file_login_proto_rawDescOnce sync.Once
|
||
|
file_login_proto_rawDescData []byte
|
||
|
)
|
||
|
|
||
|
func file_login_proto_rawDescGZIP() []byte {
|
||
|
file_login_proto_rawDescOnce.Do(func() {
|
||
|
file_login_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_login_proto_rawDesc), len(file_login_proto_rawDesc)))
|
||
|
})
|
||
|
return file_login_proto_rawDescData
|
||
|
}
|
||
|
|
||
|
var file_login_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||
|
var file_login_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||
|
var file_login_proto_goTypes = []any{
|
||
|
(LoginMsgId)(0), // 0: pb.LoginMsgId
|
||
|
(*C2SUserLoginMsg)(nil), // 1: pb.C2SUserLoginMsg
|
||
|
(*S2CUserLoginMsg)(nil), // 2: pb.S2CUserLoginMsg
|
||
|
(*NtfUserOnlineMsg)(nil), // 3: pb.NtfUserOnlineMsg
|
||
|
(*C2SUserLogoutMsg)(nil), // 4: pb.C2SUserLogoutMsg
|
||
|
(*S2CUserLogoutMsg)(nil), // 5: pb.S2CUserLogoutMsg
|
||
|
(*NtfUserOfflineMsg)(nil), // 6: pb.NtfUserOfflineMsg
|
||
|
(ErrCode)(0), // 7: pb.ErrCode
|
||
|
}
|
||
|
var file_login_proto_depIdxs = []int32{
|
||
|
7, // 0: pb.S2CUserLoginMsg.code:type_name -> pb.ErrCode
|
||
|
7, // 1: pb.S2CUserLogoutMsg.code:type_name -> pb.ErrCode
|
||
|
2, // [2:2] is the sub-list for method output_type
|
||
|
2, // [2:2] is the sub-list for method input_type
|
||
|
2, // [2:2] is the sub-list for extension type_name
|
||
|
2, // [2:2] is the sub-list for extension extendee
|
||
|
0, // [0:2] is the sub-list for field type_name
|
||
|
}
|
||
|
|
||
|
func init() { file_login_proto_init() }
|
||
|
func file_login_proto_init() {
|
||
|
if File_login_proto != nil {
|
||
|
return
|
||
|
}
|
||
|
file_code_proto_init()
|
||
|
type x struct{}
|
||
|
out := protoimpl.TypeBuilder{
|
||
|
File: protoimpl.DescBuilder{
|
||
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_login_proto_rawDesc), len(file_login_proto_rawDesc)),
|
||
|
NumEnums: 1,
|
||
|
NumMessages: 6,
|
||
|
NumExtensions: 0,
|
||
|
NumServices: 0,
|
||
|
},
|
||
|
GoTypes: file_login_proto_goTypes,
|
||
|
DependencyIndexes: file_login_proto_depIdxs,
|
||
|
EnumInfos: file_login_proto_enumTypes,
|
||
|
MessageInfos: file_login_proto_msgTypes,
|
||
|
}.Build()
|
||
|
File_login_proto = out.File
|
||
|
file_login_proto_goTypes = nil
|
||
|
file_login_proto_depIdxs = nil
|
||
|
}
|